|
Subject:
|
focus insertion point in flash movie
|
|
Posted By:
|
larry
|
Post Date:
|
1/4/2006 10:13:20 PM
|
Ok, I have scripted everything (all scripting is in the Actions layer) but have one small glitch. It doesn't make any difference what you type in the User ID field as long as the Password field is correct. I need it to be so that both fields must be correct or it fails.
I don't think I have the "if" line coded right as the user = "red" is being ignored. See code below...
stop(); Selection.setFocus("user_id_txt"); login_btn.onRelease = function() { if (user == "red", pass == "blue") { getURL("http://www.microsoft.com"); myText.text = "Successful"; } else { myText1_txt.text = "Login Failed"; gotoAndStop(1);
} }; reset_btn.onPress = function() { pass = ""; user = ""; myText1_txt.text = ""; myText.text = ""; gotoAndPlay(1); };
Also, when I play it on my flash program, the insertion point focus works perfectly, but when I open on the Internet the focus does not flash unless I click the Reset button first.
I have tried calling it using .html and .swf but the focus does not work.
See it in action here: http://www.networkdriven.com/password.html
BTW, I am using Flash MX 6.000
Rudy
|
|
Reply By:
|
harpua
|
Reply Date:
|
1/4/2006 10:38:52 PM
|
Try adding && to the comparision statement
if (user == "red" && pass == "blue") {
I am not sure about the focus question.
|
|
Reply By:
|
larry
|
Reply Date:
|
1/4/2006 10:53:41 PM
|
Thanks - that fixed that problem, now I just got to get the focus to work and I got it done...
Thanks
quote: Originally posted by harpua
Try adding && to the comparision statement
if (user == "red" && pass == "blue") {
I am not sure about the focus question.
Rudy
|
|
Reply By:
|
harpua
|
Reply Date:
|
1/4/2006 10:59:22 PM
|
I found this, it might help. http://www.webwasp.co.uk/tutorials/b35-Tab/index.php
mike
|
|
Reply By:
|
larry
|
Reply Date:
|
1/5/2006 6:30:11 PM
|
Yes, that URL had what I needed...
Thanks so much!!

quote: Originally posted by harpua
I found this, it might help. http://www.webwasp.co.uk/tutorials/b35-Tab/index.php
mike
Rudy
|