Actionscript在MXML中指定相关事件?

发布于 2024-10-28 01:45:15 字数 231 浏览 5 评论 0原文

当我在代码中添加类似按钮的内容时,我可以输入如下内容:

<mx:Button id="myButton"

当我单击空格时,我会获取公共属性、方法等,以及所有相关事件,例如“单击”。我可以输入 click,并让它自动生成一个方法存根来处理此类事件。

我的问题是,如何指定相关事件,并指定方法存根的样子?我很难找到这个,因为我不太确定要使用什么搜索词。提前致谢。

When I add something like a button to my code, I can enter something like this:

<mx:Button id="myButton"

When I click space, I get the public properties, methods, etc, as well as all the relevant events, such as "Click". I can type click, and have it auto-generate a method stub to handle those kinds of events.

My question is, how do I specify the relevant events, and specify what the method stubs look like? I'm having a hard time finding this since I'm not quite sure what search terms to use. Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

万人眼中万个我 2024-11-04 01:45:15

您可以在事件元数据标记中使用组件来控制该行为。

例如,如果您想使用 Event.CHANGE,您可以将以下元数据标记添加到类中:

[Event name="change",type="flash.events.Event")]

You would use the Event metadata tag in your component to control that behavior.

For example, if you wanted to use Event.CHANGE, you would add the following metadata tag to the class:

[Event name="change",type="flash.events.Event")]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文