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

SHIM


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. Use frame.mouseX and frame.mouseY to capture mouse positions
    This accomodates the scaling of the stage on export to HMTL 5
  3. Initially, we recommended putting MovieClips in ZIM containers
    but this is no longer needed with zimify() in ZIM 10.5.4 and beyond
  4. 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
  5. drag() will drag parts of a MovieClip unless you drag({all:true})
  6. See the ZIM Tips for many modern ways we code in ZIM
  7. If you are new to ZIM - make sure you use ZIM Docs and ZIM Learn!