OSDN Git Service

ハードタブをソフトタブ(スペース8個)に置換した
[flapp/flapp.git] / src / movieclip.js
index a6fc0d5..de1f9bc 100644 (file)
@@ -43,8 +43,8 @@ FlappMovieClip = function(parentMovieClip, matrix, colorTransform) {
 
 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 = [[]]; //
@@ -86,7 +86,7 @@ FlappMovieClip.prototype = {
         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
             }
         }
@@ -119,34 +119,34 @@ FlappMovieClip.prototype = {
                 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;
@@ -155,7 +155,7 @@ FlappMovieClip.prototype = {
             case 5:  // RemoveObject XXX
             case 28: // RemoveObject2
                 this.displayList.del(tag.depth);
-               break;
+                break;
             }
         }
     },
@@ -201,14 +201,14 @@ FlappMovieClip.prototype = {
         }
     },
     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) {