Hi guys,
Whilst working on od bits and bobs I had to create a flash login script for someone, thought you guys would appreciate it uploading as AS3 (actionscript 3) are still somewhat limited compared to AS2 (actionscript 2) files free on the internet.
The file is pretty simple to use and calls a php script (which you need to pop on your server and change the flash file to target it) to process the login and connect to your mysql database.
The encryption is pretty standard stuff it uses the MD5 function in php. Just google it for shed loads of examples.
Heres How To Set The File up
1. Change the variables to connect to your database in the conn.php file
2. Setup the database by using the code in the install.php file
3. Upload everything excluding the install script otherwise youll end up with tons of tables
being created.
4. Change the URL in frame 1 of scene 1 from the test ip address to your website address
i.e
http://www.yourwebsite.com/folder-where-the-process-file-is/process.php
5. Smile cos you’re done.
6. Email me examples of usage if can be bothered id like to have a nosey.
info@thatplaceigo.com
Anyway enough babling, heres the file.
Any problems just ask, (noobs don’t be afraid to ask anything, we’ve all been there)
Later guys !



jey jey jey
hola diego soy alfonsop desde espana como va todo por alli
nos vemos
Hello
Very good stuff this login file. Thanks.
Everything is working fine, only when I log
in it stops with text “Processing Form…”,
it doesn’t give me any button (Try Again,
or Click To Enter) so it never go to play
Scene 3. In Flash output window i get error:
////////////////////////////////////////////////////////////
TypeError: Error #2007: Parameter text must be non-null.
at flash.text::TextField/set text()
at login_fla::MainTimeline/sendComplete()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
///////////////////////////////////////////////////////////
Same thing happen when I register a new member, here
stops with text “Registering…”…. no buttons. It
does register a member and put data in DB. Here I get
this error in output:
///////////////////////////////////////////////////////////
Error: Error #2101: The String passed to URLVariables.decode() must be a
URL-encoded query string containing name/value pairs.
at Error$/throwError()
at flash.net::URLVariables/decode()
at flash.net::URLVariables$iinit()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
/////////////////////////////////////////////////////////
Please help. I’m new in actionscript.
Keep up the good work. Bye
make sure all your files are in the same directory, are you on shared hosting or your own ?
Me again..
I’m hostin the site. I’m using wampserver 2.0.
I think that the problem is in process.php file.
I think that those print texts never get to flash
becouse i never get any infoBack text when testing.
Or maybe is something wrong with that function in
as (sendComplete). I tested when i set the button
///////buttonFinish.visible = true;///////
and it send me to Scene 3, so everything else is
working fine.
So problem is with that print statemants
(infoBack and ok never get to flash), or
with that sendComplete function, I think.. ??
happy new year
The sandbox error appears when you test it locally, its built into flash for numerous security reasons, youll need to have it online, wampserver 2.0 is locally based isnt it ?
Try it:
http://89.212.172.253/login.html
check the urls are written out in full inside the flash file when it’s trying to target the processing file.
Hello!
Really nice example and very good example for learning AS3.
I’m not shure, but seems that the example isn’t finished. Once logged, is there any logout button?
And when registering… I think there is AS3 code missing for sending data to the PHP file.
Am I right?
Thank you very much for your example.
Yeah you need to upload the php file to your server then change the url in the asc3 code to point to your page on the server. If you have done this just send me a link and ill sus it out for you, although im away for a couple of days to go on deal or no deal til tuesday woohoo !
I can get it to register a name into the db, but it hangs on “registering….” nothing happens…
I can’t even find the word “registering” that’s coming up when you try to register in the PHP or AS3 code. Where is this? How do I fix this.
Never mind. Figured it out with your scenes. I’ve never used scenes before. Odd way to do it, but it works.
Thanks I have been looking for something like this all day.
I found plenty using AS2 but your login works better and looks good too.
Glad you like it guys, im gonna do a few more free files so be sure to subscribe and keep updated
I have some error when in publish swf
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at as3_login_fla::MainTimeline/__setProp_buttonRegister2_Scene2_buttons_0()
at as3_login_fla::MainTimeline/frame1()
I dont now what i must do?
check the files are in the same directory
I do my own login form with using asql-mooska library (read: without PHP) and now i think about security, but thanks.
I think this system will be easly convert to asql – will be much faster.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at as3_login_fla::MainTimeline/__setProp_buttonRegister2_Scene2_buttons_0()
at as3_login_fla::MainTimeline/frame1()
You must just copy the Register button (buttonRegister2)
from Scene 2 and paste it in Scene 1 – Frame 1 anywhere,
you can put it off the visable stage, or even put alpha
to 0. This must be done, so that the code from Scene 1 –
Frame 1 can reference it. The error will disappeare. bye
Hey! Thank you for your wonderful work! I have gotten it to work for the most part, HOW EVER (PLEASE HELP) I can not log in or create new user accounts from other computers. ??!?!?!??!!??!? Do you know why this is? Any ideas or suggestions would be really great! Thank you so much. If it all works out well I should be able to kick some $$$ as well! aloha
The buttonRegister2 doesn’t say Register when you play the movie, it says label? Any idea why???