Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / July 2007



Tip: Looking for answers? Try searching our database.

forwarding url data?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mschietinger - 10 Oct 2006 01:46 GMT
this liveDoc covers getting a url variable into flash:

http://livedocs.macromedia.com/flash/8/main/00001205.html

you can pass data to a flash movie by doing the following:
www.myflash.com/testflash.swf?variablename=thisisthedatastring

this will create a variable:  _level0.variablename with the data: thisisthedata

so far so good.

you can then embed this in the published html doc by including your data
string in the object/embed tags.

like so:

<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="550" height="400" id="urlvariables" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
[b]<param name="movie" value="testflash.swf?variablename=thisisthedatastring"
/>[/b]
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed [b]src="testflash.swf?variablename=thisisthedatastring"
[/b]quality="high" bgcolor="#ffffff" width="550" height="400"
name="urlvariables" align="middle" allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

not to bad, so now your html is loading the swf with the url variable. the
problem is this data is hard coded into the html.

now for the question.

how do i get the html to pass the url variable it receives on to the flash?

i.e. :
the end user uses the following url:
[u]www.myflash.com/testflash.html?variablename=thisisthedatastring[/u]

inside the object tag loads www.myflash.com/testflash.swf with the variable
included in the html url.

anyone help me out?

thanks in advance
derobinson - 19 Oct 2006 18:43 GMT
If you're using CF/ASP/PHP, its a pretty easy thing to do. Otherwise, there are
JavaScript methods that will parse the HTML URL and give you a JS variable to
pass into Flash. Google will be your best bet for finding the specifics.

Hope that helps!
wingfeather2007 - 02 Jul 2007 21:41 GMT
[q][i]Originally posted by: [b][b]derobinson[/b][/b][/i]
If you're using CF/ASP/PHP, its a pretty easy thing to do. [/q]
If you don't mind pointing me in the right direction....

I'm trying to get a Flash menu bar to read the URL of the page it's on & add
some of that data to the links in the Flash file.

Help?
John - 24 Oct 2006 01:11 GMT
Hi,

I am using a different approach to get a url from within Flash.

The idea is to send a loadVars request to the Server asking for the URL
I need.

Method:
1)  Use the global variable  _url  to access the URL of the webserver.
2)  Send a loadVars Post to this URL
3)  A servelet on the Server processes the request and returns the URL
that you need

Hope this helps,
--JK

> this liveDoc covers getting a url variable into flash:
>
[quoted text clipped - 44 lines]
>
>  thanks in advance
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.