pass var values from one swf to another swf who is loaded inside the firts one in AS3

后端 未结 2 1868
自闭症患者
自闭症患者 2021-01-24 01:47

im using this method to load an SWF inside another SWF: (this code is inside main.swf)

function loadImage(url:String):void {
imageLoader = new Loader();
imageLoa         


        
2条回答
  •  借酒劲吻你
    2021-01-24 02:07

    You need to access the content of the loader to do this. In your imageLoaded function do this.

    ( e.target.content as Object ).someParam = "whatever";
    

    There are a number of security restrictions to consider, (This is called cross scripting), but if you are loading two swfs from the same domain, you shouldn't have a problem.

提交回复
热议问题