all groups > flash actionscript > july 2005 >
You're in the

flash actionscript

group:

if current frame...



if current frame... SkidOvidiu
7/15/2005 8:56:34 PM
flash actionscript: I am tring to make a button to change the frame of a movie clip , but in 2
different ways , if the current frame of that movie clip is 1 that go to 3 and
if it;s 2 to go to 4
I tryed this :
if (__root.MenuLT.MenuPortrets.PContents._currentframe=1)
{_root.MenuLT.MenuPortrets.PContents.gotoAndStop(3)}
if (__root.MenuLT.MenuPortrets.PContents._currentframe=2)
{_root.MenuLT.MenuPortrets.PContents.gotoAndStop(4)}
but in both ways it goes to frame 4
thanks
Re: if current frame... dr.Evol
7/15/2005 9:04:08 PM
wrong 1: _root not __root
wrong 2: if(something==1) not if(something=1) (== is comparison, = is
assignement!)

so..:
if (_root.MenuLT.MenuPortrets.PContents._currentframe==1) {
_root.MenuLT.MenuPortrets.PContents.gotoAndStop(3);
}

and so on...
Re: if current frame... SkidOvidiu
7/15/2005 9:11:02 PM
I knew about the _root I didnt noticed the mistake :P
the == was the problem
AddThis Social Bookmark Button