I’m experiencing a strange problem. I have a .swf supplied from a client (let’s call it client.swf). If I play the stand-alone client.swf, the sound plays.
I have loaded client.swf successfully into my own project. The code I used to load client.swf is as follows:
var request:URLRequest = new URLRequest("client.swf");
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
function loadProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
percentLoaded = Math.round(percentLoaded * 100);
trace("Loading: "+percentLoaded+"%");
}
function loadComplete(event:Event):void {
trace("Complete");
}
loader.load(request);
videoHolder.addChild(loader);
videoHolder is an empty movieclip in my project. This is all that is in the file currently (one empty movie clip, and code to load client.swf into that movieclip). When I test the file, client.swf plays fine, but the sound is missing. Does anybody know what the problem could be?