Change layer for symbol in code - HTML5 Canvas
How can a symbol be changed to a layer through JavaScript?
How can a symbol be changed to a layer through JavaScript?
Ah, item.name
this:
item.x-=item.lensParentLeft.x-9.5;
item.y-=item.lensParentLeft.y-9.5;
suggests item.lensParentLeft is not aligned at 0,0 on its own timeline, and is 19px wide and high and is centered. align at 0,0 and you won't need that fudge factor. or if that's where it needs to be aligned for other reasons use:
item.x-=item.lensParentLeft.x-item.lensParentLeft.width/2;
item.y-=item.lensParentLeft.y-item.lensParentLeft.height/2;
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.