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
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.
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
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?
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
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;
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
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
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
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();
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
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
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
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
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 ...]
15 matches
Mail list logo