代码1 影片剪辑mc是放在第二个场景中
on (press) {
_parent.mc.gotoAndStop("场景 2",2);
_parent.gotoAndStop("场景 2",2);
}
写("场景 2",2); 提示错误的话,就写("scene 2",2);
也就是一个英文一个中文,看用的是什么版本的FLASH
_root表示的是当前主场景,表示绝对路径的时候经常用它
_parent是表示父时间轴,
this是表示当前元件,表示相对路径的时候经常用
还有技巧就是,场景多的时候一半很少用_root!
Flash按钮动作代码
1、转下一帧并继续播放
on (release)
{
play();
}
2、转第三帧并播放
on (release)
{
gotoAndPlay(03);
stopAllSounds();
}
3、全屏播放
fscommand("fullscreen", "true");
4、退出
on (release)
{
if (substring(_root._url, 8, 1) == "/")
{
fscommand("quit");
}
else
{
getURL("javascript:window.close()");
} // end if
}
5、返回第一帧
on (release)
{
gotoAndPlay(01);
stopAllSounds();
}
上一篇:FLASH 脚本代码大全
下一篇:优秀程序员之道:深入理解你的代码