<mx:Application marginLeft=”0” marginTop=”0” marginRight=”0” marginBottom=”0”>
<mx:VBox width=”100%” height=”100%” id=”myBackground”>
<mx:VBox>
</mx:Application>
With setStyle calls pointing to the VBox, not the application. (e.g. myBackground.setStyle(‘backgroundColor’, 0xFF0000); )
Sorry for being so sneaky.
-Peter
On 1/25/06 1:42 PM, "Kevin Ewok" <[EMAIL PROTECTED]> wrote:
I've spent a lot of time researching this issue within flexcoders,
Google, and iteration::two book and still no luck.
I'm basically trying to replicate what the Flex Style Explorer
(http://weblogs.macromedia.com/mc/archives/FlexStyleExplorer.html)
does where a user can choose their own background and styles.
I cannot get this to work for the life of me. I've read everywhere
that once you declare a theme, that's it. You can't dynamically swap
in a new one. In my code below, I'm basically trying to swap
background images but it won't work. Any ideas?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" >
<mx:Script>
<![CDATA[
function changeStyle() : Void
{
mx.styles.StyleManager.styles.global.setStyle("background-image",
'backgrounds/redStripe.swf');
}
]]>
</mx:Script>
<mx:Style>
global { background-image: 'backgrounds/industrial.swf';
font-family: Helvetica; font-size: 12pt}
</mx:Style>
<mx:Panel>
<mx:Button label="Change Image!" click="changeStyle();"></mx:Button>
</mx:Panel>
</mx:Application>
I also tried in my method passing in the following 'myRedBG' embedded
image var and that didn't work either.
[Embed(source="backgrounds/redstripe.swf")]
var myRedBG:String;
Thanks in advance for any help. I even tried this with basic
background coloring changes and couldn't get it to work so I feel I'm
missing something fundamental here.
--
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 <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQa> Computer software development <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1l> Software design and development <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9A>
Macromedia flex <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZI36cYzBjw> Software development best practice <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=f89quyyulIDsn>
YAHOO! GROUPS LINKS
- Visit your group "flexcoders <http://groups.yahoo.com/group/flexcoders> " on the web.
- To unsubscribe from this group, send an email to:
- [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .
8888/ \8888® PETER BAIRD
888/ \888 User Experience Consultant
88/ / \88 Adobe Consulting | Adobe Systems, Inc
8/ /8\ \8 275 Grove St. Newton, MA
/ /888\ \ Office: 617.219.2126 | Cell: 617.803.6804
\8\ AIM: pbaird00 | Y!IM: pbaird00
--
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.

