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

后端 未结 3 604
情深已故
情深已故 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 00:59

    I've been wasted all the day long for that...

    AS3:

    var uid:String;
    // your code
    this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
    // your code
    function loaderComplete(e:Event=null):void
    {
        var fv = stage.loaderInfo.parameters;
        uid = fv['uid'] || "'uid' not found";
    }
    

    HTML:

    
    
    
    
    
    

提交回复
热议问题