movie
标签 | 描述 |
video | 设定影片参数 |
openvideo | 读取影片 |
playvideo | 播放影片 |
pausevideo | 暂停影片 |
stopvideo | 停止播放影片 |
resumevideo | 播放暂停的影片 |
rewindvideo | 倒带 |
videosegloop cancelvideosegloop | 影片在某一个范围内循环播放 取消影片的循环播放 |
wp wv | 等待影片周期 等待影片停止 |
preparevideo | 重绘影片 |
videolayer | 储存及设定videoLayer |
clearvideolayer | 清除由videolayer所产生的行为 |
videoevent cancelvideoevent | 设定到某一帧时触发事件 取消事件触发 |
video
说明: (1) 设定影片参数 (2) 内部通过movies[+elm.slot].setOptions(elm)实现 |
属性: slot: 影片缓冲object的编号 visible: 是否可视 left: 生成的x坐标 top: 生成的y坐标 width: 影片宽度 height: 影片高度 position: 影片开始播放位置(ms), 不能与frame共存 loop: 是否循环播放 frame: 影片开始播放位置(frame), 不能与position共存 mode: 绘画方式, 有vomLayer, vomOverlay, vomMixer playrate: 播放速度, 1为正常, 2为两倍速 volume: 声量大小, 1~100 pan: 左右声道声量大小, 1~100 audiostreamnum:双声道使用, 一般可以不填 |
例子: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .video( %[slot:0, visible:true,left:0, top:0, width:100, height:100, position:0, loop:true, mode:vomLayer, playrate:1, volume:100, pan:100] ); } |
openvideo
说明: (1) 读取影片 (2) 内部通过movies[+elm.slot].open(elm.storage)实现 |
属性: slot: 影片缓冲object的编号 storage: 影片路径 |
例子: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .openvideo( %[ slot:0, storage:"a.avi" ] ); } |
playvideo
说明: (1) 播放影片 (2) 内部通过movies[+elm.slot].play(elm.storage)实现 |
属性: slot: 影片缓冲object的编号 storage: 影片路径 |
例子: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .video( %[slot:0, visible:true,left:0, top:0, width:100, height:100, position:0, loop:true, mode:vomLayer, playrate:1, volume:100, pan:100] ); .playvideo( %[ slot:0, storage:"a.avi" ] ); } |
pausevideo
说明: (1) 暂停影片 (2) 内部通过movies[+elm.slot].pause()实现 |
属性: slot: 影片缓冲object的编号 |
例子: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .video( %[slot:0, visible:true,left:0, top:0, width:50, height:100, position:0, loop:true, mode:vomOverlay, playrate:1, volume:100, pan:100] ); .playvideo( %[ slot:0, storage:"a.avi" ] ); .pausevideo( %[ slot:0 ] ); } |
stopvideo
说明: (1) 停止播放影片 (2) 内部通过movies[+elm.slot].stop()实现 |
属性: slot: 影片缓冲object的编号 |
例子: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .video( %[slot:0, visible:true,left:0, top:0, width:50, height:100, position:0, loop:true, mode:vomOverlay, playrate:1, volume:100, pan:100] ); .playvideo( %[ slot:0, storage:"a.avi" ] ); .stopvideo( %[slot:0] ); } |
resumevideo
说明: (1) 播放暂停的影片 (2) 内部通过movies[+elm.slot].resume()实现 |
属性: slot: 影片缓冲object的编号 |
例子: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .video( %[slot:0, visible:true,left:0, top:0, width:50, height:100, position:0, loop:true, mode:vomOverlay, playrate:1, volume:100, pan:100] ); .playvideo( %[ slot:0, storage:"a.avi" ] ); .pausevideo( %[ slot:0 ] ); .resumevideo( %[ slot:0 ] ); } |
rewindvideo
说明: (1) 倒带 (2) 内部通过movies[+elm.slot].rewind()实现 |
属性: slot: 影片缓冲object的编号 |
例子: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .video( %[slot:0, visible:true,left:0, top:0, width:50, height:100, position:0, loop:true, mode:vomOverlay, playrate:1, volume:100, pan:100] ); .playvideo( %[ slot:0, storage:"a.avi" ] ); .rewindvideo( %[ slot:0 ] ); } |
videosegloop
说明: (1) 影片循环播放, 在某一段范围内 (2) 内部通过movies[+elm.slot].setSegment(elm)实现 |
属性: slot: 影片缓冲object的编号 start: 影片循环播放开始点, 默认值是0 end: 影片循环播放结束点 |
例子: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .video( %[slot:0, visible:true,left:0, top:0, width:50, height:100, position:0, loop:true, mode:vomOverlay, playrate:1, volume:100, pan:100] ); .videosegloop( %[ slot:0, start:0, end:10 ] ); .playvideo( %[ slot:0, storage:"a.avi" ] ); } |
cancelvideosegloop
说明: (1) 取消影片循环播放 (2) 内部通过movies[+elm.slot].cancelSegmentLoop()实现 |
属性: slot: 影片缓冲object的编号 |
wp
说明: (1) 等待影片周期到了, 如果能成功设定好该事件就回传0, 否则回传-2, 关于perios, 可参考影片内置类的onPeriod事件 (2) 内部通过waitMoviePeriod(elm)实现 |
属性: slot: 影片缓冲object的编号 for: 触发类型, String类型, loop, period, prepare, segLoop |
例子1: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .video( %[slot:0, visible:true,left:0, top:0, width:50, height:100, position:0, loop:true, mode:vomOverlay, playrate:1, volume:100, pan:100] ); .playvideo( %[ slot:0, storage:"a.avi" ] ); .wp( %[ slot:0, "for"=>"loop" ] ); } |
例子2: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .video( %[slot:0, visible:true,left:0, top:0, width:50, height:100, position:0, loop:true, mode:vomOverlay, playrate:1, volume:100, pan:100] ); .playvideo( %[ slot:0, storage:"a.avi" ] ); .wp( %[ slot:0, "for"=>"loop" ] ); } |
wv
说明: (1) 等待影片停止, 如果canskip=true以及skipMode=true就回传0, 否则回传-2 (2) 内部通过waitMovieStop(elm)实现 |
属性: slot: 影片缓冲object的编号 canskip: 是否可以跳过 |
例子: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .video( %[slot:0, visible:true,left:0, top:0, width:50, height:100, position:0, loop:true, mode:vomOverlay, playrate:1, volume:100, pan:100] ); .playvideo( %[ slot:0, storage:"a.avi" ] ); .wv( %[ slot:0, canskip:true ] ); } |
preparevideo
说明: (1) 重绘影片, 主要是用于手动启动一次onPeriod事件, 与内置类的方法一模一样 (2) 内部通过movies[+elm.slot].prepare()实现 |
属性: slot: 影片缓冲object的编号 |
videolayer
说明: (1) 储存及设定videoLayer, 暂时不知道意义 (2) 内部通过movies[+elm.slot].storeLayer( elm.layer, elm.page, elm.channel )和movies[+elm.slot].setVideoLayer(getLayerFromElm(elm),elm)实现 |
属性: slot: 影片缓冲object的编号 layer: Movie类有一个数组, layerNumber[长度2], layerPage[长度2], 和下面的channel解释中的两个layer相似, 每个video对象可以用两个layerNumber和两个layerPage page: 看上面-- channel: 确定储存在layer1还是layer2层中, 因为Video当mode= vomLayer时, 它会给你两个layer对象给你写东西, 那两个对象可以同时播放影片, channel只可以是1或2 |
clearvideolayer
说明: (1) 清除由videolayer所做的动作 (2) 内部通过movies[+elm.slot].cancelLayer( elm.channel )、movies[+elm.slot].setVideoLayer(null,elm)实现 |
属性: slot: 影片缓冲object的编号 channel: 看上面的videolayer函数 |
videoevent
说明: (1) 设定到某一frame时触发onPeriod(内置)事件 (2) 内部通过movies[+elm.slot].setPeriod(elm)实现 |
属性: slot: 影片缓冲object的编号 frame: 执行事件的那一frame |
例子: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .video( %[slot:0, visible:true,left:0, top:0, width:50, height:100, position:0, loop:true, mode:vomOverlay, playrate:1, volume:100, pan:100] ); .playvideo( %[ slot:0, storage:"a.avi" ] ); .videoevent ( %[ slot:0, frame:0 ] ); } |
cancelvideoevent
说明: (1) 取消设定到某一frame时触发onPeriod(内置)事件 (2) 内部通过movies[+elm.slot].cancelPeriodEvent()实现 |
属性: slot: 影片缓冲object的编号 |
例子: var oMV1 = new Movie (kag, "0"); kag.movies[ 0 ] = oMV1; with ( kag.tagHandlers ) { .video( %[slot:0, visible:true,left:0, top:0, width:50, height:100, position:0, loop:true, mode:vomOverlay, playrate:1, volume:100, pan:100] ); .playvideo( %[ slot:0, storage:"a.avi" ] ); .videoevent ( %[ slot:0, frame:0 ] ); . cancelvideoevent ( %[ slot:0 ] ); } |