-
1. Re: calling function from child to child?
Hakan KIRIK Dec 9, 2010 2:59 AM (in response to Petteri_Paananen)yes, it's possible.
You have to use the Loader.content for one child and cast it as a movieClip.
Here is an example of how you can control a loaded child from the main.swf:
http://www.flashdersi.com/flash/default.htm#ders61
And that's what you have to do:
in main.swf you add child1 like :
..
..
var loader:Loader=new Loader();
var child1:MovieClip;
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,fComp);
function fComp(evt:Event)
{
child1=loader.content as MovieClip;
}
loader.load(new URLRequest("child1.swf"));
addChild(loader);
...
..
and in child2.swf use this code:
MovieClip(this.parent).child1.videoClipName.stop();
Maybe you need to use
MovieClip(this.parent.parent.parent.......).child1.videoClipName.stop(); (depends on where you use the code in the child2.swf)
I'm sure it wont work at the first try, just trace what you get with this.parent or this.parent.parent etc... and find the right expression.
-
2. Re: calling function from child to child?
Petteri_Paananen Dec 9, 2010 5:21 AM (in response to Hakan KIRIK)thanks, I´ll give it a try....=)

