Quantcast
Channel: Adobe Community : Popular Discussions - Using Flash Builder
Viewing all articles
Browse latest Browse all 70427

Flash Button Component inside of a SWC

$
0
0

I'm publishing a SWC from FlashCC for use in a FlashBuilder Air project and I get errors when I compile.

 

Inside of the SWC I have a MovieClip with a button component (fl.controls.Button). In Flash Builder I can make an instance of the MovieClip but when I run the app I get a coercion error:

 

cannot convert flash.display::MovieClip@56ebee1 to fl.controls.Button.

 

If I remove the button component from the MovieClip and recompile the SWC there's no error.

 

If i simply try to add a button instance like this:

 

var b:Button=new Button();

trace(b);

addChild(b);

 

The button traces but I get this error

 

[object Button]

TypeError: Error #2007: Parameter child must be non-null


Viewing all articles
Browse latest Browse all 70427

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>