|
||||||
|
||||||
Flash Tutorial - Automatic Focus in a Flash Form

Free
Tutorial
Step One: Create the Input Box
Note: If you have dragged the text tool you should get a paragraph text box which has a square in the top right hand corner:
![]()


Note: The easiest way is to copy and paste the existing Text box.


Note: This button is there so that we can attach some ActionScript to it. It is not designed to be seen (or clicked!!). For this reason you can use any standard button that you may find in the Button Library: Window > Other Panels > Common Libraries > Buttons
Do not use Knobs, Faders or Component buttons as they have different ActionScript.
on (keyPress "<Tab>"){
if (_root.a == 0) {
Selection.setFocus("_root.Text1");
Selection.setSelection(length(/:Text1), length(/:Text1));
_root.a = 1;
}else if (_root.a == 1) {
Selection.setFocus("_root.Text2");
Selection.setSelection(length(/:Text2), length(/:Text2));
_root.a = 2;
}else if (_root.a == 2) {
Selection.setFocus("_root.Text3");
Selection.setSelection(length(/:Text3), length(/:Text3));
_root.a = 0;
}
}
var a = 0;
|
Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates
•
29615 visitors to this page since
Sept 05 •
|
|
|
All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.
|