In AS3, when you access the x and y properties of a movieclip that is on the stage, you get the actual properties of the movieclip's origin (0,0 in the symbol).
In CreateJS, however, the x and y properties return the Transformation Point (the registration point that the Free Transform tool uses). By default the Transformation Point is in the center of the object, but it can be moved graphically within the symbol by the Animate author.
I am converting AS3 code to JS and this creates a major problem. I have movieclips that correctly align under AS3 script control, that now are in the wrong places under JS control. (A nasty surprise is if you happen to have moved the Transformation Point by mistake when dragging with the Free Transform tool.) This was discussed in a very old thread on the CreateJS/EaselJS git site, but there was no clear soluion. https://github.com/CreateJS/EaselJS/issues/14
Anyone know if there different properties we can access to get the movieclip's true x and y?
The only workaround I can see is to manually go into Animate, zoom in on each and every movieclip of interest, click the Free Transform tool, and drag the transformation point (circle) onto the movieclips origin (+ mark). Very slow and not accurate
Related question: anyone know how to configure Animate to run the current version of CreateJS?)
Thank you all!
CreateJS version is 1.0.0 (this is loaded with Adobe Animate for publishing to HTML5/Canvas)
Animate version is 20.0.1
Windows 10, Chrome
You can reset a symbol's registration point by just double-clicking it.
You should be able to zero out the registration offset with something like...
this.myClip.x -= this.myClip.regX; this.myClip.y -= this.myClip.regY; this.myClip.regX = 0; this.myClip.regY = 0;
And trying to force a version of CreateJS on your projects other than the version Animate think it's publishing to is foolhardy at best.
Thank you very much, that works! Not sure why I missed the regX and regY properties before.
My question re the CreateJS version really meant to ask, does Adobe support specifying the CreateJS version in Animate? Or more generally, what is Adobe's policy for updating Animate as bug fixes or improvements to CreateJS are released? Do newer versions of Animate incorporate newer versions of CreateJS?