1 Reply Latest reply on Apr 23, 2014 8:22 AM by sinious

    Toolkit is creating an undefined error on line 9 of the js file


      I want to place my Preload of images into a separate js file.
      I call this ContentManager.js. I don't want to preload and reference movieclips in index.html
      When testing the file, I get an error on line 9 of the lib_300x250_cs6.js created by Toolkit.
      Line 9 - .prototype = p = new cjs.Container();
      Error - Uncaught TypeError: undefined is not a function

      Since this is an error, when I reference my library for the movieclip on line 50 of ContentManager I get the same error.
      this.camry = new lib.Camry();

      What is undefined in the lib_300x250_cs6.js created by Toolkit?



      JS file

      (function (lib, img, cjs) {



      var p; // shortcut to reference prototypes



      // stage content:

      (lib.lib_300x250_cs6 = function() {




      }).prototype = p = new cjs.Container();

      p.nominalBounds = new cjs.Rectangle(0,0,0,0);



      The ContentManager.js which loads the jpgs and registers libs

      This registration does not work

      this.camry = new lib.Camry();


      So I am loading the images in a js file not in index.html using var queue = new createjs.LoadQueue(false);