我只有一层有两个框架
第一帧:只有一个按钮的菜单
第 2 帧:空白,但文档类要放置名为圆形的影片剪辑
我想这样说是因为我会编程绘制符号......(直到现在什么都没写)
到目前为止,在文档类中我已经写了
package
{
//list of our imports these are classes we need in order to
//run our application.
import flash.display.MovieClip;
import flash.display.Stage;
import flash.events.Event;
public class engine extends MovieClip
{
// moved ourShip to a class variable.
private var ourShip:circle = new circle()
//our constructor function. This runs when an object of
//the class is created
public function engine()
{
ourShip.x = stage.stageWidth / 2;
ourShip.y = stage.stageHeight / 2;
addChild(ourShip)
}
}
}
第一帧按钮作为文件:
package
{
//imports
import flash.events.MouseEvent;
import flash.display.SimpleButton;
import flash.display.MovieClip;
//-------
public class start extends SimpleButton
{
public function start()
{
addEventListener(MouseEvent.CLICK, onTopClick);
addEventListener(MouseEvent.MOUSE_OVER, onBottomOver);
}
function onTopClick(e:MouseEvent):void
{
MovieClip(root).gotoAndStop(2)
}
function onBottomOver(e:MouseEvent):void
{
}
}
}
顺便说一句,我只知道 addchild (我在这里写的,现在它会在第 1 帧和第 2 帧中显示圆圈,但我只希望在第 2 帧中显示)