Flash做电子杂志常用代码汇总
上一页:
on (release){prevframe();}
下一页:
on (release) {
nextFrame();
}
停止:
stop ();
跳转到多少帧后继续播放:
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