Skip navigation
Currently Being Moderated

where to start when writing a server?

Apr 29, 2012 6:49 AM

Tags: #help #flash #frame #text #swf #dynamic #as2 #play #actionscript #actionscript_2 #2.0 #objects

Ok ive made a simple login/CreateAccount system using as2 and i used cookies to save the infomation of the user.

Where would i start in wrighting a server or database where I could save the infomation of the user in there and how could I host this.

 

Ive have knolage in as2 and a bit in HTML, but ive got no knolage in servers or database's

so could you please give me some links and explain how this all works.

 

Heres my as2 login code if you need it.

 

It needs alot of patching but it is ok for now.

 

...................................................................... ...................................................................... ..............................

 

var saveData:SharedObject = SharedObject.getLocal ("BoldonComputersAccount"); //Name of the cookie to be saved in

 

 

var Invalid:String = ""; //text file what pops up if the password is wrong

 

 

var InputPass:String = "";//the users input

var InputUser:String = "";//the users input

 

 

var Username:String = "";//there username

var Password:String = "";//there password

 

 

var Email:String = "";//there email not necessery

 

 

function Names(){//Change the username and password to new_username and new_password

Username = new_Username;

Password = new_Password;

Email = new_Email;

SaveInfo() //save the username and password and email if entered

}

 

 

function SaveInfo() :Void{ //the save function

   

     _root.saveData.clear ();  // clear current saved data

     

     // record variables

     _root.saveData.data.Username = _root.Username;

           _root.saveData.data.Password = _root.Password;

           _root.saveData.data.Email = _root.Email;

     

     // save as cookie (without using this method, the cookie will disappear after the current browser session)

     _root.saveData.flush ();

}

 

 

 

 

///// LOAD FUNCTION /////

function Login(){

     // load saved data

     _root.Username = _root.saveData.data.Username;

           _root.Password = _root.saveData.data.Password;

          

           if(_root.InputUser == Username && _root.InputPass == Password){//if the input is the same as the username and password then gotoandstop(5), there profile

                    _root.gotoAndStop(5)//there profile

           }else

           Invalid = "Wrong Password are username" //if the username or password is invalid

}

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points