Copy link to clipboard
Copied
Hi there,
I've made the switch from AS3 to javascript. I'm having a problem coding the positions of movieclip symbols. In AS3 I could drag a symbol on the stage, note its positiona and tween it in code. In javascript the x y positions do not correlate to what I'm seeing on my stage.
Here's an example tweening a symbol called economy.
TweenMax.to(that.economy, 4, {y:150, ease:Sine.easeInOut, delay:0.5});
The stage is telling me that position I seek is y:393, but to get it to move to that position in code I have to ask it to go to y:150. Is there a way to get the code position and the stage position to line up?
Many thanks
Adam
TweenMax.to(that.economy, 4, {y:150, ease:Sine.easeInOut, delay:0.5});
Copy link to clipboard
Copied
I've seen similar things when testing on a retina display - that the case here? You basically have to test for screen depth and then adjust all measurements: window.devicePixelRatio
Copy link to clipboard
Copied
First, you're probably noting the registration point instead of the centerpoint.
Second, why are you using TweenMax instead of the built-in tween library?