I have a file to which I do not have the source - a flash header with an obnoxious sound intro and I need to mute all sounds. Without the source I am limited as to what I can do. I have some as3 code that I am using to try and load the swf into and mute(building in FlashDevelop). Here is the code in question:
package
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.media.SoundTransform;
import flash.net.URLRequest;
import flash.display.Loader;
import flash.media.SoundTransform;
public class Main extends Sprite
{
private var mLoader:Loader;
private var mc1:MovieClip;
private var holder:Sprite;
private var mSound:SoundTransform;
public function Main():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
var mRequest:URLRequest = new URLRequest('header_v8.swf');
mLoader = new Loader();
mLoader.load(mRequest);
holder = new Sprite();
holder.addChild(mLoader);
addChild(holder);
mSound = new SoundTransform(0);
holder.soundTransform = mSound;
}
}
}
This code above still plays the audio and the original swf is not being displayed. So, my questions are:
How would I mute the external audio? How would I display the external swf just as it does when viewing it directly?
Any suggestions or pointers to useful examples/documentation would be greatly appreciated