Hi Malte,
Following my experiments.. to move a transparent button... this is a card script.
Button "b_ghost" have the on "aeEnterFrame" that change the icon image.
constant K_GHOST_VEL = 15
on rawKeyDown keyCode
put the location of button "b_ghost" into tLocation
switch keycode
case 65361
put item 1 of tLocation - K_GHOST_VEL into item 1 of tLocation
aeMoveTo the long ID of button "b_ghost", tLocation,0
break
case 65363
put item 1 of tLocation + K_GHOST_VEL into item 1 of tLocation
aeMoveTo the long ID of button "b_ghost", tLocation,0
break
case 65362
put item 2 of tLocation - K_GHOST_VEL into item 2 of tLocation
aeMoveTo the long ID of button "b_ghost", tLocation,0
break
case 65364
put item 2 of tLocation + K_GHOST_VEL into item 2 of tLocation
aeMoveTo the long ID of button "b_ghost", tLocation,0
break
end switch
pass rawkeydown
end rawKeyDown
Any other way? I detect that the movement when change the direction is stoped and begin again, how can I do it more fluid?
Salut,
Josep
Moving sprites
Moderators: heatherlaine, kevinmiller, robinmiller, malte
Re: Moving sprites
Any help ...
Re: Moving sprites
Hi Josep,
how exactly do you want the ghost to move?
how exactly do you want the ghost to move?
Re: Moving sprites
I like to move like "pacman" I'm trying to create a ortogonal map and the move is over squares.
The user move the "hero" with the cursors keys.
Here I post my experiments..
http://forums.runrev.com/phpBB2/viewtop ... 267#p29139
But when press other direction it's freezing..
Salut,
Josep
The user move the "hero" with the cursors keys.
Here I post my experiments..
http://forums.runrev.com/phpBB2/viewtop ... 267#p29139
But when press other direction it's freezing..
Salut,
Josep