Hi:
I used to do this in Flex alpha:

                [Embed(source="images/mypicture.png")]
                private var MyPicture:Class;
                .....
                public function MySprite()
                {
                        var c:UIComponent
                        var s:Sprite
                                
                        MyButton = new UIComponent()
                        MyButton.visible = false
                        s = Sprite(new MyPicture()) 
                        MyButton.addChild(s)
                .....
                }

In the beta I get the following error:

TypeError: Error #1034: Type Coercion failed: cannot convert
[EMAIL PROTECTED] to flash.display.Sprite
        at ..... [lots of stuff]

Anyone else having similar trouble?  Any solutions greatly welcome!
Cheers,
Dave






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to