FlappMovieClip.prototype = {
setMatrix: function(matrix) {
- this.matrix = matrix;
- this.absoluteMatrix = this.parentMovieClip?(matrix?FlappSWFMatrix.multiply(this.parentMovieClip.absoluteMatrix, matrix):this.parentMovieClip.absoluteMatrix):matrix;
+ this.matrix = matrix;
+ this.absoluteMatrix = this.parentMovieClip?(matrix?FlappSWFMatrix.multiply(this.parentMovieClip.absoluteMatrix, matrix):this.parentMovieClip.absoluteMatrix):matrix;
},
clearControlTags: function() {
this.controlTagsList = [[]]; //
console.debug("FlappMovieClip::control: name:"+this.name+" playing:"+this.playing);
if (this.framesLoaded < this.totalframes) { // imcomplete
if (this.currentFrame < this.framesLoaded) {
- console.debug("control:imcomplete (currentFrame:"+this.currentFrame+" < framesLoaded:"+this.framesLoaded+")");
+ console.debug("control:imcomplete (currentFrame:"+this.currentFrame+" < framesLoaded:"+this.framesLoaded+")");
return false; // idle
}
}
if (tag.move && (tag.id === null)) {
this.displayList.move(tag.depth, tag);
} else {
- if (tag.move) {
- obj = this.displayList.get(tag.depth);
- if (obj === null) {
- console.error("Can't get DisplayObject by depth:"+tag.depth);
- }
- if (obj.code === 39) { // DefineSprite
- this.deleteChildMovieClip(obj.name);
- }
- this.displayList.del(tag.depth);
- }
+ if (tag.move) {
+ obj = this.displayList.get(tag.depth);
+ if (obj === null) {
+ console.error("Can't get DisplayObject by depth:"+tag.depth);
+ }
+ if (obj.code === 39) { // DefineSprite
+ this.deleteChildMovieClip(obj.name);
+ }
+ this.displayList.del(tag.depth);
+ }
defineTag = dict.get(tag.id);
- if (defineTag === null) {
- console.error("defineTag === undefined");
- return ;
- }
+ if (defineTag === null) {
+ console.error("defineTag === undefined");
+ return ;
+ }
var name = tag.name;
if ((name === null) && (defineTag.code === 39)) {
name = "instance"+this.instanceSeqno;
tag.name = name;
- this.instanceSeqno++;
+ this.instanceSeqno++;
}
obj = FlappObject.factory(this, name, defineTag, tag,
- dict);
+ dict);
// console.debug(obj);
- if (defineTag.code === 39) { // DefineSprite
- obj.totalframes = defineTag.count;
- obj.control(dict);
- this.addChildMovieClip(name, obj);
+ if (defineTag.code === 39) { // DefineSprite
+ obj.totalframes = defineTag.count;
+ obj.control(dict);
+ this.addChildMovieClip(name, obj);
}
this.displayList.set(tag.depth, obj, tag);
break;
case 5: // RemoveObject XXX
case 28: // RemoveObject2
this.displayList.del(tag.depth);
- break;
+ break;
}
}
},
}
},
render: function(canvas, dict) {
- console.debug("FlappMovieClip::render: name:"+this.name);
+ console.debug("FlappMovieClip::render: name:"+this.name);
var depthList = this.displayList.ascSortedDepth();
for (var i = 0, l = depthList.length ; i < l ; i++) {
var depth = depthList[i];
var obj = this.displayList.get(depth);
- console.debug(obj);
- // obj.render(this.canvas);
- obj.render(canvas, dict);
+ console.debug(obj);
+ // obj.render(this.canvas);
+ obj.render(canvas, dict);
}
},
setVariable: function(key, value) {