2 Replies Latest reply on May 6, 2008 11:59 PM by silentC

    FLVPlayback - How to specify fla source at runtime

      I'm a total newbie with Flash.

      We want to host video on our site. The video to be viewed is selected by the user. I wanted to use the FLVPlayback component to display the video by specifying the source URL of the .fla file at runtime in the HTML page code. I've no idea how to access the source property at runtime in the object tag or whatever. Obviously I need to learn Actionscript to understand it properly, but can anyone give me a simple example of how it would be done, or point me to a tutorial on it?

      The object tag looks like this:

      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="550" height="400" id="viewer" align="middle">
      <param name="allowScriptAccess" value="sameDomain" />
      <param name="allowFullScreen" value="false" />
      <param name="movie" value="viewer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="viewer.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="viewer" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer" />

      There's also a javascript function:

      'codebase', ' http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
      'width', '550',
      'height', '400',
      'src', 'viewer',
      'quality', 'high',
      'pluginspage', ' http://www.macromedia.com/go/getflashplayer',
      'align', 'middle',
      'play', 'true',
      'loop', 'true',
      'scale', 'showall',
      'wmode', 'window',
      'devicefont', 'false',
      'id', 'viewer',
      'bgcolor', '#ffffff',
      'name', 'viewer',
      'menu', 'true',
      'allowFullScreen', 'false',
      'movie', 'viewer',
      'salign', ''
      ); //end AC code

      Is it a matter of dropping in some code here, or do I need to modify my viewer.swf to accept the parameter?