1 Reply Latest reply on May 17, 2007 1:32 PM by sly one

    Dynamic FLV content path

    Rectallinear
      I'm currently displaying a Flash Video (instance name = vid) through a movie clip (instance name = top) in my FLA with this actionscript:

      top.vid.contentPath = "0207.flv";

      It works fine. But now I need to figure out how to make the content path dynamic. A variable will be added to the SWF's parent HTML file like this:

      <param name="movie" value="test.swf?videoDate=0207" />

      The goal is to make an SWF file that can play any FLV file based on the value of the videoDate variable. So if videoDate=0207, then the SWF will play 0207.flv. If videoDate=0307, then the SWF will play 0307.flv. And so on.

      I can see how this should work, but I'm just not enough of an actionscript badass to know exactly how to code it. In plain English, I think I need something like this:

      videoArray = value of videoDate variable from HTML + .flv extension

      top.vid.contentPath = videoArray


      Any help would really really be appreciated.