How do I access flashvars in AS3, and add them to an existing text field?

后端 未结 3 682
情深已故
情深已故 2021-01-19 00:12

Edit: I\'ve come to realize the main problem I\'m facing is that I want a text field that already exists in a movieclip or on the stage to take the string from a flashvar. F

3条回答
  •  终归单人心
    2021-01-19 01:07

    If you are still having this problem, follow below lines. I used flash vars, they work fine for me.

    My html script was:

    
    
    

    and my AS code to load vars is

    this.root.loaderInfo.addEventListener(Event.COMPLETE, SWFLoadComplete);
    private function SWFLoadComplete(e:Event)
    {
      obj=this.root.loaderInfo.parameters;
      trace(obj.uid , obj.name);  // outputs: 123 santhu
    }
    

提交回复
热议问题