Groups | Blog | Home
all groups > flash actionscript > february 2004 >

flash actionscript : Url adress needed


Nixy
2/27/2004 6:51:33 PM
I need to find the URL adress on the top. The problem is that I can with
JavaScript usign window.location, but in Flash how to do. The _url display the
path of the swf. I need all the path of the html page or asp page and
parameters.

Does anybody have an Idea
sneakyimp
2/27/2004 10:20:22 PM
if you are using static HTML, you are probably going to have to use javascript
to pass the URL to the flash movie (using FSCOMMAND or something like that).

if you are using ASP or PHP, you can add arguments in the OBJECT and EMBED
tags after the reference to your SWF. You just add a question mark and an
argument name = value. i believe there are precisely two places where you need
to add. it would be somethin like this

1)
<OBJECT balalbajlakjba. ><PARAM name=move blah blah
src="myfile.swf?strURL=http://mydomain.com/myflash.php">

2) <EMBED src="order3.swf?strURL=http://mydomain.com/myflash.php"


NOTE...you will probably have to URLENCODE the URL so that spaces are %20 and
backslashes and stuff are encoded, etc.

THEN, in the first frame of your flash movie, the variable strURL should be
defined and will contain some value. that you can reference

trace(strURL);

i don't know if you'll have to ESCAPE the argument or not.


AddThis Social Bookmark Button