If you send more time googling then you'll find not only answers but examples as well:
And the list could continue. Good luck.
I've been to these websites already, and revisited them many times. I've tried the code (again) they have posted, but I get the same results.
But the SWFLoader seems to be the way to go. Only problem is the code I use with the loader class is done in with "ActionScript Project" instead of "Flex Project". The SWFLoader class doesn't seem to be available in "ActionScript Project". I'll try to recode in a new "Flex Project" so I can use the SWFLoader class. Rather annoying to recode, but thats the way it is I guess.
I tried again to use the example code from one of the commentees on this page http://www.dreaminginflash.com/2008/04/15/load-an-external-flex-swf-into-a-flash -project-and-comunite-with-him/ , but it only sometimes works, sometimes it will completely load without errors, other times I'll get errors like this one
TypeError: Error #1009: Cannot access a property or method of a null object reference.
These errors seem to come from "ActionScript Projects". Other swf that come from "Flex Projects" don't seem to have any problems at the most simple of tests.
A dumb question out of curiosity: why are you trying to load .swf files compiled in different environments into each other? Obviously, Flex is "more special" and there might be situations when things are not a "piece of cake" but if you don't have a strong reason to do so, then I'd suggest you spend max 1 more day trying to solve the problem and if you can't do it, then just to whatever you have to do in the same environment ( don't start mixing spagetti with pizza because the final result never turns out as one would expect ).
Some AS-only projects make assumptions that break when loaded by another SWF. Most commonly, the stage is not available right away
Flex SDK Developer
Adobe Systems Inc.