Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Flash code to "see" users URL and react to it 1

Status
Not open for further replies.

def333

MIS
Jan 18, 2006
6
US
i am looking to have a flash file that will show header image 1 if the user comes from a specific url or header image 2 if the user comes from a different but specific url. i have flash mx & flash 8.

is this embedded in the software? is there an actionscript command to achieve this?

thanks in advance for the help!

cheers,
def
 
Flash cannot even tell the address of the current HTML page (can tell the server location of itself though).

What you need to do is first obtain the URL of where the user came from using Javascript "document.referrer" property, and then pass that info to the SWF using FlashVars.

Kenneth Kawamoto
 
thanks much kenneth! from what i had read i kind of thought that would be the process. i'm shocked that flash doesn't have such a simple function built in. oh well.

cheers,
def
 
>Flash can tell the address of the current HTML page it is embedded in, through a Javascript call

Not very reliably, in my experience - however Flash 8 external interface may give you a better result with Javascript (I personally haven't tested it enough.)

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top