labs.insert-title.com

ActionScript Form Fields

A handy function for faster form input fields development in Swishmax and Swishscript

The Script

	
function makeField(fname,label,x,y,typ){
    n++;
    typSTR = New String;
    typSTR = typ;
    fieldTXT = new TextFormat();
    fieldTXT.bold = true;
    fieldTXT.size = 10;
    fieldTXT.font = "Verdana";
   _root.createTextField(label,n, x,y-18, 100, 18);
    ref=this[label];
    ref.Text = label;
    ref.border = false;
    ref.setTextFormat(fieldTXT);       
    n++;
    
   _root.createTextField(fname,n, x, y, 100, 18);
    ref=this[fname];
    ref.type = "input";
    ref.border = true;
    ref.setTextFormat(fieldTXT); 
    if (typSTR == "pass"){ref.password = true;}

  
}
OnLoad(){
//makefield(field name, label, x, y, pass?)    
makeField("input_fname","First Name",10,50);
makeField("input_lname","Last Name",150,50);
makeField("input_email","Email Address",10,100);
makeField("input_URL","URL",150,100);
makeField("input_username","Username",10,150);
makeField("input_password","Enter Password",150,150,"pass");
}


}

The Download

Download swish file






Discussion

Mikey Bundy

Thanks, this is really useful, i`m learning how too build websites in flash, and this helps me so much :) thanks -Mirey

djdocta

Thanx dude , i`m leraning how to buid sites with flash and this helps me out

Cyrus

much respect...with knowledge comes wisdom...thanks a lot

Joe Maddalone

Holk $hit... that is the best compliment ever. Thank you.

centhi

Thaaaankxx, this is very useful to me for learing the forms in Swish. And also plz help me to store the form fields in DB

Freddie

This is not working! I downloaded the fle, and if i try to run it, it gives me a lot of errors. Hmm ?

Alex

Thank You

Jim

Its not working...its getting errors

HARIHARAN.D

Is it working?

HARIHARAN.D

Ya wonderful it working beautifully.....

Chinny Enechukwu

You made available textboxes for typing names but no command button to submit...

bob

WHere is the information stored can i email it as a CSV file?

I want to collaste a D base of users how can i send the ifo from each individual user ??

Bob

not working, it is just blank

New comments are currently disabled, you can find me @joemaddalone Comments temporarily disabled for now, you can find me @joemaddalone