Re: [Flashcoders] How to add bitmaps from my library to the stage AS3?

2008-06-20 Thread Alistair Colling
Thanks Jonathon and Eduardo for your answers, I'll get them implemented. :) Ali On 19 Jun 2008, at 15:29, Eduardo Omine wrote: IIRC, because your LibImage extends BitmapData, it needs the 2 parameters required by the BitmapData constructor (width and height). var formatImg = new LibImage(10,

Re: [Flashcoders] How to add bitmaps from my library to the stage AS3?

2008-06-19 Thread jonathan howe
Here's the function I use (it uses getDefinitionByName Class because it lets me get bitmaps in externally loaded swfs as well): public static function getBitmapAsset(assetName:String):Bitmap { try { var ClassReference:Class = getDefinitionByName(assetName) as Class; var

Re: [Flashcoders] How to add bitmaps from my library to the stage AS3?

2008-06-19 Thread Eduardo Omine
IIRC, because your LibImage extends BitmapData, it needs the 2 parameters required by the BitmapData constructor (width and height). var formatImg = new LibImage(10, 10); http://www.kirupa.com/forum/showthread.php?p=2113725 -- Eduardo Omine http://blog.omine.net/ http://www.omine.net/

Re: [Flashcoders] How to add bitmaps from my library to the stage AS3?

2008-06-19 Thread Ashim D'Silva
When you call a Library class (eg:LibImage()), you need to give it 2 parameters which represent the width and height of the BitmapData class. Here however, they dont do anything. So simply call :: new LibImage(0, 0); 2008/6/20 jonathan howe [EMAIL PROTECTED]: Here's the function I use (it uses