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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing data from dreamweaver to flash 1

Status
Not open for further replies.

afx

Programmer
Mar 4, 2004
27
CA
I have a dreamweaver mx 2004 page with a file field. An upload button (uses Pure ASP Upload 2.17) that uploads the file. I then call a "success.html" and load a Flash .swf.

How can I pass the file name from the file field to Flash so that Flash's ActionScript can pick it up and perform other operations using the file name.

regards
Mark H., AFX
 
To pass a variable from an HTML document to a Flash Player movie, simply append it in the URL, for example:

Code:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[URL unfurl="true"]http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"[/URL] name="main" width="900" height="600" id="main">
  <param name="movie" value="[b][red]main.swf?myMessage=Thank%20You%20For%20Uploading[/red][/b]" />
  <param name="QUALITY" value="high" />
  <embed src="[b][red]main.swf?myMessage=Thank%20You%20For%20Uploading%21[/red][/b]" width="900" height="600" name="main" quality="high" pluginspage="[URL unfurl="true"]http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"[/URL] type="application/x-shockwave-flash"></embed> 
</object>

The variable could then be accessed as _level0.myMessage
and it would have the value "Thank You For Uploading!"

I REALLY hope that helps.
Will
 
Wow. That's so easy - I searched for ages in books/web and still couldn't find it. Thanks for ending my search!

regards
Mark H., AFX
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top