-1

我有这个 Flash 程序,我从这里下载并提取了代码并将其加载到在线演示网站上,我需要将其转换为 Actionscript 3。

//---------------------------------------------------------------------- 
//Frame 161 
//---------------------------------------------------------------------- 
stop();    

//---------------------------------------------------------------------- 
//Symbol 44 Button 
//---------------------------------------------------------------------- 
on (release) { gotoandstop (1); }  

//---------------------------------------------------------------------- 
//Frame 101 //---------------------------------------------------------------------- 
stop(); gotoandplay (31);    

//---------------------------------------------------------------------- 
//Frame 30 
//---------------------------------------------------------------------- 
stop();    

//---------------------------------------------------------------------- 
//Frame 1 
//---------------------------------------------------------------------- 
stop();    

//---------------------------------------------------------------------- 
//Symbol 32 Button 
//---------------------------------------------------------------------- 
on (release) { gotoandplay (102); }  

//---------------------------------------------------------------------- 
//Symbol 16 Button 
//---------------------------------------------------------------------- 
on (release) { play(); }

这是工作副本:http ://static.howstuffworks.com/flash/fuel-cell-animation.swf 我不认为它太复杂所以我将如何轻松地做到这一点?有转换器吗?谢谢。

4

1 回答 1

3

看看这篇Migrating AS2 -> AS3 Article和这个AS2 to AS3 migration table

这些应该可以回答您的大部分疑问。

例如:

on (release) { gotoandplay (102); }  

可以替换为:

function mouseUpHandler( event:MouseEvent ):void
{
   this.gotoAndPlay(102);
}
this.addEventListener( MouseEvent.MOUSE_UP, mouseUpHandler );
于 2013-07-04T00:39:53.497 回答