When writing an external class, is there a way to ALWAYS refer to the class? The circumstances that I'm referring to are when you use something like MovieClipLoader, or similar. Right now, for MovieClipLoader, to refer to the class that I'm writing the Listener in, I have to climb the various layers, and then back to the class I'm in through an embedded classRef tag that I inserted in the root movie while setting my class. So, it ends up looking like this:Is there an easier or more sure way of referring to my calling class? Or do I always have to hunt for which layer is correct, and then reference that layer?Code:myListener.onLoadInit = function (mc:MovieClip) { var cRef = mc._parent._parent.classRef; cRef.myImagesLoaded++; if (cRef.myImagesLoaded == cRef.myTarget.numImages) { cRef.placeImages (); if (!myTarget.access508) { mySound.start (); } } };
Thanks for any help.




Reply With Quote