Mailing List
Home
Forum Home
Flash Pro
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.
RE: [Flashcoders] Differentiating between User originating and
Program origin

RE: [Flashcoders] Differentiating between User originating and
Program origin

2004-03-09       - By EECOLOR

 Back
The TextFieldExtension component indeed use the setFocus methods to return
focus to the object that had focus before the component stole focus to some
magic ;)

But for your problem. In your case it would be handy if the component would
set a Flag to the textfield. Mail me offlist if u want me to make those
changes and to discuss what else would be handy in this situation.

Greetz Erik


At 19:07 9-3-2004, you wrote:
>I can't user Key.isDown(1), as the process that uses the setFocus method is
>set off by a button click.
>
>My situation:
>- There is a passage of text in the movie.
>- The user highlights a portion of this text with their mouse. I check for
>the onSetFocus event to see when this happens and use Selection.getFocus()
>to determine whether it's the right field. I set up a mouse listener to
>listen for the next onMouseUp event to determine when the user has finished
>selecting the text.
>- When the user has finished selecting the text a method is called to do
>something with that text (open a Note object where the user can add and save
>comments about the selected text).
>- When the user closes this Note object a saveAndClose event is fired that
>uses various methods from eecolor's excellent textfieldextension component
>to highlight the originally selected text. I believe several programmatic
>setFocus's are used in this extension which fires my onSetFocus method
>several times (I'm reluctant to change the textextension code to add a flag
>as I'm hoping to retain the encapsulation).
>
>Logically, testing for Key.isDown(1) (left mouse button) should prevent code
>running unless the mouse button is down. So the mouse listener should only
>be set up if the user is selecting text from the field. Unfortunately,
>tracing Key.isDown(1) reveals that it's returning true when setFocus events
>are happening! Now I think about it I suppose this makes sense as it's a
>button click that sets the process of saveAndClose.
>
>Sorry if this situation is unclear.
>
>(I'm trying the previously suggested flag setting solution at the moment)
>
>brook


=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
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:106480
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)




Earn $52 per hosting referral at Lunarpages.