I want to create a flip effect button, on click event of which a external swf should be opened removing all the contents of current swf. I have created both components, a button and also a movieclip. Neither of its load ( new URLRequest()) code working. Below is the complete code I am using. Where btn2 is class name of my movie clip and 2.swf is external swf I want to load.
stop();
var bc2:btn2 = new btn2();
bc2.buttonMode = true;
bc1.addEventListener(MouseEvent.CLICK, mouseClick);
var loader = new Loader();
function mouseClick(event:MouseEvent): void {
loader.unload();
loader.load(new URLRequest("2.swf"));
addChild(loader);
}