Hi guys,
I’m new to actionscripting and would appreciate some help understanding how to move from one frame to another (once clips complete their actions). I had previously posted some questions regarding this matter, but I think the post got too long and confusing (at least to myself).
SO I’m starting over from scratch and want to go step by step so I can understand. I have a line clip on stage that I move down the screen and center and expand it at the same time to fit the width of the stage. Now I have this code for that:
[AS]
goDownAndCenter=function()
{
if(this._width != 720) {
if (this._y < 375) this._y += 20;
if(this._width < 720) this._width += 15;
if(this._x > (700 / 2)) this._x -= 15;
} else {
trace(“width = 720”);
}
}
// We assing the two lines the handlers to move up/down and center
// themselves along with expanding their width
line1.onEnterFrame=goDownAndCenter;
[/AS]
As you can tell, I want the function to stop when the line reaches the width of 720, but for some reason it doesn’t stop when it reaches the end and it keeps going. What can I do to make it work?
Thanks,
Lior