1

I have installed externs for createjs libraries:

haxelib install createjs

I added the createjs library to compile file:

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

And I can compile with no errors, but in chrome, I get this error:

Uncaught ReferenceError: createjs is not defined 

for the line

createjs.Ticker.useRAF = true;

Here is my html file:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>createjs_js_js</title>
    <meta name="description" content="" />
</head>
<body>

    <div id="haxe:trace"></div>
    <script src="m.js"></script>
</body>
</html>

Any idea please?

simo
  • 23,342
  • 38
  • 121
  • 218
  • 1
    Is this a duplicate of: http://stackoverflow.com/questions/12504718/createjs-haxe-uncaught-referenceerror-createjs-is-not-defined ? – Jason O'Neil Feb 11 '13 at 10:22
  • Or this: http://stackoverflow.com/questions/12341211/flashdevelop-haxe-import-createjs – Jason O'Neil Feb 11 '13 at 10:23
  • No, as I have included the createjs library in compilation libraries, I think it has to do with HTML side, shall I include the original createjs library?? – simo Feb 11 '13 at 10:35

1 Answers1

1

I found that I have to add

<script src="http://code.createjs.com/easeljs-0.5.0.min.js"></script>

in the HTML file, I thought that it will included within the compiled javascript file .. I hope this will help some one ..

simo
  • 23,342
  • 38
  • 121
  • 218