Commit 875e18df authored by wjf's avatar wjf

l

parent 4f61b4c1
...@@ -18,10 +18,27 @@ export class Parser { ...@@ -18,10 +18,27 @@ export class Parser {
} }
export class EgretMovieClip extends egret.DisplayObjectContainer { export class EgretMovieClip extends egret.DisplayObjectContainer {
/**
* 锁步,只关心每帧间隔时间,不管浏览器帧率
* 默认false
*/
lockStep: boolean; lockStep: boolean;
/**
* 当前帧数
* 1最小
*/
readonly currentFrame: number; readonly currentFrame: number;
/**
* 是否播放
*/
readonly isPlaying: boolean; readonly isPlaying: boolean;
/**
* 正序还是反序
*/
readonly isFront: boolean; readonly isFront: boolean;
/**
* 所有帧数
*/
totalFrames: number; totalFrames: number;
/** /**
* 停止 * 停止
...@@ -31,7 +48,13 @@ export class EgretMovieClip extends egret.DisplayObjectContainer { ...@@ -31,7 +48,13 @@ export class EgretMovieClip extends egret.DisplayObjectContainer {
* 播放 * 播放
*/ */
play(): void; play(): void;
/**
* 进入下一帧
*/
nextFrame(): void; nextFrame(): void;
/**
* 进入上一帧
*/
prevFrame(): void; prevFrame(): void;
/** /**
* 停在指定帧 * 停在指定帧
...@@ -39,7 +62,7 @@ export class EgretMovieClip extends egret.DisplayObjectContainer { ...@@ -39,7 +62,7 @@ export class EgretMovieClip extends egret.DisplayObjectContainer {
*/ */
gotoAndStop(frameIndex: number): void; gotoAndStop(frameIndex: number): void;
/** /**
* * 从某帧开始播放
* @param frameIndex 1开始 * @param frameIndex 1开始
* @param isFront 默认true正向播放 * @param isFront 默认true正向播放
*/ */
...@@ -47,9 +70,9 @@ export class EgretMovieClip extends egret.DisplayObjectContainer { ...@@ -47,9 +70,9 @@ export class EgretMovieClip extends egret.DisplayObjectContainer {
readonly isInTimeFrame: boolean; readonly isInTimeFrame: boolean;
/** /**
* 帧数范围播放 * 帧数范围播放
* @param beginFrame 默认第一帧 * @param beginFrame 开始播放的帧序号,默认第一帧
* @param endFrame 默认最后一帧 * @param endFrame 结束播放的帧序号,默认最后一帧
* @param loops 默认0,表示无限循环,无限循环callback无效,因为永远不会完成,用正常的complete监听最后一帧或第一帧 * @param loops 循环次数, 默认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
......
...@@ -309,6 +309,7 @@ export class MovieClip extends egret.DisplayObjectContainer { ...@@ -309,6 +309,7 @@ export class MovieClip extends egret.DisplayObjectContainer {
* @param beginFrame 开始帧 * @param beginFrame 开始帧
* @param endFrame 结束帧 * @param endFrame 结束帧
* @param loops 0一直循环 * @param loops 0一直循环
* @param callback 0一直循环
*/ */
startAniRange( startAniRange(
beginFrame, beginFrame,
...@@ -351,7 +352,7 @@ export class MovieClip extends egret.DisplayObjectContainer { ...@@ -351,7 +352,7 @@ export class MovieClip extends egret.DisplayObjectContainer {
this.startFrame = this._curFrame; this.startFrame = this._curFrame;
this._isPlaying = true; this._isPlaying = true;
let func; let func;
let loopCount = loops ? (loops + 0.5 >> 0) : Infinity; let loopCount = loops > 0 ? (loops + 0.5 >> 0) : Infinity;
this.addEventListener(egret.Event.ENTER_FRAME, func = function (e) { this.addEventListener(egret.Event.ENTER_FRAME, func = function (e) {
if (e.target._isFront) { if (e.target._isFront) {
if (e.target.currentFrame >= endFrame /*&& e.target.isInTimeFrame*/) { if (e.target.currentFrame >= endFrame /*&& e.target.isInTimeFrame*/) {
......
...@@ -17,6 +17,9 @@ export class Parser { ...@@ -17,6 +17,9 @@ export class Parser {
movie["version"] = data.ver; movie["version"] = data.ver;
let images = data.images; let images = data.images;
// let videoItem = new VideoEntity(movie, images);
// success(videoItem);
//白鹭的在base64图片都加载完用标签传
let countAll = Object.getOwnPropertyNames(images).length; let countAll = Object.getOwnPropertyNames(images).length;
let count = 0; let count = 0;
let htmlImages = {}; let htmlImages = {};
......
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