I got the same error message. Do you have any luck?
Thank you.
Lance Linder <[EMAIL PROTECTED]> wrote:
Lance Linder <[EMAIL PROTECTED]> wrote:
I will have to give this a try again. The first time I tried something like this I received cast errors saying that I couldnt cast type Bitmap to type Class. I havent seen anything in the docs about this but I will dig some more in hopes there is something in there.Thanks,Lance
From:[email protected] [mailto:[email protected] ] On Behalf Of JesterXL
Sent: Monday, July 17, 2006 10:27 PM
To:[email protected]
Subject: Re: [flexcoders] Re: Change graphical skin of a button control at runtime?There should be an example in the docs.- use Loader; load in the bitmap- cast the loader.content to Class- pass that in as:my_btn.setStyle("upSkin", loadedContent);----- Original Message -----From: Lance LinderSent: Monday, July 17, 2006 7:07 PMSubject: RE: [flexcoders] Re: Change graphical skin of a button control at runtime?Nice example. Only thing is that you have to embed all resources even if they arent used. Also adding resources would required a recompile.So far I have gotten to the point that I can load in a CSS file at run time and change styles but I havent figured out a way to load in even a JPG at runtime and use as a new skin without embedding it in the application.Lance
From:[mailto: [email protected] ] On Behalf Of Tim Hoff [email protected]
Sent: Monday, July 17, 2006 5:19 PM
To:[email protected]
Subject: [flexcoders] Re: Change graphical skin of a button control at runtime?Hi Guys,You can change styles at run-time by changing the styleName property, or by using setStyle(). Styles can be mxml tags or declared in CSS.<mx:Style>.myCustomButton1 {overIcon:Embed("overIconImage1.gif");upIcon:Embed(source="upIconImage1.gif");downIcon:Embed(source="downIconImage1.gif");}</mx:Style><mx:Style>.myCustomButton2 {overIcon:Embed("overIconImage2.gif");upIcon:Embed(source="upIconImage2.gif");downIcon:Embed(source="downIconImage2.gif");}</mx:Style><mx:Button id="myButton" label="Icon Button" styleName="myCustomButton1"/>Change in AS at run-time:myButton.styleName = "myCustomButton2";-TH
--- In, "Lance Linder" <[EMAIL PROTECTED]> wrote: [email protected]
>
> I have been looking into this exact same thing for the last couple of
> days and I haven't found a way to do it yet either. Seems like this
> isn't possible but maybe there is some obscure way of doing it that I
> haven't tried yet?
>
>
>
> ________________________________
>
> From:[mailto: [email protected] ] On [email protected]
> Behalf Of user_abcxyz
> Sent: Monday, July 17, 2006 3:34 PM
> To:[email protected]
> Subject: [flexcoders] Change graphical skin of a button control at
> runtime?
>
>
>
> Is it possible? I want to allow the user at runtime can change the
> existent graphical skin of a button, however I am not sure if it's
> possible in Flex. Please help and give me some snippet code to
> demonstrate.
>
> Thank you.
>
Yahoo! Music Unlimited - Access over 1 million songs. Try it free. __._,_.___
--
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
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
Reply via email to

