Search code examples
flashdevelophaxecreatejs

CreateJS + Haxe -> Uncaught ReferenceError: createjs is not defined


After a successfull compile of: http://nickalie.com/posts/67 , when I try to see it in the browser, I get a Uncaught ReferenceError: createjs is not defined right here (on the resulting compiled create.js file):

var Main = $hxClasses["Main"] = function() { }
Main.__name__ = ["Main"];
Main._shape = null;
Main._stage = null;
Main.main = function() {
    createjs.Ticker.useRAF = true;

Uncaught ReferenceError: createjs is not defined

    createjs.Ticker.setFPS(60);
    haxe.Log.trace("hallo~!",{ fileName : "Main.hx", lineNumber : 35, className :             "Main", methodName : "main"});
}

Edit:

Ok, I added both EaselJS/TweenJS files, no error, but nothing else happens.


Solution

  • Ok, I was abble to get this working with the help of #haxe iRC resident @Jan_Flanders. All that was needed was a build.hxml file:

    -main Main
    -cp src
    -lib createjs
    -js bin/m.js
    

    And then specify a hxml file: FlashDevelop -- Specify an HXML file? and now it works.