PDA

View Full Version : targeting root / nextFrame in AS3



bradleykal
April 25th, 2008, 07:35 PM
wow, AS3 is KILLING my brain.
trying to simply create one swf that is going to animate, and at the end of it's animation, tell it's parent clip to nextFrame()... The SWF in question has been loaded using URLRequest, but errors when published.

this is what I think should work:
MovieClip(root).nav.nextFrame();

but I get the following error when trying to publish:
1120: Access of undefined property nav.

magcius
April 25th, 2008, 07:40 PM
MovieClip doesn't have a nav property.

That won't work. What you want is:

MovieClip(root.nav).nextFrame();


That should work, though ideally you should create a document class.

bradleykal
April 25th, 2008, 07:52 PM
appreciate the fast response, but I'm still getting an error:
1119: Access of possibly undefined property nav through a reference with static type flash.display:DisplayObject.

the actual MC "nav" is in the parent movie that is importing this one.

magcius
April 25th, 2008, 09:09 PM
You could try:

Object(root).nav.nextFrame();

bradleykal
April 25th, 2008, 09:21 PM
na, not so much :(

new error: TypeError: Error #1010: A term is undefined and has no properties.
at introExample1_fla::AnimatedLogo_1/frame79()

really, all I'm trying to do is look for a simple way to communicate between 2 movies in AS3 to let the parent movie know that the SWF it loaded is finished animating. I thought nextFrame(); would be a simple solution... obviously, it's Friday and I've been hung up on this problem too long.