FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Forms in Flash





Gates
Hello everyone, I am trying to make a sign up form for my website in flash. It is an assignment in my webclass. I need to have a field for account name, xfire name, email adress, rank, and why should we accept you. I need to then have acess to this data for recruiting purposes. I belive this is possible with the mysql database we have here at frihost which is where i moved my site to.

Http://www.roguemob.net let me know what you think and maybe give me a link to a tutorial on how to accomplish this task. I will give 15fri$ for whoever can give me a link or explain how to accomplish this sucsssfully first come first get. First thing I read that works.
eepman
I'm sorry, but I really dont see why it should be in flash. Flash makes forms just look messy and bleh. It looks much nicer and more professional if you make forms the normal javascript way. In flash simple things like tabbing between forms doesnt work, and thats just annoying.
looseballs
the macromedia guide book thing has a whole chapter on forms in flash


thats what i used, but i just got confused....
ninjakannon
eepman wrote:
I'm sorry, but I really dont see why it should be in flash. Flash makes forms just look messy and bleh. It looks much nicer and more professional if you make forms the normal javascript way. In flash simple things like tabbing between forms doesnt work, and thats just annoying.

Actually, you can tab between the input text boxes in Flash just as you would for text boxes in a JavaScript based form. Sometimes though, the creator of the Flash based form might not set a tab order, which is annoying as you'll be tabbing past sections. But it is possible.

If done well, a Flash based form can be just as good as a JavaScript based one, if not better.

@Gates:
Now, a short explanation on how this could work:

In Flash you obviously need the input fields for the users details; and a submit button. I'm sure you can make that, the problem is submitting.
There are two ways you can submit - either you get sent an email, or the information is - as you suggested - saved to a MySQL database. Both of these require a php file, first off the php file needs to have the variables that the user submitted in Flash.
To send to the php file use something like this:
Code:

// Use this:
loadVariablesNum("myFile.php?name="+_root.name+"&email="+_root.email, 0);
// Or this:
var dataSend = new LoadVars;
dataSend.name = _root.name;
dataSend.email = _root.name;
dataSend.sendAndLoad("myFile.php", dataSend, "POST");

If you use the first method (GET method - the latter being a POST method) you don't have to use loadVariablesNum for this, another one of the various data-sending functions will do fine, I just prefer to use loadVariablesNum for this kind of thing because then you can output a status from the php file and Flash will load it in (for example, if there's an error then you can tell Flash).
To receive the variables in the php file use:
Code:

// For the GET method
$name = $HTTP_GET_VARS['name']; // This receives the variable "name"
// For the POST method
$name = $HTTP_POST_VARS['name'];
// I think you can also use, but don't hold me to it:
$name = $_GET['name'];
$name = $_POST['name'];

Then you have variables within your php file. I don't know whether you know how to send mail from php, or how to access and modify a MySQL database; take a look here, MySQL database stuff is more complicated than simply sending yourself an email with the users input; use www.php.net for reference.
looseballs
yea, i hate coding in flash now, its just a gfx program for me now, use better programing launguages
m-productions
Flash has to have one of the most basic programming languages there is... AS is so easy to learn...and there’s not much you can’t do with it. I only use flash to program really.
ninjakannon
m-productions wrote:
Flash has to have one of the most basic programming languages there is... AS is so easy to learn...and there’s not much you can’t do with it. I only use flash to program really.

Yeah, you're right there. I think learning Flash ActionScript is actually a really good place to start scripting. It gives you a good understanding of the way different script languages work, how they are structured, what functions are available and what cannot be achieved (amongst a whole host of other things).
looseballs
i just cant stand it....i guess it just seems 2 simple for me, i dont feel like im doing anything
Related topics
Cool Flash Web-Site
How Spyware Works!!!
Flash MX
Flash Alternative
Flash Logos, Banners and Intros, Free &also available fo
Simple or Bulky/Heavy ?
best flash template website..?????!?
Flash resources
php and mysql connection in flash based website
Why You Should Never Use Flash
Flash Tutorials
Easily create forms and many other stuff without much knowle
Building Web Forms In Flash
USB Device Protection
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.