You may have to wait until your MovieClip is initialised / on the stage
before you do things with child clips.
http://www.senocular.com/pub/kirupa/as3tips_p6.html
There is a tip in there about the DocumentClass and listening for the
ADDED event. There is also an ADDED_TO_STAGE event for later versions
of FP9.
This is similar to the onLoad / onClipEvent(load) from olden days -
there were sometimes problems accessing child clips because they had not
been loaded yet.
Stuart (FunkDaWeb) wrote:
Hi tried this but didn't work! here is my code in its most simple form...
package {
import flash.display.MovieClip;
public class mainClass extends MovieClip
{
// Instantiate our classes
public var banner:imageLib = new imageLib();
public function mainClass()
{
banner.loadImage("banners/banner1.jpg", bannerArea);
}
}
}
Now the problem is bannerArea is undefined even though its on the root timeline
and we have no way of directly accessing it from within the class now _root is
no longer in use!
SM
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
--
Glen Pike
01736 759321
www.glenpike.co.uk <http://www.glenpike.co.uk>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders