FlashBuilder4.5 求解
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955" minHeight="600">
<mx:VBox mouseMove="traceMousePosition(event)">
<mx:LinkButton label="MyButton"/>
</mx:VBox>
</s:Application>
为什么错误提示traceMousePosition可能未定义
该怎么修改
菜鸟一只,不懂就问
[解决办法]
方法都没写,当然未定义。。。
[解决办法]
方法未定义,在代码里把方法写上就可以了啊,假如该方法返回值是空的话,示例:
public function traceMousePosition(event:Event):void {
//此处填写该方法中需要实现的功能
..........
}
具体代码你可以看下哈
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
public function traceMousePosition(event:Event):void {
//此处填写该方法中需要实现的功能
..........
}
]]>
</fx:Script>
<mx:VBox mouseMove="traceMousePosition(event)">
<mx:LinkButton label="MyButton"/>
</mx:VBox>
</s:Application>
仅供参考啊,呵呵