Copy link to clipboard
Copied
I'm trying to insert a external SWF file into an existing fla. presentation, I can insert the swf, but when I try to change location I can't change it.. and also after the external swf loses the interaction it has!
import flash.display.*;
import flash.net.URLRequest;
var rect:Shape = new Shape();
rect.graphics.beginFill(0xFFFFFF);
rect.graphics.drawRect(0, 0, 100, 100);
rect.graphics.endFill();
addChild(rect);
var ldr:Loader = new Loader();
ldr.mask = rect;
var url:String = "360ProductViewerFX.swf";
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
addChild(ldr);
thanks in advance!
Copy link to clipboard
Copied
What code were you trying for changing location?
Copy link to clipboard
Copied
Hi Ned,
I'm trying to change the position of the swf object loaded on the rectangle generated by the code!
Copy link to clipboard
Copied
You can change the location of the Loader.
Copy link to clipboard
Copied
Sorry Ned, I was trying it but it didn't worked.. maybe i didn't explain right what i needed.. and also I found a new code that is easier to do what I want..
I have a pre made presentation in flash and I want to insert an external SWF ( this swf is a rotating picture that permits to see a product 360 view.) now I can import and locate in the stage the loaded object but I can't acess the interaction the file as then.. can you please help me understanding the code to do this?
var myLoader:Loader = new Loader();
var url:URLRequest = new URLRequest("rotateTool.swf");
myLoader.load(url);
addChild(myLoader);
myLoader.x = -1000;
myLoader.y = -300;
this is what i'm using now, and it loads the swf I can see it and locate it on the stage but then the interaction is gone.. Please help this is a very important thing that I would like to resolve, but I think I don't have the coding skills to do it..
Find more inspiration, events, and resources on the new Adobe Community
Explore Now