This content has been marked as final. Show 7 replies
So this isn't a preloader by the usual definition... you would have a preloader= in your application defintion. There is an article at Ted on Flex about how to make a custom preloader for Flex. You will most likely need to use Loader to load the bytes of the swf, which is embedded as an octet-stream, as none of the Flex components would be initialized at the time of preload, since many of them wouldn't have even been downloaded.
Hi, to clarify...I'm not trying to preload the flex app, I'm just preloading the swf inside it. I hope that helps.
Or, you can export your swf as a custom component and import that into your application. You'll have access to all properties, methods and events.
That's not really true. You can access the members of an embedded SWF, you just need to embed it as an octet-stream and use Loader.loadBytes:
I stand corrected. The irony is that I've actually used this method (octet-stream) of embedding in a project about a year ago (after seeing how Ted Patrick used it), but had completely forgotten about it.
Excuse the bum info.
Yea, this is really such a frequent question, it begs the question why you have to do some weirdness for each different style of embed:
1) Load external loaded SWF
2) Load external loaded Flex App
3) Embed swf
4) Embed Flex App
When I get a chance next week, I may try and put together a custom component that handles all of the details for these various issues, and answers this, one of the most common questions on this board, once and for all....or at least a guideline page or something.
For the truly curious, the example above is from a Flash menu given to me by my client that I had to integrate into my Flex app for http://hugosayit.com The change_menu call is made in response to a user clicking a link not in the menu that takes them to another menu page.