Re: [Flashcoders] How to embed assets in pure as3?

2009-05-20 Thread Manish Jethani
On Wed, May 13, 2009 at 8:34 PM, ACE Flash acefl...@gmail.com wrote: hi there, I'd like to use pure  actionscript 3 to embed my assets in flash. and use addChild() to add them on the stage.        [Embed(source=/assets/img1.gif , mimeType=image/gif)]        public var newImage:Class; [...]

Re: [Flashcoders] How to embed assets in pure as3?

2009-05-13 Thread Glen Pike
Hi, I think you have to instanciate them as Sprite or MovieClip? Glen ACE Flash wrote: hi there, I'd like to use pure actionscript 3 to embed my assets in flash. and use addChild() to add them on the stage. The code seem doesn't work for me, any suggestions? thanks

[Flashcoders] How to embed assets in pure as3?

2009-05-13 Thread ACE Flash
hi there, I'd like to use pure actionscript 3 to embed my assets in flash. and use addChild() to add them on the stage. The code seem doesn't work for me, any suggestions? thanks [Embed(source=/assets/img1.gif , mimeType=image/gif)] public var newImage:Class;

Re: [Flashcoders] How to embed assets in pure as3?

2009-05-13 Thread Ruy Adorno
In fact, I think it should be intanciated as Bitmap or BitmapData since they're images. But you can also try: var img1:* = new newImage(); addChild(img1); Glen Pike wrote: Hi, I think you have to instanciate them as Sprite or MovieClip? Glen ACE Flash wrote: hi there, I'd like to

Re: [Flashcoders] How to embed assets in pure as3?

2009-05-13 Thread ekameleon
Hello :) A gif asset is not a Shape class but a Bitmap ? try the flash.utils.describeType method to see the real inherited class : trace( describeType( newImage ) ) ; If you write as Shape the new filter object is null ... use other display class (Bitmap) to cast your variable. EKA+ :)