Re: [Flashcoders] Text editor - Selection trouble.

2006-04-12 Thread Magnus Askenbäck
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Magnus Askenbäck Sent: 12 April 2006 14:13 To: Flashcoders mailing list Subject: Re: [Flashcoders] Text editor - Selection trouble. Tack Johan, that worked like a charm! =) .m Johan Karlsson wrote: If I remember correctly using on

Re: [Flashcoders] Text editor - Selection trouble.

2006-04-12 Thread Michael Bedar
I did this a long time ago, and as others have said, you need to use an onMouseDown. You will still lose your selection however.. I ended up storing the selection begin and end an using that to set the selection again after I applied the style. Mike On Apr 12, 2006, at 8:46 AM, Magnus As

RE: [Flashcoders] Text editor - Selection trouble.

2006-04-12 Thread Giles Taylor
äck Sent: 12 April 2006 14:13 To: Flashcoders mailing list Subject: Re: [Flashcoders] Text editor - Selection trouble. Tack Johan, that worked like a charm! =) .m Johan Karlsson wrote: >If I remember correctly using onRelease or even onPress is to late and >the selection is already

Re: [Flashcoders] Text editor - Selection trouble.

2006-04-12 Thread Marcelo Volmaro
That´s right, because once you hitted the button, the selection is the button. You need to store the start/end index somewere and then, on the button, use that indexes instead of the Selection functions. An easy way could be to assign into an onEnterFrame a function that checks if the selec

Re: [Flashcoders] Text editor - Selection trouble.

2006-04-12 Thread Magnus Askenbäck
Tack Johan, that worked like a charm! =) .m Johan Karlsson wrote: If I remember correctly using onRelease or even onPress is to late and the selection is already gone. To store the selection indexes you need to use the onMouseDown event. -Original Message- From: [EMAIL PROTECTED] [ma

Re: [Flashcoders] Text editor - Selection trouble.

2006-04-12 Thread Paul BH
if memory serves, this exact thing is covered in Sam Wan's book on OO programming in actionscript its quite an old book, and the code is AS1, but for what you're doing I think it might just get you where you wanna go... url for the booko:http://www.wheelmaker.org/ On 4/12/06, Magnus Askenbäck <[

RE: [Flashcoders] Text editor - Selection trouble.

2006-04-12 Thread Johan Karlsson
If I remember correctly using onRelease or even onPress is to late and the selection is already gone. To store the selection indexes you need to use the onMouseDown event. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Magnus Askenbäck Sent: den 12 april 200