Hey, your changing your story.  First it was embedded PNGs and now it is SWF 
assets.  SWF assets do not have to be Bitmaps.  They could be Sprites, 
MovieClips, etc.

I’m surprised that ObjectUtil.toString only showed one line of output.  Or did 
the forum software cut it off?  Maybe try describeType instead, or use the 
–keep-generated-actionscript MXMLC option and see what it used for that asset 
in the SWF.  I’m trying to see what the base classes are for the embed.

-Alex

On 5/14/12 12:41 PM, "flexwdw" <flex...@yahoo.com> wrote:






Thanks for the help, Alex!

So, code:

trace( ObjectUtil.toString( 
StyleManager.getStyleDeclaration(".wdwTest").getStyle("icon")) );

var test:Class =        
StyleManager.getStyleDeclaration(".wdwTest").getStyle("icon");
var bitmap:Bitmap = new test();

CSS (cursor_move is a resource I am using elsewhere in the app already):
.wdwTest
{
icon: Embed(source="commonV5.1/skins.swf", symbol="cursor_move");
}

output:
(myskins2__embed_css_commonV5_1_skins_swf_cursor_move_2116628543)

Exception:

TypeError: Error #1034: Type Coercion failed: cannot convert 
myskins2__embed_css_commonV5_1_skins_swf_cursor_move_2116628543@366be041 to 
flash.display.Bitmap.

thanks!

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , Alex 
Harui <aharui@...> wrote:
>
> Run ObjectUtil.toString() on the results of getStyle("testPng").  That might 
> shed some light on what it is.  It might already be the instance of a Bitmap 
> instead of the class itself.  Also, what CSS did you use to embed?
>






--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui

Reply via email to