PDA

View Full Version : cross script


kifah
08-05-2007, 04:37 PM
Hello all

I have two SWF files :
swf1

public function play():String
{
Security.allowDomain('*');
Alert.show("I am in SWF 1");
return "kifah";
}
and swf2
public var urli:URLRequest=new URLRequest("SwfDispatcher.swf");
loader.load(urli); loader.contentLoaderInfo.addEventListener(Event.CO MPLETE,loaderHandler);
public function loaderHandler(e:Event):void
{
//e.target.content.flexApp=this;
//e.target.content.play();
}
How can I call Play method in swf1 from swf2 ??:rolleyes:

HW2002
08-06-2007, 07:06 PM
You need to add event to the loader!

kifah
08-07-2007, 05:08 PM
Actually I didn't forget to add listner I forgot to post it here ..
but even if with listner the Cross script doesn't work .

any other advice ..
thanks