5 Replies Latest reply on Mar 9, 2010 11:42 AM by kglad

    Need SWF to accept FLV source at runtime from flashvar

    Adobe Matt

      Hi I need to build an SWF with a FLVPlayback component that gets its
      FLV source from flashvars pased in at runtime via javascript.

       

      This  is the code I am using on the page:

                       <script type="text/javascript"  src="../../../js/swfobject2.js"></script>
                        <script type="text/javascript">
                                var flashvars = {};
                               flashvars.dSource =  "rtmp://www.xxxxx.com/live/xxxx"; 
                               var params = {};
                                params.scale = "noscale";
                               var attributes  = {};
                               swfobject.embedSWF("swfObj.swf",  "mediaspace", "550", "400", "9.0.0", false, flashvars, params,  attributes);
                       </script>

       

      Using  swfobject 2.2

       

      I need a full example of the Actionscript 3  part of this.

       

      I have only this in my Flash file

       

      if(root.loaderInfo.parameters["dSource"]  != null)
               mattVid.contentPath =  root.loaderInfo.parameters["dSource"]

       

      when I compile I get:

       

      1119: Access of possibly undefined property contentPath through a

       

      reference with static type fl.video:FLVPlayback.