Try this. Put this code in your Application:
function setupAppColor()
{
if(appColor == "blue")
{
setStyle("themeColor", "haloBlue");
}
else if(appColor == "orange")
{
setStyle("themeColor", "haloOrange");
}
else if(appColor == "green")
{
setStyle("themeColor", "haloGreen");
}
else if(appColor == "silver")
{
setStyle("themeColor", "haloSilver");
}
}
Call setupAppColor in your initialize. Then you can do:
http://localhost:8080/flex/your.mxml?appColor=blue
http://localhost:8080/flex/your.mxml?appColor=orange
http://localhost:8080/flex/your.mxml?appColor=green
http://localhost:8080/flex/your.mxml?appColor=silver
----- Original Message -----
From: "Jeff Steiner" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, May 24, 2005 11:07 AM
Subject: Re: [flexcoders] Possible to setStyle on the entire application?
Thank you very much.
Jeff
----- Original Message -----
From: "Richard Butler" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, May 24, 2005 2:24 AM
Subject: RE: [flexcoders] Possible to setStyle on the entire application?
> Jeff,
>
> mx.core.Application.application.setStyle("themeColor", 0xCCCCCC) should
> give you some joy...
>
> Unfortunately at runtime you can only change one style at a time, so if
> you're parsing a stylesheet it can be quite strenuous on the client
> machine's processing load, especially if you're changing a style that
> affects numerous components...
>
> Cheers,
> Rich
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Jeff Steiner
> Sent: 24 May 2005 07:10
> To: [email protected]
> Subject: Re: [flexcoders] Possible to setStyle on the entire
> application?
>
>
> ha....
>
> Sorry - I am looking to change them after the app has loaded.
>
> dynamically.
>
> Jeff
> ----- Original Message -----
> From: "Abdul Qabiz" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Monday, May 23, 2005 10:47 PM
> Subject: RE: [flexcoders] Possible to setStyle on the entire
> application?
>
>
> > Jeff,
> >
> > You can change the themeColor of entier app like this:
> >
> > <mx:Application themeColor="0xFF0000" ..>
> >
> > ..
> >
> > </mx:Application>
> >
> >
> > -abdul
> >
> >
> >
> > -----Original Message-----
> > From: [email protected] [mailto:[EMAIL PROTECTED]
> > On Behalf Of Jeff Steiner
> > Sent: Tuesday, May 24, 2005 11:00 AM
> > To: [email protected]
> > Subject: [flexcoders] Possible to setStyle on the entire application?
> >
> > Without using a setStyle for every single element in an app, is it
> > possible to change the theme-color of an application on the fly?
> >
> > Thanks,
> > Jeff
> > http://www.flexauthority.com
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/