View Full Version : IP address in Flash

01-26-2008, 04:05 PM

I would like to capture a site visitor's IP address and in a normal Web page I would use something like the following:

Dim UserIPAddress
UserIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If UserIPAddress = "" Then
UserIPAddress = Request.ServerVariables("REMOTE_ADDR")
End If

I think I can use the same script in a Flash site, but what would I need to do in my FLA file? I do not want to show the IP address in my movie - only to 'capture' it.

Many thanks.


01-27-2008, 05:18 AM
When you put the flash on your page do something like this
then in the flash file you can use var ipaddy = this.ip;

01-27-2008, 02:49 PM
Hello Aerospace

Thank you for your message.
So in my FLA file, in the Actions Script panel, I place:


So I put this in even if I do not want the IP address to show publically?
And where do I use: var ipaddy = this.ip;

Many thanks.


01-28-2008, 01:20 AM
Umm no reread my post carefully. Mainly this part
this is the part that goes in your actual page. You use var ipaddy = this.ip in your actionscript.