Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread Ian Thomas
Try: textArea.textField.selectable=false; HTH, Ian On Fri, Mar 27, 2009 at 4:38 PM, pe...@pepo.nl wrote: I'll have to prevent users to copy text from a TextArea. In Flex I saw you do that bij setting a selectable attribute of the mx.controls.TextArea to false. However, this seems not

[Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread peter
I'll have to prevent users to copy text from a TextArea. In Flex I saw you do that bij setting a selectable attribute of the mx.controls.TextArea to false. However, this seems not possible with the fl.controls.TextArea, which is used in Flash CS4 / AS3. Does someone has a tip or hint.

[Flashcoders] Mirella Batista, Flash Developer/Designer

2009-03-27 Thread Beau Gould (OSS)
To whom it may concern, My name is Mirella Batista and I am a Flash ActionScript Developer who has been working with Flash since Flash 4, and I am an Adobe Certified Expert, Flash CS3. In addition to ActionScript, I have advanced knowledge of HTML, CSS, PHP and MySQL. I have also worked with

Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread peter
Ian, thanks for replying. Unfortunately noop. I use the htmlText property of the TextArea instance instead of the text prioperty to display text (such as details_ta.htmlText = btext sample/b; and details_ta is an TextArea instance on the stage). Could that something have to do with it?

Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread Joel Stransky
Target the TextArea's TextField details_ta.textField.selectable = false; On Fri, Mar 27, 2009 at 2:39 PM, pe...@pepo.nl wrote: Ian, thanks for replying. Unfortunately noop. I use the htmlText property of the TextArea instance instead of the text prioperty to display text (such as

Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread peter
Joel, Thanks, however that didn't work. (sorry if I was not clear in my response on Ian's hint, because what you wrote was exactly what I did) Still no joy ... Peter Citeren Joel Stransky stranskydes...@gmail.com: Target the TextArea's TextField details_ta.textField.selectable = false;

Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread peter
Joel, Ian, I agree with you, because I thought I was doing it by the book (=AS3 Reference). Thanks, you are willing to look at the code. Code is included however it is extracted from the source files and not a working standalone example. I extracted everything what is done with the

Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread Anthony Pace
I know its a bit hackish but it should work. You could get the width and height of the text field, and overlay a transparent shape that match the dimensions. pe...@pepo.nl wrote: I'll have to prevent users to copy text from a TextArea. In Flex I saw you do that bij setting a selectable

Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread peter
I quickly made a standalone example which shows that the preferred way does not work (text can be copied): package prototypes { import flash.display.Sprite; import fl.controls.TextArea; public class TestTextArea extends Sprite { public var

Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread Taka Kojima
Damn formatting public function DistributorsForm () :void{ // sets styles ... set size =14 instead of default 16... StyleFlair.snapOnTextArea(details_ta, {size:14}); details_ta.textField.selectable = false; var details_ta_overlay:Sprite = new Sprite();

Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread Taka Kojima
Hey Peter, Hmm... i see the issue, very weird, probably classifies as a bug, here's how I got around it: public function DistributorsForm () :void { // sets styles ... set size =14 instead of default 16... StyleFlair.snapOnTextArea(details_ta, {size:14}); details_ta.textField.selectable

Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread Anthony Pace
Similar to what I suggested; yet, it shouldn't have to be a sprite as a shape could do just as well I think. Either way, you gave code and I didn't. Taka Kojima wrote: Hey Peter, Hmm... i see the issue, very weird, probably classifies as a bug, here's how I got around it: public function

Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread Taka Kojima
Yep, Anthony and I came up with the same solution, except I took it one step further and wrote the code for it ;) Note to also take the scrollbars width/height into account (using textarea.verticalScrollBar/textArea.horizontalScrollBar), just so you don't create another issue by solving this one

Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread Anthony Pace
Good point. Taka Kojima wrote: Yep, Anthony and I came up with the same solution, except I took it one step further and wrote the code for it ;) Note to also take the scrollbars width/height into account (using textarea.verticalScrollBar/textArea.horizontalScrollBar), just so you don't create

Re: [Flashcoders] ?: how to prevent users to copy text from a TextArea?

2009-03-27 Thread peter
Taka and Anthony, Wooohaa, very nice working around which I will try definitely. Thanks. Peter Citeren Taka Kojima t...@gigafied.com: public function DistributorsForm () :void{ [...] var details_ta_overlay:Sprite = new Sprite(); [ rest skipped ...]