在javascript中可以使用以下函数来控制页面中的flash 在页面中插入兼容的flash或者获取flash对象可以使用swfobject插件来实现 SWFObject是一种易用的、符合标准的在网页中嵌入flash对象的方法,你只需要在网页中引用一个小巧的js文件 ------------------------------------------------------------------------------ 飞飞Asp技术乐~园swfobject相关的资料可以点击查看这里 ------------------------------------------------------------------------------ Play() ----------------------------------------- 播放动画 StopPlay()---------------------------------------------- 停止动画 IsPlaying()---------------------------------------------- 动画是否正在播放 GotoFrame(frame_number)---------------------------- 跳转到某帧 飞飞A,sp技术乐园IE:TotalFrames Firefox:TotalFrames()------获取动画总帧数 飞!飞Asp技术乐园CurrentFrame()-----------------------------------------回传当前动画所在帧数-1 Rewind()-------------------------------------------------使动画返回第一帧 SetZoomRect(left,top,right,buttom)------------放大指定区域 Zoom(percent)-----------------------------------------改变动画大小 Pan(x_position,y_position,unit)--------------------使动画在x,y方向上平移 PercentLoaded()---------------------------------------返回动画被载入的百分比 LoadMovie(level_number,path)--------------------加载动画 TGotoFrame(movie_clip,frame_number)--------movie_clip跳转到指定帧数 TGotoLabel(movie_clip,label_name)--------------movie_clip跳转到指定标签 TCurrentFrame(movie_clip)--------------------------回传movie_clip当前帧-1 TCurrentLabel(movie_clip)---------------------------回传movie_clip当前标签 TPlay(movie_clip)---------------------------------------播放movie_clip TStopPlay(movie_clip)---------------------------------停止movie_clip的播放 GetVariable(variable_name)--------------------------获取变量 SetVariable(variable_name,value)------------------变量赋值 TCallFrame(movie_clip,frame_number)-----------call指定帧上的action TCallLabel(movie_clip,label)--------------------------call指定标签上的action TGetProperty(movie_clip,property)---------------获取movie_clip的指定属性 TSetProperty(movie_clip,property,number)----设置movie_clip的指定属性
|