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 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;
[Embed(source="/assets/img2.gif" , mimeType="image/gif")]
public var oldImage:Class;
var img1:Shape= new newImage() as Shape;;
addChild( img1 );
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders