Hi, I am trying to load in an External SWF inside my Flash file and have only been able to load one successfully. I am loading the one successfully through doing…
var request:URLRequest = new URLRequest(“http://www.brianhauser.com/550/mouse_draw.swf”);
public function NewPortfolio():void{
loader.load(request);
bkground.addChild(container6);
container6.addChild(loader);
container6.x= 100;
container6.y= 200;
… so my issue is I can’t add more than 1 external SWF to my MovieClip and then I have to position it so its x=100, y=-2160 on my bkground movie clip because my background movie clip is larger than my stage(viewable area) in flash because I am using an external tween class through Caurina.
URL Requests
So I tried an alternate method of getting URL’s on the click of a movie clip and it didn’t work. Below is the code I used. I know the links aren’t working yet because I don’t have those SWF’s uploaded as of yet. If you know of any better ways to do this please let me know…
public function NewPortfolio():void{
one.addEventListener(MouseEvent.CLICK, onMouseClickOne);
two.addEventListener(MouseEvent.CLICK, onMouseClickTwo);
three.addEventListener(MouseEvent.CLICK, onMouseClickThree);
play_sensor.addEventListener(MouseEvent.CLICK, onMouseClickPlay);
public function onMouseClickOne(e:MouseEvent):void{
var request:URLRequest = new URLRequest(“http://www.brianhauser.com/550/web/one.swf”);
navigateToURL(request, “_blank”);
}
public function onMouseClickTwo(e:MouseEvent):void{
var request:URLRequest = new URLRequest("http://www.brianhauser.com/550/web/two.swf");
navigateToURL(request, "_blank");
}
public function onMouseClickThree(e:MouseEvent):void{
var request:URLRequest = new URLRequest("http://www.brianhauser.com/550/web/three.swf");
navigateToURL(request, "_blank");
}
function onMouseClickPlay(e:MouseEvent):void{
var request:URLRequest = new URLRequest("http://www.brianhauser.com/550/fish.swf");
navigateToURL(request, "_blank");
}
Thanks for your help is you have any questions please email me at [email protected]