Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
List Inspector
BASS Xtra v1.0
Text Drop Shadows (and a moving light)
Simple projectile with gravity
Gang Buster
Jaw Wars
Volume Slider
lingo to php with browser on stage
DirectOS Xtra
Random Sprite Swap
 

 

 

Behavior keyboard input control

Added on 2/9/2007

 

Compatibilities:
behavior

This item has not yet been rated

Author: silviomond

do something if enter or return is pressed in an input text field block specifc chars

   Download Mac Source
on keyDown(me)
  ch = _key.key
  filterString="12234567890" -- chars stopped
  
  if( not(ch=ENTER or ch=RETURN or  filterString contains ch=1) )then pass
end

-- on "enter" or "return" pressed
on keyUp(me)  
  ch = _key.key
  if (ch = ENTER or ch=RETURN) then
    
    -- action
    _movie.alert("brau!")
  end if
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail