精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>网络专区>>● 网站建设>>神兵利器 — 网页编辑软件>>Flash>>FLASH的action命令详解

主题:FLASH的action命令详解
发信人: yasho()
整理人: morefeetin(2000-01-04 16:42:20), 站内信件
以FLASH4.0的菜单命令顺序排列

Goto  跳到指定的帧(Frame)
 Scene:  指定 Scene
 Frame:Number,Label,Expression,Next Frame,Previous Frame  可以选择 


Frame 的编号,跳到下一帧,前一帧
 Expression:  定义表达式
 Control:Go to and Play,Go to and Stop  选择这个选项来确定到达指

定的帧以后是播放还是停止

例如:
Go to and Play (1)  跳到第一帧播放
Go to Next Frame  跳到下一帧播放
Go to and Stop ("intro")  跳到标号为 intro 的帧播

 
 
 
 
 Play  播放

Stop  停止

Toggle High Quality  画面的细节程度

Stop All Sounds  停止所有声音

Get URL  打开指定的网址
 URL:  输入网址
 Windows:_self,_blank,_parent,_top  打开输入的网址时使用的目标
 Variables:Don't Send,Send use GET,Send use POST  变量的传递方式

例如:
Get URL ("next.asp", window="_blank", vars=POST)  打开新的窗口 nex

t.asp,并且传递参数

FScommand   调用外部命令
 Command:  命令
 Arguments: 参数
 For standalone player:fullscreen,allowscale,showmenu,exec,quit 媒体播
放使用的固定命令和参数

例如:
FS Command ("fullscreen", "true")  无可逃脱的全屏幕播放FLASH动画
 
 
 Load/Unload Movie  调入/释放外部的影片(主要用来镶嵌影片)
 Action:Load movie into location,Unload movie from location,Load vari


ables into location  选择是否调入新电影,释放已经调入的电影,或者调入
特定变量

 URL:  电影的地址
 Location:Level,Target  调入电影的层,或者是某对象所在的位置
 Variables:Don't Send,Send use GET,Send use POST  变量的传递方式

例如:
Load Movie ("test.swf", 1)  把 test.swf      调入到第一层 
Load Movie ("test.swf", "king", vars=GET)  把 test.swf 调入到 king 目
标对象的位置
Unload Movie ("king")  把 king 目标对象处的影片释放
Load Variables ("makeit.asp", 2, vars=GET)  调用 makeit.asp 并接收返
回的变量

Tell Target  指定目标对象
 Target:  目标对象

例如:
Begin Tell Target ("obj")  指定目标对象 obj
End Tell Target

If Frame is Loaded  判断某帧是否调入
 Scene:  指定场景
 Frame:Number,Label,Expression  指定帧,标号或者表达式
 Expression:  表达式

例如:
If Frame Is Loaded (Scene 1, "end")  判断场景一的标号为 end 的帧是否


调入
End Frame Loaded

On MouseEvent  鼠标时间响应
 Event:Press,Release,Release Outside,Roll Over,Roll Out,Drag Over,Dra


g Out,Key Press  各种事件:按下,放开,在外面放开,焦点移入,移出,拖


过,拖出,按键按下

例如:
On (Press)  鼠标按下的时候
End On
On (Key: s)  键盘上 s 按下的时候
End On

If  判断条件是否成立
 Condition:  条件
 Add Else/Else If clause  加入 Else 再次判断

例如:
If (a=10)  如果 a=10 那么……
End If
If (a=10)  如果 a=10 那么……不然……
Else
End If

Loop  循环
 Condition:  条件

例如:
Loop While (a=10)  如果 a=10 那么循环
End Loop

Call  调用函数帧或对象
 Frame:  函数帧

例如:
Call ("make")  调用 make 帧程序

Set Property  设置属性
 Set:Y Positon,X Position,Y Scale,X Scale,Alpha,Visibility,Rotation,N


ame,High quality,Show focus rectangle,Sound buffer time  设置 y 坐标


,x坐标,y 放大倍数,x 放大倍数,透明度,可视否,旋转角度,名称,精细度


,焦点矩形框是否显示,声音缓冲时间(默认5秒)
 Target:  目标对象
 Value:  值

例如:
Set Property ("aoe", X Position) = "12"  设置目标对象 aoe 的 x 坐标为


 12
Set Property (Show focus rectangle) = "0"  取消焦点框

Set Variable  设置变量
 Variable:  变量
 Value:  值

例如:
Set Variable: "test" = 10  设置 test=10

Duplicate/Remove Movie Clip  复制对象
 Action:Duplicate movie clip,Remove duplicate movie clip  可选择是复


制还是删除
 Target:  目标对象
 New name:  新目标对象的名字
 Depth:  深度

例如:
Duplicate Movie Clip ("aoe", "aoe2", 1)  复制 aoe 一个新的动画,名字


叫 aoe2
Remove Movie Clip ("aoe2")  删除目标对象 aoe2

Drag Movie Clip  拖动影片片段 
 Start drag operation  开始拖动
 Target:  目标对象
 Constrain to rectangle:Left,Top,Right,Bottom  鼠标的位置,左上右下



 Lock mouse to center:  鼠标放置在中心
 Stop drag operation  停止拖动

例如:
Start Drag ("aoe", L=2, T=3, R=4, B=5)  拖动目标对象 aoe,位置在 L=2


, T=3, R=4, B=5
Start Drag ("aoe", lockcenter)  拖动目标对象 aoe,位置在中心 
Stop Drag  停止拖动

Trace  跟踪
 Message:  信息

例如:
Trace ("aoe")  显示 aoe
Trace (aoe)  显示 aoe 的值

Comment  注释
 Comment:  注释

例如:
Comment ("计算")  注释:计算

  
 



--
 该活动活动了!
 ●       ●)     ●      ●)   \●/    \●
<┃>   (┃     (┃)   ()     ┃┃      ( > 
 /\    / )     (\   / )    / \      /\
  =左三拳,右三拳,脖子扭扭,屁股扭扭,你就不会老=

※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 202.103.177.119]

[关闭][返回]