AS3: Accessing variable declared on MovieClip's parent
Posted
by Joel Alejandro
on Stack Overflow
See other posts from Stack Overflow
or by Joel Alejandro
Published on 2010-03-31T01:25:48Z
Indexed on
2010/03/31
1:33 UTC
Read the original article
Hit count: 412
actionscript-3
|flash
I have a frame which contains an mcMenubar
MovieClip. On the frame, I have this code:
import Nem.*
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.motion.Color;
var pageLoader:SwfLoader = new SwfLoader(root, 199, 144);
On the mcMenubar clip, I want to access that same pageLoader instance:
var pageFile:String = "page-" + e.target.name.replace(/btn/gi, "").toLowerCase() + ".swf";
this.parent.loadPage("loadertest.swf"); // THIS WON'T WORK //
var tweenMove:Tween = new Tween(gfxSelected, "x", Bounce.easeOut, gfxSelected.x, e.target.x, 1, true);
currentlySelected = e.target.name;
Apparently I'm getting this error:
TypeError: Error #1010: A term is undefined and has no properties. at MethodInfo-71()
How can I fix this?
© Stack Overflow or respective owner