Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > Server-Side Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-12-2001, 09:23 PM   #1
zex
Registered User
 
Join Date: Mar 2001
Posts: 10
Question

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="clsid27CDB6E-AE6D-11cf-96B8- 444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="600" height="500">

<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 !!!!

zex is offline   Reply With Quote
Old 03-12-2001, 09:55 PM   #2
zex
Registered User
 
Join Date: Mar 2001
Posts: 10
Default loading varibles from html URL

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

zex is offline   Reply With Quote
Old 03-13-2001, 03:43 AM   #3
edeveloper
New Member
 
Join Date: Mar 2001
Location: eastcoast
Posts: 42
Default

use loadVariables to send the vars back to the script.
edeveloper is offline   Reply With Quote
Old 03-13-2001, 03:53 AM   #4
zex
Registered User
 
Join Date: Mar 2001
Posts: 10
Default

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..
zex is offline   Reply With Quote
Old 03-13-2001, 08:08 AM   #5
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,612
Default

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"
and replace it with

Code:
<EMBED  src="files.swf?variable=<?php echo $variable ?>"
This way if you type the url:

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.
Jesse is offline   Reply With Quote
Old 03-13-2001, 05:13 PM   #6
zex
Registered User
 
Join Date: Mar 2001
Posts: 10
Default is Flash reads variable...

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
zex is offline   Reply With Quote
Old 03-13-2001, 09:58 PM   #7
zex
Registered User
 
Join Date: Mar 2001
Posts: 10
Default txh

thank U for help it ment a lot to me it works now!

Thank U one more time
zex is offline   Reply With Quote
Old 03-22-2002, 07:44 PM   #8
quincewyss
Peak Studios Boulder, CO
 
Join Date: Mar 2002
Location: Boulder, CO
Posts: 203
Default

To use this example to do the same thing in asp how would I need to change this script?


Thank you
Quince Wyss
quincewyss is offline   Reply With Quote
Old 03-25-2002, 11:45 PM   #9
maccer
Large Member
 
maccer's Avatar
 
Join Date: Jun 2001
Posts: 186
Send a message via AIM to maccer Send a message via Yahoo to maccer
Default

Hi quincewyss


If you want pass an ASP variable to flash use this

PHP Code:
<param name=movie value="default3.swf?content="&<%=content%>> 
maccer is offline   Reply With Quote
Old 12-19-2002, 03:51 AM   #10
pheck
Registered User
 
Join Date: Dec 2002
Posts: 6
Default

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.
pheck is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 12:59 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.