0
votes

When I try to display an external SWF, the audio plays, but the display is nothing but a big white screen. I can load the SWF directly from the project library and it loads with video, so I know the SWF is good. I know the SWF is there because the audio is playing, but I can't understand why the video is not showing up.

Here's my code:

[Embed(source = "../lib/Destiny_Introduction.swf", mimeType = "application/octet-stream")]
public var introClass:Class;

======lots of irrelevant code in between========

var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
context.allowCodeImport = true;
var loader:Loader = new Loader();
loader.loadBytes(new introClass(), context);

I've tried a bunch of stuff including adding the loader to a MovieClip and adding that as a child, adding the loader's content as a child, Event.COMPLETE calls, a combination of all three, but they all yield the same result. What I have noticed is that the width and height of the loader is zero, as was those of the MovieClip when I tried adding the loader to that, so that may have something to do with it, but other than that, I'm totally lost.

1

1 Answers

0
votes

Try changing mimeType to symbol like so,

[Embed(source = "../lib/Destiny_Introduction.swf", symbol="LinkageIdentifierInSourceSWF")]
public var IntroClass:Class;

var scene1:MovieClip = new IntroClass();
addChild(scene1);
scene1.play();