4 Replies Latest reply on May 29, 2009 10:39 AM by SDG-QD

    ActionScript for FLVPlayback with FlashVars


      As per kglad-tFIqSg's helpful newbie-tip in this discussion, I'm trying to use FlashVars to pass a FLV path from html a FLVPlayback instance. I get how this is supposed to work, but I can't find any good documentation on the needed ActionScript.


      The closest thing I could find was a discussion about a script that looked something like this:


      //Import flvplayback library
      import fl.video.*;


      //Init vars
      var myFlashVar:String;
      var my_FLVPlybk = new FLVPlayback();


      //Add new element


      //New element properties
      my_FLVPlybk.x = 0;
      my_FLVPlybk.y = 0;
      my_FLVPlybk.height = 500;
      my_FLVPlybk.width = 750;


      //Skin import
      my_FLVPlybk.skin = "skin.swf"


      //Flashvars code
      var varName:String;
      var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
      for (varName in paramObj) {     myFlashVar = String(paramObj[varName]);


      //Placed in html
      params my_FLVPlybk.source = myFlashVar;


      which seems like it might be close, but not right.


      Anyone know how to do this, or have a link to a resource or tutorial that explains it?