0

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.

Gama11
  • 31,714
  • 9
  • 78
  • 100
localhost
  • 450
  • 2
  • 6
  • 24
  • 1
    I haven't used the createJS library for Haxe, but it's possible that the library only includes the 'externs' (ie the info for the compiler), not the actual CreateJS code. Try including the official CreateJS javascript files before your haxe-generated javascript files. I have an answer here that describes a bit of how externs work: http://stackoverflow.com/a/12344618/180995 – Jason O'Neil Sep 20 '12 at 02:18
  • If you've verified that createjs has been included and it's loaded before your haxe javascript is, let me know and I'll take a closer look... – Jason O'Neil Sep 20 '12 at 02:19

1 Answers1

0

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.

Community
  • 1
  • 1
localhost
  • 450
  • 2
  • 6
  • 24