You can't cast a Class to a Bitmap.  You need to do BitmapAsset(new c()).
 
-rg


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of joshuajnoble
Sent: Monday, October 30, 2006 10:18 AM
To: [email protected]
Subject: [flexcoders] Re: Get BitmapData from symbol in SWF file?

Sorry, this somehow got cut off and came out completely incoherently.
What I meant to write is:

var c:Class = (SessionLocator.getSession().assets[bgImage] as Class);
var b:Bitmap = Bitmap(c as Bitmap);
if(icon != null) {graphics.beginBitmapFill(icon.bitmapData);

I've tried using BitmapData, BitmapAsset, and Bitmap. Any ideas or advice?

--- In [EMAIL PROTECTED]ups.com, "joshuajnoble" <[EMAIL PROTECTED]> wrote:
>
> I'm trying to get BitmapData from an icon in a swf file that is
> referenced as a class. I need to get the BitmapData so that I can use
> the 'beginBitmapFill' from the Graphics. Here's what I'm trying to do
> (which doesn't work at all, btw)
>
> var c:Class = (SessionLocator.getSession().assets[bgImage]
> as Class);
> var b:Bitmap = Bitmap();
> var icon:BitmapAsset = BitmapAsset(b);
> if(icon != null)
> {graphics.beginBitmapFill(icon.bitmapData);
>

__._,_.___

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





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to