If you'd rather have something more secure, then I'd suggest calling a
backend to pass it to you. This gets a lot more complicated as you'd now
have to tack on session management. The other option is to use
JavaScript/AJAX to pull data from a request or response. Are you putting
your SWF on an HTML page or a JSP/ASP/PHP page? If it's the former, there
really is no other way outside of using session management +
XML/JavaScript/AJX. If it's the latter, then you can have the JSP/ASP/PHP
page write the referrer to the FlashVars. However, if you get referrer URL's
with querystrings attached, you could potentially run into issues there as
well as you'd have to parse through the referrer's querystring. I'm not sure
if there's an easy answer for this outside of having Flash do a separate
call to get the referrer URL once the SWF has loaded.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Mudge
Sent: Thursday, May 03, 2007 9:00 PM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Detecting referrer in Flash

> You can use FlashVars to pass it into your SWF via the HTML embed.

I'm currently using an anchor (foo.swf#abc) or file parameters
(foo.swf&item=abc), which work fine.

But can I do any better than this?  I feel that passing in a parameter
is an invitation for tampering...  Not that it's incredibly critical,
but it'd be nice if developers could just drop-in the SWF without having
to configure it.

> public _url : String [read-only]

This gives the URL of the SWF itself -- this is already known.

- Kipp

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to