There isn't really anything that happens in the fla file, all you need here is a dynamic textbox with the variable name ip to display the IP Address. The actual work goes on in the server side script, this finds the users IP Address and creates the variable ip in the movie containing the IP Address.Originally posted by mosterdfles_flash
I kinda dont understand this :)
Can I please get a.zip file of all this stuff (only the ip getting thing including .fla)
Here is a quick test file I made
Save it as test_ip.php and edit the filenames (test_ip.swf) to the filename of your movie (make sure this movie has the dynamic textbox in)Code:<HTML> <HEAD> <TITLE>test_ip</TITLE> </HEAD> <BODY bgcolor="#FFFFFF"> <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=500 HEIGHT=400> <PARAM NAME=movie VALUE="test_ip.swf?ip=<?php echo $_SERVER['REMOTE_ADDR']; ?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="test_ip.swf?ip=<?php echo $_SERVER['REMOTE_ADDR']; ?>" quality=high bgcolor=#FFFFFF WIDTH=500 HEIGHT=400 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED> </OBJECT> </BODY> </HTML>
To run it you need a server that can run PHP files, if you test on a local server you should probably see the IP address 127.0.0.1 appear in the textfield (this IP Address refers to the local machine)




Reply With Quote