0
votes

So this is similar to a problem I had a few days ago, but not quite the same. If I try to load an external SWF, it loads all right, but I can't see anything! There are buttons in this external SWF, and I can click the buttons and they work, so the SWF is there and functional, I just can't see any of it (the screen is completely white). Also if I click the button, IT appears (with the active frame of its animation) but nothing else does. The audio also plays on its cue. Everything seems to work except that it's invisible.

This is the relevant code:

private var myLoader:Loader = new Loader();
private var url:URLRequest = new URLRequest("../lib/Introduction.swf");
private var introdummy:Sprite;

(different method)

introdummy = new Sprite();
addChild(introdummy);
myLoader.load(url);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, introLoaded); 

function introLoaded(event:Event):void 
{ 
     introdummy.addChild(myLoader.content);  
}
2
Everything works, audio plays, but it's invisible?! You can click buttons, but they are invisible?! - Andrey Popov
Yep. The buttons are there, but I can't see them. No clue why. :/ - User15937
try the ProLoader Class instead of the Loader. Also, are both swf compiled with same version? - M4tchB0X3r
ProLoader did the same thing. Versions are different though: the main SWF is version 10 and the external SWF is version 20. - User15937
that'll be the problem then i reccon. why would you load a "newer" swf into an ancient one? Compile the Main swf with the latest version and see what happens. obviously it would be best to be up to date on both, since your still in development stage. - M4tchB0X3r

2 Answers

0
votes

OK, you all are going to laugh your butts off when you see what was wrong...

My main SWF has a white background. My external SWF has a black background, and all the text on it was white. When I imported the SWF in, the background showed the main SWF's background. So all the text showed as white on a white background, so it was invisible. :/

0
votes

add your swf file like this:

introdummy.addChild(myLoader);