|
From: Jay K. <ja...@he...> - 2008-12-28 23:10:25
|
Thanks, this helped.
Now my next problem. :)
I want to stop a movieclip in my movie. I do this:
movieClip->addInitAction( new SWFAction( "stop();" ));
But it plays one frame. If I try to stop it in onEnterFrame, like so:
movieClip->add( new SWFAction(
"onEnterFrame=function() {stop();};"
) );
it still plays one frame. What am I missing? Do I need to do the stop
in the movie's init action? If so, what's the ActionScript reference
to the movieclip going to be? <myMovieClip>.stop().
Thanks.
/Jay
At 10:13 AM +0100 12/19/08, strk wrote:
>On Mon, Dec 15, 2008 at 11:14:57AM -0500, Jay Koutavas wrote:
>
>> Here's the ming lib C/C++ code:
>>
>> SWFMovieClip* movieClip = SWFMovieClip();
>> ....
>> movieClip->add( new SWFAction(
>> "myFunc = function() {"
>> "trace(\"myFunc was called\");"
>> "}"));
>> movieClip->addInitAction(new SWFAction("myFunc();"));
>
>Init actions are executed *before* other actions,
>so your call to myFunc happens *before* 'myFunc' is
>defined. Add the definition with addInitAction and you
>should be fine.
>
>--strk;
--
--------------------------------------------------------
Jay Koutavas mailto:ja...@he...
Heynow Software http://www.heynow.com
Windham, New Hampshire, USA
--------------------------------------------------------
|