代碼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 腳本代碼大全
掃一掃 加微信咨詢