如何创建使用ActionScript 3在Flash TEXT按钮?按钮、ActionScript、Flash、TEXT

由网友(美梦总是让尿憋醒)分享简介:当我试图用一个文本框,按钮,现在看来,这是不具有 buttonMode 属性。 When I tried using a textfield as a button, it seems it is not having the buttonMode property. 我如何编程创建一个Flash项目中使用Acti...

当我试图用一个文本框,按钮,现在看来,这是不具有 buttonMode 属性。

When I tried using a textfield as a button, it seems it is not having the buttonMode property.

我如何编程创建一个Flash项目中使用ActionScript中的文本按钮。 这应该是一个简单的文本,这是可以点击的。

How can I programatically create a text button using ActionScript in a Flash project. It should be a simple text, which is clickable.

推荐答案

您可以添加文本字段雪碧并用它作为按钮。 buttonMode 是雪碧类的属性。

You can add the TextField to a Sprite and use it as the button. buttonMode is the property of Sprite class.

如果你真的想用短短文本字段,你可以指定一个锚标记< A HREF =事件:一些>标签< / A> 的htmlText 或听鼠标悬停的mouseout 活动,并使用隐藏默认的鼠标指针后,显示自定义的手形光标 Mouse.hide()

If you really want to use just a TextField, you can assign an anchor tag <a href="event:something">label</a> to its htmlText or listen to mouseOver and mouseOut events and show a custom hand cursor after hiding the default mouse pointer using Mouse.hide()

阅读全文

相关推荐

最新文章