Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Added info on namespacing

  • Loading branch information...
1 parent 471692d commit 59c35a991b9699a4d4009d869b2992ba9a4d0a37 @lannymcnie lannymcnie committed
Showing with 24 additions and 0 deletions.
  1. +24 −0 CREATEJS_NAMESPACE.txt
@@ -0,0 +1,24 @@
+In the NEXT version of CreateJS class definitions reside in a "createjs" namespace by default.
+For example, instead of instantiating a Shape like this:
+var foo = new Shape();
+You will need to reach into the createjs namespace:
+var bar = new createjs.Shape();
+This functionality is configurable though. You can easily shortcut the namespace or get rid of it completely.
+To shortcut the namespace, just point a different variable at createjs it is loaded:
+<script src="easeljs.js"></script>
+var c = createjs; // creates a reference to the createjs namespace in "c"
+var foo = new c.Shape();
+To remove the namespace, just point the createjs variable at the window before loading the libraries:
+var createjs = window; // sets window as the createjs namespace (the object the classes will be defined in)
+<script src="easeljs.js"></script>
+This will also make CreateJS libraries compatible with old content that did not use a namespace, such as the output from the Flash Pro Toolkit for CreateJS v1.0.

0 comments on commit 59c35a9

Please sign in to comment.
Something went wrong with that request. Please try again.