jsttriit
asked on
Find URL of swf html host
Hello,
I need a flash swf file to be able to find out what the URL is of the html page that the swf is on? Then make it a variable that I can pass onto another page...
Thanks...........Rob
I need a flash swf file to be able to find out what the URL is of the html page that the swf is on? Then make it a variable that I can pass onto another page...
Thanks...........Rob
if you know asp you will see that this is the only asp(server side script) in the page
<%="http://"&Request.ServerVariab les("SERVE R_NAME")&R equest.Ser verVariabl es("Url")% >"
<%="http://"&Request.ServerVariab
ASKER
I do have server side ability but I need this to be done on a regular html page. We are using flash to let people put in bugs when reviewing a website(all .htm pages).
So I need flash to be able to determine the hosting page url dynamically and then make it a variable which will then be passed to a cold fusion page for processing.
Thanks for the effor though.....Rob
So I need flash to be able to determine the hosting page url dynamically and then make it a variable which will then be passed to a cold fusion page for processing.
Thanks for the effor though.....Rob
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cool, let me mess around with it. I really want it all in the flash movie with no javascript involved, but let me see if I can get this to work.
I would think flash mx would be able to do this, but no one has figured out how.
Thanks..Rob
I would think flash mx would be able to do this, but no one has figured out how.
Thanks..Rob
okey.. I will check out if I can make an mx example.
There is no method to get the url of the html page where the swf is located.
The only thing you can do is getting the url where the movie is..
like this in actionscript->
url = _url;
(variable = _url;)
this works in lower versions too.
but for finding the html page you must use clientsidesdcript or serversidescript.
If you realy don't want to use javascript, you can use the _url to parse out the "http://hammar.no/users/thor/submit/"
and then put in src="Movie1.swf?file=test. html" manualy in each html page to identify the html page to flash, but that isn't exactly dynamic.
The only thing you can do is getting the url where the movie is..
like this in actionscript->
url = _url;
(variable = _url;)
this works in lower versions too.
but for finding the html page you must use clientsidesdcript or serversidescript.
If you realy don't want to use javascript, you can use the _url to parse out the "http://hammar.no/users/thor/submit/"
and then put in src="Movie1.swf?file=test.
ASKER
Great work. Thanks..............Rob
:D Glad to be of help. Thanks for the points!
asp? then you can do this easy!<HTML>
movie1.asp--->
<HEAD>
<TITLE>Movie1</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<OBJECT classid="clsid:D27CDB6E-AE
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=550 HEIGHT=400>
<PARAM NAME=movie VALUE="Movie1.swf?url=<%="
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="Movie1.swf?url=<%="http://"&
</OBJECT>
</BODY>
</HTML>
as you see this asp puts the page url into a querystring where the Movie1.swf are..
Like this->
Movie1.swf?url=http://thor/flash/Movie1.asp
If you have an dynamic text box named url in the flash file you will retrive the url ;)