RE: [flexcoders] Adding clips to Parent clip

2008-04-21 Thread Alex Harui
Maybe it isn't a clip.  Call getQualifiedClassName to see what it is.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of justSteve
Sent: Monday, April 21, 2008 6:04 AM
To: flexcoders
Subject: [flexcoders] Adding clips to Parent clip

 

I'm working on a preloader where I'll want to end up with a master
clip that contains all children handled by the loader.

public function completeHandler(event:Event):void
{
manager.add2ClipHolder(event.target as MovieClip);
}

If I don't use the 'as MovieClip' i get a implicit coercion compile
error. When I breakpoint the line above I can see that event.target
_does, in fact, hold a clip and has the properties one expects of a
clip. When I breakpoint the function I'm passing this to -
add2ClipHolder - the 'assetClip' parameter contains a null value.

private var clipHolder:MovieClip;

public function myManager( ) {
//constructor creates holder
clipHolder = new MovieClip();
}

public function add2ClipHolder( assetClip: MovieClip):void{
clipHolder.addChild(assetClip);
}

Am I supposed to process the event.target before passing it forward?

thx
--steve...

 



[flexcoders] Adding clips to Parent clip

2008-04-21 Thread justSteve
I'm working on a preloader where I'll want to end up with a master
clip that contains all children handled by the loader.

public function completeHandler(event:Event):void
{
manager.add2ClipHolder(event.target as MovieClip);
}

If I don't use the 'as MovieClip' i get a implicit coercion compile
error. When I breakpoint the line above I can see that event.target
_does, in fact, hold a clip and has the properties one expects of a
clip. When I breakpoint the function I'm passing this to -
add2ClipHolder - the 'assetClip' parameter contains a null value.


private var clipHolder:MovieClip;

public function myManager( ) {
//constructor creates holder
clipHolder = new MovieClip();
}

public function add2ClipHolder( assetClip: MovieClip):void{
clipHolder.addChild(assetClip);
}

Am I supposed to process the event.target before passing it forward?

thx
--steve...