Ok, should be simple, but it has been a long time since I have coded. I have a MC with the instance name of “price”. When I click another MC that says “Competetors”, I want “price” to move over left 50, and then up 60. I have tried everything I could remember but it has not been working. Can someone please explain to me how to make this one fluid motion. Anything…
Thanks guys
system
July 30, 2003, 5:36am
2
for a transitioned movement
actionscript on mc price
onClipEvent(load){
this.trip=false;
xdiff= -50;
ydiff= -60;
}
onClipEvent(enterFrame){
if(this.trip){
if(this._y!=ydiff){
_y--);
}
if(this._x!=xdiff){
_x--;
}
}
}
then on the competitors mc you have
on(mouseDown){
if(_xmouse>this._x&&_xmouse<this._x+this._width&&_ymouse>this._y&&_ymouse<this._y+this._height){
price.trip=true;
}
}
system
July 30, 2003, 3:02pm
3
I think I see what you are trying to do here, but it is giving me some errors…
Scene=Scene 1, Layer=Text, Frame=1: Line 9: ';' expected
_y--);
Scene=Scene 1, Layer=Text, Frame=1: Line 15: Unexpected '}' encountered
}
Scene=Scene 1, Layer=Text, Frame=1: Line 1: Invalid mouse event specified.
on(mouseDown){
Scene=Scene 1, Layer=Text, Frame=1: Line 2: Statement must appear within on/onClipEvent handler
if(_xmouse>this._x&&_xmouse<this._x+this._width&&_ymouse>this._y&&_ymouse<this._y+this._height){
Scene=Scene 1, Layer=Text, Frame=1: Line 5: Unexpected '}' encountered
}
system
July 30, 2003, 3:13pm
4
try this on the mc. this is actually easing motion, but its easier than normal motion
onClipEvent(load){
x=_x
y=_y
finalxpos=-60
finalypos=-50
finalxpos2=x+finalxpos
finalypos2=y+finalypos
}
onClipEvent(enterFrame){
_x+=(finalxpos2-_x)/5
_y+=(finalypos2-_y)/5
}
system
July 31, 2003, 1:41pm
5
I cant seem to get any of this to work. Is there any way we could have a Do While loop. Maybe like…
Do _root.myprice._x -=5{
While()_root._x >=50
Something similar to that?