Ok, I managed to figure out what the problem was from a previous post - one cannot add a sprite directly to a container, one has to first add it to a UIComponent type.
Anyone with more info / experience with this? Cheers Tracy --- In flexcoders@yahoogroups.com, "polestar11" <[EMAIL PROTECTED]> wrote: > > Hi there > > How does one attach an image to a sprite class? > I have tried the following example, but nothing gets displayed on the > screen: > > package > { > import flash.display.Bitmap; > import flash.display.Sprite; > > public class MySprite extends Sprite { > > [Embed(source='/assets/board.png')] > public var MyPhoto:Class; > > function MySprite() > { > var pic:Bitmap = new MyPhoto(); > this.addChild(pic); > } > } > } > > Thanks > Tracy > -- 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/