Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 395
  • Last Modified:

Flashvars and FLV

I'm using Flash 8 and trying to pass a video path to a FLVPlayback component.  I've set the instance name to vendorVid and the actionscript looks like this:
vendorVid.contentPath = theFile

In my html code i have:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="480" height="307" id="heritage" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="michigan/vendorvids/heritage.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#333333" />
<param name="theFile" value="http://myserver/video/thevideo.flv/smil" />
<embed src="vendorvids/heritage.swf" quality="high" bgcolor="#333333" width="480" height="307" name="heritage" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="theFile=http://myserver/video/thevideo.flv/smil" />
</object>

It doesn't load.  If i copy the file path and put it right in the swf, the video plays fine, so it's something with the way i'm passing or retreiving the flahsvars...  but i don't know what it is.

Any ideas?  Thanks!
0
steverguy
Asked:
steverguy
1 Solution
 
john_hollingsCommented:
Hi, couple of things.

Firstly, are missing the semi-colon at the end? (e.g.)

vendorVid.contentPath = theFile;

Second - I assume you are using AS2 and as far as I can tell this looks fine.  Can I suggest you make use of the trace() method to ensure that the flash variable is coming through.  Or add a dynamic text fields to your stage and send the variable to this text field, this way you will be able to clearly see if the path is coming though.  If there is any error it will be undefined.

0
 
wal_toorCommented:
Hello Steve,

Your param flashvars code is wrong. Use these instead:

<PARAM NAME=FlashVars VALUE="theFile=http://myserver/video/thevideo.flv/smil">

Hope this works for you.

greetz,
walter
0
 
steverguyAuthor Commented:
Thanks, that was it. :)
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now