so i have a MC called “pala” and a button called “nappi” … i have the following script in the first frame of the movie and everything works how it should, but how do i get the “pala” stop moving when it reaches the property -307 ?
well it wont work picuse i have two buttons and two frames and it will be like a sliding menu or something like that so id needto script it with something like if (getproperty = … or something
im just too noob to get it work:<
I dont know what you mean “reaches the property -307”. There are numerous properties of a movieclip. Let’s say you mean you want it to stop when the _x is past -307. It would be [AS]var speed:Number = 8;
nappi.onRollOver = function()
{
pala.onEnterFrame = function()
{
this._x <= -307 ? delete this.onEnterFrame : this._x -= speed;
}
}
nappi.onRollOut = function()
{
delete pala.onEnterFrame;
}[/AS]