In 1.5, themes are a linker trick.  Basically, the default version of a
symbol is substituted at the last second for a themed version of the
same symbol.  Its pretty evil.

AS2 semantics were "don't redefine a class that is already defined" when
a new SWF is loaded as a child.

I would thus expect that when you dynamically load a second app, that
second app may well end up as a mishmash, where classes already defined
in the parent that were themed are also themed in the child, but classes
that are only in the child are not themed.  However, anything that uses
simple assets (attachMovie) probably stays within the context of a
single SWF, because there is no cross-SWF asset reference in FP7.

So anyway, there is no runtime theme application.  It only works at link
time, and only for the app you defined it on.

> If I specify the theme for app2.mxml also, then loader fails to load 
> app2.mxml.

What happens?  That's kinda odd.  If you're consistent, everything
should work.

One (ugly) possibility is that you might create some RSLs that have your
theme baked in, and have your server provide a different SWF for a given
URL based on some other parameter.  

Sorry I don't have better news, but this whole area was really sketchy
in Player 7, so what little theme support we added took a lot of magic.
Things should be much better in Flex 2/FP8.5 , hopefully.  It should be
possible (although we aren't exploiting this) to build an entire runtime
skinning system for an 8.5 app.

-rg


> -----Original Message-----
> From: flexcoders@yahoogroups.com 
> [mailto:[EMAIL PROTECTED] On Behalf Of bss_rao
> Sent: Monday, January 09, 2006 12:38 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Theme and Loader
> 
> Hi, 
> 
> There is a problem in loading an external mxml using loader control 
> when there is theme set in application tag. It never gets initialized.
> 
> Here is the sample scenario,
> 
> There are two flex applications, app1.mxml and app2.mxml.
> 
> I have applied a theme (mac / XP / pulseBlue etc) for app1.mxml in 
> application tag using theme attribute.
> 
> I created a loader control which will load app2.mxml which does not 
> have any theme specified.
> 
> It fails to apply the theme that was specified in app1.mxml to 
> app2.mxml.
> 
> If I specify the theme for app2.mxml also, then loader fails to load 
> app2.mxml.
> 
> To apply the theme to app2.mxml also what should be done?
> 
> Cheers,
> BSS
> 
> 
> 
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.com 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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/
 


Reply via email to