View Full Version : simple movement question
sluggo5505
06-07-2002, 01:14 AM
I want to move a movieclip to a x coord. at a certain speed.
onClipEvent (mouseDown) {
_x = 61.4;
_xscale = 133;
_yscale = 133;
}
Is there a way to control speed of the movement?
Thanks
Billy T
06-07-2002, 01:23 AM
onClipEvent(load){
targ=300;
speed=5;
}
onClipEvent(enterFrame){
if(this._x<targ){
this._x+=speed;
}
}
cheers
sluggo5505
06-07-2002, 02:23 PM
You answered exactly what I asked, but I asked the wrong question.
I have five buttons (a, b,c ,d, e) arranged horizontally that I want to slide (controlling speed) into relative positions on mouse release. Example:
a b c d e
becomes
b c d e a
on button b release. That becomes
d e a b c
when button d is released.
Thanks for the help...
CyanBlue
06-09-2002, 04:09 AM
Hi...
I just made one for you... You can check it out at http://mywebpages.comcast.net/Cyan-Blue/Examples/buttonSlideTest.html
I hope that's what you wanted...
Jason
sluggo5505
06-09-2002, 06:13 AM
Thanks, Jason. Just what I needed.
CyanBlue
06-09-2003, 04:54 AM
Since that site is gone... :D
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.