Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2008
    Posts
    104
    Thanks
    4
    Thanked 14 Times in 14 Posts

    Actionscript 3.0 loading variables from <paramater> tags

    hey all,

    I may just be being a bit blond here, but I can't work out how to import variables from the parameters defined in the HTML code...

    All I need to do is pass two strings to my flash video player - the src of the video, and the src of its HD equivalent.

    Many thanks
    Edd

  • #2
    Regular Coder
    Join Date
    Aug 2008
    Posts
    104
    Thanks
    4
    Thanked 14 Times in 14 Posts
    hey all,


    worked it out - same as Actionscript 2.0 method:

    Code:
    var keyStr:String;
    var valueStr:String;
    
    var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
    
    for (keyStr in paramObj) {
    valueStr = String(paramObj[keyStr]);
    
    
    }
    
    var video:String = String(paramObj['video']);
    var hdVideo:String = String(paramObj['hd']);
    quite amazed noone replied!

    Many thanks
    Edd
    Last edited by eddjc; 08-13-2009 at 10:05 PM. Reason: unnecessary code


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •