Actionscript在MXML中指定相关事件?
当我在代码中添加类似按钮的内容时,我可以输入如下内容:
<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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在事件元数据标记中使用组件来控制该行为。
例如,如果您想使用
Event.CHANGE
,您可以将以下元数据标记添加到类中: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: