-
Input text box doesn't work within movieclip
Hello,
I made a contact form in my flash website, but for some reason, you can't type in the input text boxes I made. I already have embedded the text, so that isn't the problem. I think maybe it's related to the code I have, or maybe I need a code to target the text box.
One more key detail: The text box is within a movieclip. If I don't put it in the movieclip, it works fine, but I need it inside of the movieclip.
I would appreciate it if you could take a look at my file here:
https://rapidshare.com/files/3964236..._website11.zip
Thanks in advance,
SK
-
Just a wild guess, maybe you movieclip or other element inside, is somehow blocking the textbox.
-
Total Universe Mod
It's possible the movieclip has mouseChildren set to false.
-
I dont believe it does. I would really appreciate it if you could take a quick look at my file I just can't seem to find the solution sadly.
Thanks,
SK
-
download link doesnt work.
-
-
sorry to bother, but did anyone take a look by any chance?
-
Prid - Outing
The Input Text wasn't working because the Font Family was set to Chinese Characters, in the Properties Panel. Simply change that to something else, like Arial or something. If the dropdown menu only shows Chinese Fonts, manually change it by renaming the Font Family you want!
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
THANK YOU SO MUCH! haha I didn't know it would be as simple as that! how did you know it was chinese?? it just said the font was called Kozuka
-
Oh and one more question, can I make it so that when I click on the existing text, it gets erased so you can just start typing in the box without manually having to erase it?
-
Total Universe Mod
You need to listen for FocusEvent.FOCUS_IN and when that is triggered you just set the text to an empty string.
Actionscript Code:
myInputField.addEventListener(FocusEvent.FOCUS_IN, onFocus);
private function onFocus(event : FocusEvent) : void { // be careful not to erase text that's not the default if(myInputField.text == "Click here to type"){ myInputField.text = ""; } }
-
this is my code, but it doesn't seem to be working :/ makes sense though:
Code:
var var_load:URLLoader = new URLLoader;
var URL_request:URLRequest = new URLRequest( "send_email.php" );
URL_request.method = URLRequestMethod.POST;
send_button.addEventListener(MouseEvent.CLICK, submit);
function submit(e:MouseEvent):void {
if(contact_message.text == ""||contact_email.text == "")
{
stop();
}
else
{
var email_data:String = "&email=" + contact_email.text
+ "&message=" + contact_message.text;
var URL_vars:URLVariables = new URLVariables(email_data);
URL_vars.dataFormat = URLLoaderDataFormat.TEXT;
URL_request.data = URL_vars;
var_load.load( URL_request );
gotoAndPlay("thanks");
}
contact_message.addEventListener(FocusEvent.FOCUS_IN, onFocus);
function onFocus(e:FocusEvent) : void {
// be careful not to erase text that's not the default
if(contact_message.text == "Learn more by contacting us, include any details"){
contact_message.text = "";
}
}
contact_email.addEventListener(FocusEvent.FOCUS_IN, onFocus2);
function onFocus2(e:FocusEvent) : void {
// be careful not to erase text that's not the default
if(contact_email.text == "your@email.com"){
contact_email.text = "";
}
}
}
-
Total Universe Mod
You'll have to tell me what's supposed to happen and what is happening in order for me to troubleshoot that. Looks correct.
-
It doesn't seem to change anything, maybe I have the code in the wrong place?
I wanted it so that when clicked on the default text, it gets erased. But it doesn't do that for some reason.
Thanks,
SK
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|