Solved

Flashvars and FLV

Posted on 2009-04-11
3
367 Views
Last Modified: 2013-11-11
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
Comment
Question by:steverguy
3 Comments
 
LVL 5

Expert Comment

by:john_hollings
ID: 24127013
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
 
LVL 8

Accepted Solution

by:
wal_toor earned 500 total points
ID: 24137366
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
 
LVL 1

Author Closing Comment

by:steverguy
ID: 31569164
Thanks, that was it. :)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now