Flash做電子雜志常用代碼匯總
上一頁:
on (release){prevframe();}
下一頁:
on (release) {
nextFrame();
}
停止:
stop ();
跳轉到多少幀后繼續(xù)播放:
on(release){
gotoAndPlay(20);
}
跳轉到多少幀后停止播放
on(release){
gotoAndStop(2);
}
跳轉到某場景或某元素某幀:
on(release){
gotoAndStop("場景或元素名", 1);
}
從影片剪輯中跳到主場景某幀的按鈕代碼:
on (release) { tellTarget ("/") { gotoAndPlay ("場景 1", 2); } }
鼠標移動到一個位置跳轉幀,移開鼠標返回初始幀:
on (rollOver) { //當鼠標移動按鈕上時 _root.gotoAndPlay(3); //跳到第3幀并播放 } on (rollOut) { //當鼠標移開時 _root.gotoAndPlay(1); //跳到第1幀并播放 }
退出:
on (release) {
fscommand("quit", true);
}
最小化:
on (release) {
getURL("javascript:small.Click();");
}
最大化:
on(release){
fscommand("fullscreen","true");
}
全屏:
//下面放在全屏窗口按鈕里:
on(release){
fscommand("fullscreen","true");
}
//下面放在恢復窗口按鈕里:
on(release){
fscommand("fullscreen","false");
}
全屏一個按鈕:
on (release) {
var a:Boolean;
if (a) {
fscommand("fullscreen","false");
} else {
fscommand("fullscreen","true");
}
a = !a;
}
2015-04-18 16:41