Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FlashVars

Status
Not open for further replies.

mobius1983

Technical User
Jul 7, 2002
45
0
0
GB
Hi Everyone,

I have a flash file, that imports an xml file. This is dispayed embeded in an asp page. The asp page gets the data out of a datbase and creates the xml file before it calls the flash movie. Because I want several users to be using this page at once I want to pass to the flash file the name of the xml doc created.

My flash file works fine if I hard code the name of the xml file. But as soon as I replace the hard coded name with the variable name passed using FlashVars it fails.

My code is:

asp/html -
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase=" border="0" width="563" height="365">
<param name="movie" value="ftrack.swf">
<param name="quality" value="High">
<PARAM NAME="FlashVars" VALUE="read_file=testData.xls">
<embed src="ftrack.swf" pluginspage=" type="application/x-shockwave-flash" name="obj1" width="563" height="365"></object>


flash -
doc.load(read_file);

I really hope someone can help.
Thanks to everyone that has taken the time to read through this!

Cheers
Nick
 
try

<param name=FlashVars VALUE="read_file=testData.xls"/>

as i suspect your syntax may be wrong
 
Hi Bill,

Thanks so much for your reply. I suspected that it would be my syntax that was wrong somewhere, I am pretty new to flash and xml.

I have tried the change you suggested and it hasn't made a difference.

Thanks again.
Nick.
 
Hi,

A couple of things to check. Are you using flash v6 player upwards (only valid from v6+)

Are you using IE to check the page (As your not including the correct syntax for netscape/mozilla/firefox etc)

Are you publishing your movie as Action Script 2 or 1, as this will effect the case sensitivty of your movie...

try in the flash

doc.load(_root.read_file);

if your using a preloader or loadmovie...

Digital Soma
 
Firefox doesnt use the param areas of an object (i think).

to get around it use the embed tag to add your FlashVars in after the movie name using '?'.

example:

<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase=" border="0" width="563" height="365">
<param name="movie" value="ftrack.swf">
<param name="quality" value="High">
<PARAM NAME=FlashVars VALUE="read_file=testData.xls">
<embed src="ftrack.swf?read_file=testData.xls" pluginspage=" type="application/x-shockwave-flash" name="obj1" width="563" height="365"></object>

give that a whirl and see if it works.

: D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top