CreateJS + Haxe->未捕获的ReferenceError:未定义createjs [英] CreateJS + Haxe -> Uncaught ReferenceError: createjs is not defined
问题描述
成功编译以下内容后: http://nickalie.com/posts/67 ,当我尝试在浏览器中看到它,但出现 Uncaught ReferenceError:未定义createjs
(在生成的已编译create.js文件上):
var Main = $ hxClasses [ Main] = function(){}
Main .__ name__ = [ Main];
Main._shape = null;
Main._stage = null;
Main.main = function(){
createjs.Ticker.useRAF = true;
未捕获的ReferenceError:未定义createjs
createjs.Ticker.setFPS(60);
haxe.Log.trace( hallo !!,{fileName: Main.hx,lineNumber:35,className: Main,methodName: main}));
}
编辑:
好,我添加了两个EaselJS / TweenJS文件,没有错误,但没有其他反应。
好吧,我很想在#haxe iRC居民@Jan_Flanders的帮助下完成此工作。
所需的只是一个build.hxml文件:
-main Main
-cp src
-lib createjs
-js bin / m.js
然后指定一个hxml文件: FlashDevelop-指定HXML文件?,现在可以使用了。 p>
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.
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.
这篇关于CreateJS + Haxe->未捕获的ReferenceError:未定义createjs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!