You could look into LocalConnection
On May 26, 2009, at 3:12 AM, José Maria Barros wrote:
Hi.
I have a timeline with some actions to load different swfs.
WHen i load other swf, i want to asign an action to a movieclip
that is in
that swf.
How can i access it from the main timeline??
Here is the code:
function seuCorpoLink(event:MouseEvent):void {
var seuCorpo:LoadFile=new LoadFile("seucorpo.swf",txtPct);
removeChild(objecto);
this.addChild(seuCorpo);
seuCorpo.x=317;
seuCorpo.y=348;
objecto=seuCorpo;
}
Basically, i have a serie of buttons in the timeline that call
different
swfs.
When i click one of them, it calls the specific swf.
That specific swf is loaded successfully but what i want is to add
an event
listener to a movieclip that is located in the specific swf, to
call other
swf.
I tried this(after objecto=seuCorpo)
this.seuCorpo.mc_to_open_other_swf.addEventListener(MouseEvent.CLICK,
callOtherSWF);
But it fails...(TypeError: Error #1010: A term is undefined and has no
properties.)
Here is the function that is in the main timeline:
function callOtherSWF(event:MouseEvent):void {
var marcar:LoadFile=new LoadFile("other.swf",txtPct);
removeChild(objecto);
this.addChild(marcar);
marcar.x=317;
marcar.y=348;
objecto=marcar;
}
--
Atentamente,
José Maria Barros
+351 96 572 61 24
--
José Maria Barros
+351 96 572 61 24
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Karl DeSaulniers
Design Drumm
k...@designdrumm.com
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders