Mailing List
Home
Flash Pro
Extending Flash
Flash Macromedia Developer
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Weird bug/feature: onKeyPress event not intercepted on a butto

Weird bug/feature: onKeyPress event not intercepted on a butto

2004-02-24       - By HM Tobor

 Back
Reply:     1     2  

Have you tried using,

TextField.restrict ?

E.g,.

You can use the \u escape sequence to construct restrict strings. The
following code includes only the characters from ASCII 32 (space) to ASCII
126 (tilde).

my_txt.restrict = "\u0020-\u007E ";

-HM

> -- --Original Message-- --
> From: Carl-Alexandre Malartre [mailto:flashcoders@(protected)]
> Sent: Tuesday, February 24, 2004 2:29 PM
> To: flashcoders@(protected)
> Subject: [Flashcoders] Weird bug/feature: onKeyPress event not
> intercepted on a button when there is a v2 component in the library
>
>
> Hi
> Can anyone help me with this simple problem, it breaks my app and
> I think it
> will break many app that are ported to the V2 architecture.
>
> This is my usual way to stop a key from functionning:
> Create a simple button, add that code to it:
>
> on (keyPress " <Up > ") {
> trace( " <Up > ");
> 1+1; //trick to disable the key
> }
>
> Download this really simple demo to test it:
>
> http://www.lacaveprod.com/malartre/ProblemDemo/
>
> It 's important because in my app I need to disable the UP and DOWN keys.
> Button interception is my only known way to stop a key before it
> gets into a
> textfield (for user input).
>
>
> Thank You
> Carl-Alexandre Malartre
> Rich Internet Applications Developer
> NetMaths.net
>
>
>
>
>
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> Supported by Fig Leaf Software
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> Be sure to check the archives and the wiki:
> http://chattyfig.figleaf.com/
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:105114
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> To unsubscribe send a blank e-mail to:
> Normal Mode: flashcoders-unsubscribe@(protected)
> Digest Mode: flashcoders-digest-unsubscrive@(protected)
>
>


=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:105116
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)