ZIM SHIM - for Adobe Animate - Code and Learn Coding with ZIM for JavaScript and HTML Canvas with CreateJS


ZIM SHIM for Adobe Animate - is here!

In Animate, choose: Publish Settings > Advanced > Export Template and make the following changes: add a script tag to the latest ZIM below the $CREATEJS_LIBRARY_SCRIPTS then add the following code beneath the $CREATE_STAGE. Or download this TEMPLATE (V2) along with a sample FLA file. Then import the template and code with ZIM in Animate. Watch the VIDEO. Join us on SLACK for help.

Here are a few things to watch out for when working with ZIM in Animate.
  1. Adobe scripts have a loop parameter so set loop = zim.loop; to use loop()
  2. Mouse event e.stageX, e.stageY will need to be divided by stage scale
    so e.stageX/stage.scaleX and e.stageY/stage.scaleY
    This is because Adobe and CreateJS scale the stage on export
  3. Be careful with bounds in Animate - many ZIM features need bounds set
    After zimify(obj) you can obj.setBounds() and obj.outline() to see bounds
    MovieClips will handle better if put in a ZIM Container with bounds set
    otherwise MovieClips will not drag properly due to stage scaling differences
  4. drag() will drag parts of a clip unless you drag({all:true})
  5. See the ZIM Tips for many modern ways we code in ZIM
  6. If you are new to ZIM - make sure you use ZIM Docs and ZIM Learn!