|
From: innovation_sanjay on 6 May 2008 05:41 Hi, I have created following embedded code <object width='576' height='353' ID="Object1" VIEWASTEXT> <param name='movie' value='http://invind05/Rohit2/find_url.swf' /> <param name='wmode' value='transparent'/> <embed src='http://invind05/Rohit2/find_url.swf' width='576' height='353' type='application/x-shockwave-flash' wmode='transparent'/> </object> This code will be used by client on any http:// xyz/abc.html. Iwant to get the url where the above .swf file is used. I donot want to add Java Script function in the embedded code. import flash.external.ExternalInterface; import mx.controls.Button; import mx.controls.TextInput; System.security.allowDomain("*"); import mx.video.*; var objVideo:FLVPlayback; objVideo.contentPath = "audi.flv"; objVideo.skin = "http://invind05/Rohit2/MojaveExternalAll.swf" var myButton:Button ; var myTextInput:TextInput; var urlPath:String ; myButton.addEventListener("click",getClientUrl); function getClientUrl():Void { //myTextInput.text = String(ExternalInterface.call('getURLParam')); myTextInput.text = String(ExternalInterface.call('window.location.href.toString')); var abc = ExternalInterface.call('window.location.href.toString'); myTextInput.text = abc; }
|
Pages: 1 Prev: Problem to create MXP with help files Next: Beware of Zoomify and Flash CS3! |