View Full Version : Forms in Flash

02-05-2007, 02:58 AM
There are easy workarounds for this and I'm leaning towards implementing one of those workarounds on my site...

but just for my future knowledge I want to know how to do this.

Ok, so I have a form on my site (which works great) in a limited amount of space. So to save space, I've put the field names inside the input text field (i.e. name, email, etc...).

As of now, the viewer has to delete the text out of the input text field and enter in their own info. Is there a way that upon clicking inside the field that the text goes away?

02-05-2007, 04:30 AM
Untested.... but theoretically it should work. If it doesn't, post back and I will test some things out.

Make your input text box. give it an instance name let's say the one for "name" so instance of "name" Then put your default text in your input box.

then in the actions layer put this:

var clicked=false;
if (!clicked){

Just redo for all fields, changing the name.onSetFocus=function(){ to email.onSetFocus, etc...