Commit a0c09c60 authored by wjf's avatar wjf

l

parent 875e18df
...@@ -72,7 +72,7 @@ export class EgretMovieClip extends egret.DisplayObjectContainer { ...@@ -72,7 +72,7 @@ export class EgretMovieClip extends egret.DisplayObjectContainer {
* 帧数范围播放 * 帧数范围播放
* @param beginFrame 开始播放的帧序号,默认第一帧 * @param beginFrame 开始播放的帧序号,默认第一帧
* @param endFrame 结束播放的帧序号,默认最后一帧 * @param endFrame 结束播放的帧序号,默认最后一帧
* @param loops 循环次数, 默认0,表示无限循环,无限循环callback无效,因为永远不会完成,用正常的complete监听最后一帧或第一帧 * @param loops 循环次数, 默认1次,0表示无限循环,无限循环callback无效,因为永远不会完成,用正常的complete监听最后一帧或第一帧
* @param callback 所有播放完的回调 * @param callback 所有播放完的回调
*/ */
startAniRange(beginFrame: number, endFrame: number, loops: number, callback?: Function): void startAniRange(beginFrame: number, endFrame: number, loops: number, callback?: Function): void
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
import { Parser } from '../parser' import { Parser } from '../parserCanvas'
import { Player } from './player' import { Player } from './player'
import { AutoLoader } from './autoLoader' import { AutoLoader } from './autoLoader'
......
...@@ -308,8 +308,8 @@ export class MovieClip extends egret.DisplayObjectContainer { ...@@ -308,8 +308,8 @@ export class MovieClip extends egret.DisplayObjectContainer {
* 播放范围动画, * 播放范围动画,
* @param beginFrame 开始帧 * @param beginFrame 开始帧
* @param endFrame 结束帧 * @param endFrame 结束帧
* @param loops 0一直循环 * @param loops 0一直循环 默认一次
* @param callback 0一直循环 * @param callback
*/ */
startAniRange( startAniRange(
beginFrame, beginFrame,
...@@ -319,7 +319,7 @@ export class MovieClip extends egret.DisplayObjectContainer { ...@@ -319,7 +319,7 @@ export class MovieClip extends egret.DisplayObjectContainer {
) { ) {
beginFrame = beginFrame || 1; beginFrame = beginFrame || 1;
endFrame = endFrame || this.totalFrames; endFrame = endFrame || this.totalFrames;
loops = loops || 0; loops = loops || 1;
if (beginFrame < 1) { if (beginFrame < 1) {
beginFrame = 1; beginFrame = 1;
} }
......
...@@ -47,6 +47,7 @@ export class Parser { ...@@ -47,6 +47,7 @@ export class Parser {
htmlImages[key] = backCanvas || imgTag; htmlImages[key] = backCanvas || imgTag;
if (count == countAll) { if (count == countAll) {
let videoItem = new VideoEntity(movie, htmlImages); let videoItem = new VideoEntity(movie, htmlImages);
console.log(videoItem)
success(videoItem); success(videoItem);
} }
} }
......
import { VideoEntity } from './videoEntity'
import MockWorker from './mockWorker'
export class Parser {
/**
* url: 资源路径
* success(VideoEntity videoItem)
*/
load(url, success, failure) {
this.loadViaWorker(url, success, failure);
}
loadViaWorker(url, success, failure) {
MockWorker(url, (data) => {
let movie = data.movie;
movie["version"] = data.ver;
let images = data.images;
let videoItem = new VideoEntity(movie, images);
success(videoItem);
}, failure)
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment