Thread: Hmm some help with buttons and saving

View Single Post

  #2 (permalink)  

Old 07-11-2004, 02:21 PM

well.. you would need a forum that supports .swf on thier site.

once you found said forum, this is what you would need to do.

The breakdown:
You need to make an xml script that stores two variables. The ip address of the user, & the option they chose. This xml file will need to be stored on a remote server. Once you have completed your xml file would look somewhat like this:

Code:
<?xml version="1.0"?>
<mymenu>
<myitem sig="1" ip="192.168.1.3" />
<myitem sig="2" ip="192.168.1.2" />
</mymenu>
The nice thing about flash is that it has a built in xml parser. that means you dont need to use a dynamic page (asp, php) to communicate with the xml.

Okay, so now that you have your xml file, you need to load the xml variables via actionscript, and display the correct signature.

[as]
menuXml = new XML();
menuXml.ignoreWhite = true;
menuXml.onLoad = function() {
menuItem = menuXml.firstChild.childNodes;
for (var i=0; i<menuItem.length; i++) {
sig =menuItem[num].attributes.src);
Ip = menuItem[num].attributes.url;
};
}
menuXml.load("myMenu.xml");
[/as]

now that will load your two variables IP & Sig

you will need to get the ip adress of the user, either via php or ASp

PHP Code:
 <?php echo $_SERVER['REMOTE_ADDR']; ?>
so you will need to create a php connection in asp. It may even serv you better to use a flat file (.txt) to store the variables and pass an array into flash via php.

either way your going to need to use php or asp to do this.

For your flash file, you'll have two keyframes. One will have sig one, with 2 buttons (gotoAndPlay("2"),www.yourwebserver.com/add.php)

And the 2nd frame will also have too buttons. save & gotoandplay(1). On both keyframes you will also have stop();

the 2nd button that adds will go directly to a php or asp page that adds the ip and passes the sig number to it. That way it will save it correctly.
__________________
Audi Videos | MySpace Layouts | About Me | Kid Sniffles
[ reply ]
missionsix

missionsix is offline http://patandrew.com/

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,922

Send a message via AIM to missionsix Send a message via MSN to missionsix