This content has been marked as final. Show 3 replies
If you can use a Text or Label control, do this:
<mx:Text id="output" selectable="false"
text="This is a test. Output will go here"
useHandCursor="true" buttonMode="true" mouseChildren="false" />
hey peter....i am not using any mxml...i am making through a pure actionscript....how do i do that....plz reply..
<mx:Text> is the same as mx.controls.Text:
var textField:Text = new Text();
textField.test = "Start";
textField.useHandCursor = true;
textField.buttonMode = true;
textField.mouseChildren = false;
I do see that you are using TextField and not Text. TextField is a Flash object which is what Text uses. I don't know if a flash TextField has useHandCursor, buttonMode, or mouseChildren properties. You might post your question on the Flash forums if you intend to use TextField over Text.
Using a Flex Text control allows you to add the control to containers:
var box:VBox = new VBox();
box.addChild( textField );
which you would not be able to do with a Flash TextField.