Hello, I have a strange problem with a external swf file loaded with Loader
Class. The problem is that the buttons inside of the swf don't work (no
click, no rollover..), however if I test it in local environment, it works
perfectly. In addition, if I start Charles or Service captures, the swf
works perfectly on the web.
I think it would be SandBox trouble, but I don't understand why with a HTTP
sniffer, It works always.
I post a piece of code:
public function load(skin:String):void
{
var request:URLRequest = new URLRequest(skin);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
ioError);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,completeHandler);
try {
loader.load(request);
}catch (error:SecurityError) {
trace(error);
}
}
private function completeHandler(event:Event):void
{
skin_content = MovieClip ( loader.content );
this.addChild(skin_content);
this.loadButtons();
this.registerEvents();
dispatchEvent(new
SkinEvent(SkinEvent.SKIN_EVENT,SkinEvent.SKIN_LOADED,null));
}
public function registerEvents():void
{
this.play_button.addEventListener(MouseEvent.CLICK,playButtonHandler);
this.pause_button.addEventListener(MouseEvent.CLICK,pauseButtonHandler);
this.stop_button.addEventListener(MouseEvent.CLICK,stopButtonHandler);
this.seek_handle.addEventListener(MouseEvent.MOUSE_DOWN,
seekDownHandler);
this.mute_button.addEventListener(MouseEvent.CLICK,setMuteHandler);
}
I ve tried to load with a loader.load(request,new
LoaderContext(false,ApplicationDomain.currentDomain)); but with the same
result.
If you want see it online, see http://www.canalculturatv.cat/. Is the player
controlbar. No button works. With Charles or Service Capture started, it
runs.