I've gotten this working with fonts but I haven't tried it with other types of assets yet so I don't know if there's a difference.  If you serach the flexcoders archive for "Embedding fonts at runtime" you should find an example that works.  Also, to use GetDefinition, the class you are retreiving must be linked to the project, which I don't think happens automatically when the external swf is loaded (someone should tell me if I'm wrong about this point).  I found that before I could use a font I had to register the font with the Font class.

This should be a start for you.

- Dan

On 10/5/06, mitchgrasso <[EMAIL PROTECTED]> wrote:
I am trying to use SWFLoader to import an external Flex-generated SWF
into my main Flex app. The external SWF has an embedded font which I
want to be able to use from the main app as well.

I know there are apparent limitations with dynamically embedding assets
but is this method possible? The documentation leads me to believe that
it should be possible to access the embedded assets within an external
SWF within the same ApplicationDomain but I haven't been successful in
getting this to work (not to mention that the sample code for
GetDefinition doesn't seem to work correctly). Are fonts treated
differently than other embedded assets? Assuming I can even get the
embedded font class out of the external SWF, how would I then reference
it in a style?

I have seen the discussion and solution using RSL components which
leads me to believe this could be possible...

thanks

Mitch Grasso






--
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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED]
    mailto: [EMAIL PROTECTED]

<*> 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/




__._,_.___

--
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