2024年4月25日发(作者:)

分享一些在制作MTV和个人Flash中常用的AS代码,附详细讲解

1.全屏播放fscommand("fullscreen",true);

2.打开时全屏,在该帧停止fscommand("fullscreen",true);stop();

3.跳帧播放(从第几针开始播放后)on (press) {gotoAndPlay(?);}

4.点击时开始播放on (press) {play();}

5.退出语句如果是FLASH自带的控件on (click){ fscommand("quit",""); }自已

做的按钮on (release){ fscommand("quit",""); }

6、当鼠标滑过影片剪辑时,停止播放时间轴。

on (rollOver) {_();}

7、当在影片剪辑上按下鼠标时,停止播放影片剪辑。

on (press) {stop();}

8、当影片剪辑上按下鼠标时,播放影片剪辑。

on (release) {play();}

9、当鼠标滑离影片剪辑时,播放当前时间轴。

on (rollOut) {_();}

10、Goto:

跳到一个指定的帧(Frame)Scene:

指定SceneFrame:

Number,Label,Expression,Next Frame,Previous Frame以选择Frame的编号,

标号,通过表达式,下一帧,前一帧Expression:

定义表达式可Control:

1 / 12

Go to and Play,Go to and Stop通过选择这个项目来确定到达指定的帧以后是

继续播放还是停止例子:

Go to and Play (1)跳到第一帧播放Go to Next Frame跳到下一帧播放Go to

and Stop ("intro")跳到标号为intro的帧播

11、Play:

播放Stop:

停止Toggle High Quality:

切换画面的细节程度Stop All Sounds:

停止所有声音式Get URL:

打开指定的网址URL:

网址Windows:

_self,_blank,_parent,_top打开网址时使用的目标Variableson’t Send,Send

useGET,Send use POST变量的传递方例子:

Get URL ("", window="_blank", vars=POST)在新窗口中打开,

并且传递参数

12、FScommand:

调用命令Command:

命令Arguments:

参数For standalone player:

fullscreen,allowscale,showmenu,exec,quit播放器使用的固定命令和参数例

子:

FS Command ("fullscreen", "true")设置全屏幕播放

2 / 12