问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/12504718/createjs-haxe-uncaught-referenceerror-createjs-is-not-defined