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

三世轮回 提交于 2019-12-08 12:03:46

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!