> I am trying to create a "Select All" button for a textArea 
> component and I cant seem to get the selected text to stay 
> selected. It gains focus, selects the text and then then 
> unselects itself immediately.
> 
> Am I missing something here?
> 
> btnSelectAll.onPress = function() {
>     Selection.setFocus("txtBox");
>     var nBegin:Number = Selection.getBeginIndex();
>     var nEnd:Number = Selection.getEndIndex();
>     Selection.setSelection(nBegin, nEnd); };
> 

Try btnSelectAll.onRelease instead - I suspect the button's getting focus
back when you release it.

Danny

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to