That looks ok to me at first glance.  What error do you get in this case?  Are you sure that bgImage is a bitmap?  (If you're using Scale-9, it will be a SpriteAsset, for example.)
 
-rg


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of joshuajnoble
Sent: Monday, October 30, 2006 1:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Get BitmapData from symbol in SWF file?

--- In [EMAIL PROTECTED]ups.com, "Roger Gonzalez" <[EMAIL PROTECTED].> wrote:
>
> You can't cast a Class to a Bitmap. You need to do BitmapAsset(new
> c()).
>

Hi Roger,

I had given that a try but got type casting errors then too. I'm not sure what's wrong with it
since this is basically right out of the documentation for
BitmapAsset. Here's what I tried:
var c:Class = SessionLocator.getSession().assets[bgImage];
var icon:BitmapAsset = BitmapAsset(new c());

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