| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Mar 2001
Posts: 10
|
This is my html code :
<html> <head> <title>Flash</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#000000"> <table width="600" border="0" height="500" align="center"> <tr> <td><object classid="clsid <param name=movie value="SCFlash.swf?querystr=<? echo $QUERY_STRING; ?>"> <param name="querystr" value="<? echo $QUERY_STRING; ?>"> <param name=quality value=high> <embed src="SCFlash.swf?querystr=<? echo $QUERY_STRING; ?>" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="600" height="500"> </embed> </object></td> </tr> </table> </body> </html> How I can pass querystr variable to my Flash so that I can later send it to php script. What code I have to write in Flash to retrieve querystr into Flash and pass it to php script. Thank you !!!! |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Mar 2001
Posts: 10
|
to be more clear:
I know this is possible. I just don't know where to begin to get it set up. I need to load some variables into a swf from a web url. I know I'll have to use cgi or php to append the variables to the url but then how do I get the variables into the SWF? http://www.someserver.com/index.phtml?querystr=1345pass Sending those variables into the swf - and from swf to php script how? Any help would be greatly appreciated- zex |
|
|
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2001
Location: eastcoast
Posts: 42
|
use loadVariables to send the vars back to the script.
|
|
|
|
|
|
#4 |
|
Registered User
Join Date: Mar 2001
Posts: 10
|
so should I just use querystr in Flash or I have to declare new variable... or I can see it in Flash form html code..
|
|
|
|
|
|
#5 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
If you're using PHP when you do this:
file.php?variable=value you get a variable called 'variable' defined in your PHP. So to pass it into the flash file mebeded in that PHP page all you have to do is use the same method of appending it to the embed code. Find the code that says: Code:
<EMBED src="files.swf" Code:
<EMBED src="files.swf?variable=<?php echo $variable ?>" page.php?test=Hello your embed string will come out like this file.swf?test=Hello then Flash (which can read values in from this sort of URL-line pass format) will read the variable 'test' in and set it's value to "Hello" Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
#6 |
|
Registered User
Join Date: Mar 2001
Posts: 10
|
Thank you Jesse for big help...
I just don't understand this part: "then Flash (which can read values in from this sort of URL-line pass format) will read the variable 'test' in and set it's value to "Hello" " How Flash reads it? automaticly or I have to declare new variable test in Flash and somehow pass it's value... Because I want that value later to pass to php script. Thank you one more time Jesse for helping me out. zex |
|
|
|
|
|
#7 |
|
Registered User
Join Date: Mar 2001
Posts: 10
|
thank U for help it ment a lot to me it works now!
Thank U one more time |
|
|
|
|
|
#8 |
|
Peak Studios Boulder, CO
Join Date: Mar 2002
Location: Boulder, CO
Posts: 203
|
To use this example to do the same thing in asp how would I need to change this script?
Thank you Quince Wyss |
|
|
|
|
|
#9 |
|
Large Member
|
Hi quincewyss
If you want pass an ASP variable to flash use this ![]() PHP Code:
|
|
|
|
|
|
#10 |
|
Registered User
Join Date: Dec 2002
Posts: 6
|
don't forget about the two places where the movie file name is called within object tag. it took me 1/2 hour to figure this out. hope to avoid this for future people reading this. thanks guys for the input.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Communication between flash and HTML | Mats-Lennart | ActionScript 1.0 (and below) | 4 | 02-04-2009 06:12 AM |
| The asfunction, flash html and large URLs ... | Reflex | ActionScript 1.0 (and below) | 1 | 07-09-2005 06:31 AM |
| Flash MX Developers Exam | VitiminJ | General Chat | 34 | 05-05-2004 02:27 PM |
| Php, Javascript, and Flash 5 browser detect and more! | Redline01 | Server-Side Scripting | 2 | 08-11-2001 02:09 AM |
| Please pass on your wisdom - HTML or Flash | dburwell | ActionScript 1.0 (and below) | 1 | 05-22-2001 07:10 AM |