From: Garth N. <gar...@wo...> - 2010-10-03 11:21:16
|
I expect I am being blind but I can't make this action script work correctly. Here is the relevent PHP/Ming - // $as is intended to make a sprite (/d1) toggle between frame 1 and frame 2 // the action is called when a button (not the sprite itself) is clicked $as = "setTarget('/d1');"; $as.= "f=_currentFrame;"; $as.= "if(f<2) f=2; else f=1;"; $as.= "gotoFrame(f);"; .. and in the button code ... $bb->addAction(new SWFAction($as),SWFBUTTON_MOUSEUP); // clicking the button $bb acts on the remote sprite, so the addressing works // however, it appears to toggle /d1 between frames 0 and 1 instead of 1 and 2 - why?? Any help would be MUCH appreciated. Garth Notley |