Flash Q
- Started
- Last post
- 5 Responses
- springbok
Hi,
I am trying to create a btn which moves a MC left and right. I am having difficult making the btn's move 120pxl's on one click and then 120 px on that same btn again on another click.
When the MC gets to the end of the sliding MC i want it to stop.
Any help would be greatfully appreciated
Cheers
- ********0
you want one button to move an MC 120 pixels to the right on the first click and then back again on the next click?
- springbok0
once I click say the right btn the mc moves 120 pixels then i clikc right again and it moves another 120 pixels in the same direction. I think i have to some how check the position of the movie clip and then make it move from its current position to another 120 from where it is.
does this make sense or am i just rambling?
- slaskis0
btnMc.onPress = function() {
this._x +=120;
}
is that what you mean??
- springbok0
will that make it slide with the prototype i am using called targetX
- hiten0
hey i think i have a FLA that might help its something simple i made trying to figure out the same thing.
download the fla called "as_flash_moving"
from my site here:
http://www.sincerelyhiten.com/pu…you need the as animation prototype thingy menioned in the other thread for it to work thats why the include script is on that one frame.