OSDN Git Service

- framesLoaderd => framesLoaded (typo)
authorYoshihiro Yamazaki <yoya@awm.jp>
Tue, 4 Dec 2012 12:16:29 +0000 (21:16 +0900)
committerYoshihiro Yamazaki <yoya@awm.jp>
Tue, 4 Dec 2012 12:16:29 +0000 (21:16 +0900)
- var obj の宣言を一カ所に(本来は関数の先頭の置くべきだが、とりあえず見た目のブロックの先頭に)
- FlappShape の頭の new の付け忘れを修正

src/movieclip.js

index 23dca47..a6da73d 100644 (file)
@@ -39,7 +39,7 @@ FlappMovieClip = function(parentMovieClip, name, matrix, colorTransform) {
 };
 
 FlappMovieClip.prototype = {
-    clearControlTags: function(controlTag) {
+    clearControlTags: function() {
         this.controlTagsList = [[]]; //
         this.actionTagsList = [[]];
         this.labelMap = {}; // label => frameNum
@@ -77,8 +77,8 @@ FlappMovieClip.prototype = {
             return false;
         }
         console.debug("FlappMovieClip::control");
-        if (this.framesLoaderd < this.totalframes) { // imcomplete
-            if (this.currentFrame < this.framesLoaderd) {
+        if (this.framesLoaded < this.totalframes) { // imcomplete
+            if (this.currentFrame < this.framesLoaded) {
                 return false; // idle
             }
         }
@@ -119,11 +119,11 @@ FlappMovieClip.prototype = {
                             defineTag.name = name;
                             this.childMovieClips_seqnum++;
                         }
-                        var obj = FlappMovieClip(this, name, tag.matrix, tag.colorTransform);
+                        obj = new FlappMovieClip(this, name, tag.matrix, tag.colorTransform);
                         obj.setControlTags(defineTag.controlTags);
                         this.addChildMovieClip(name, obj);
                     } else if (defineTag.code === 2) { // DefineShape
-                        var obj = new FlappShape(name, tag.matrix, tag.colorTransform);
+                        obj = new FlappShape(name, tag.matrix, tag.colorTransform);
                         console.log(obj);
                         obj.loadShapeTag(defineTag);
                     }