作者bruce620 (o(‧"‧)o)
看板Flash
标题[问题] bit 101元件警告讯息
时间Sat Apr 30 21:21:27 2011
请问有人使用过bit 101的compoents吗
http://www.minimalcomps.com/oldsite/
我使用Flash CS4 SDK 3.5 版本
compile出来会有警告讯息为
Warning: 1090: Migration issue: The onMouseUp event handler is not triggered
automatically by Flash Player at run time in ActionScript 3.0. You must
first register this handler for the event using addEventListener ( 'mouseUp',
callback_handler).
请问这该如何解决呢
程式只是把测试他的元件把按钮new 出来而已
试用每个不同元件都会出现这个讯息
谢谢<_ _>
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.63.97.32
1F:→ aquarianboy:你的文章里就有提到解决方法罗 :) 04/30 22:41
2F:→ aquarianboy:第2行後半段 You must....using addEventListener 04/30 22:42
你好 我有加addEventListener
我使用两种方式都一样会出现 不知是否哪里出问题 谢谢你
我把public class内的show出来
public class testbit extends Sprite
{
private var _btn:PushButton;
public function testbit()
{
_btn = new PushButton(this, 100, 100, 'test',btnhandle);
}
private function btnhandle(e:Event) {
trace(e);
}
} //这种是直接用PushButton里第五个参数function来试
==================== 下面是加有addEventListener的
public class testbit extends Sprite
{
private var _btn:PushButton;
public function testbit()
{
_btn = new PushButton(this, 100, 100, 'test');
_btn.addEventListener(MouseEvent.MOUSE_DOWN, btnhandle);
}
private function btnhandle(e:MouseEvent) {
trace(e);
}
}
※ 编辑: bruce620 来自: 61.63.97.32 (04/30 23:11)
3F:→ aquarianboy:附fla+AS吧,这样很难猜 04/30 23:18
as就跟上面一样 囧 原始码和FLA
http://ppt.cc/nx~q 谢谢
※ 编辑: bruce620 来自: 61.63.97.32 (05/01 10:24)