PDA

View Full Version : Button shifts 1 pixel


brad51
03-15-2011, 05:06 PM
hi. i have a movieclip added to my scene using as3. the movieclip contains other movieclips and buttons. i use a greensock Tween.to to move the movieclip onto the stage.
for some reason, the buttons shift to the right approximately 1 pixel when i hover over them the first time. nothing else shifts, just the button i hover over. there is no animation on the buttons. they consist of properly aligned png files for the up and down states. the buttons behave normally when used the second time or any time thereafter. once i close the movieclip containing the buttons, and reopen it, the same problem happens again.
any ideas?
thanks very much.

lilreaper13
03-23-2011, 02:00 PM
Are the x and y values of the buttons are rounded? Or are they like 185.45? This may be your problem, it was mine for a while lol

brad51
03-23-2011, 02:41 PM
Are the x and y values of the buttons are rounded? Or are they like 185.45? This may be your problem, it was mine for a while lol
yeah. i thought about that. i already made sure everything was in whole numbers. but no change... thanks.

acowbear
07-07-2011, 02:29 PM
I was just having this same issue and it was driving me nuts. It was a button that was an image of a dvd that had a stronger glow on rollover. It seemed to be shifting because of the glow effect on the dvd.

After trying a million things I found a solution by putting a copy of the dvd with no glow on top my dvd with a glow. This way the image on top did not shift, because it had no glow on it, and the glow still shown through from the glowing dvd under the non-glowing dvd. This simulated a single glowing dvd, and prevented the user from seeing the pixel shift that the glowing version of dvd was doing.

Hope this helps!

brad51
07-07-2011, 02:42 PM
thanks for your reply. my problem disappeared but i was never sure why. but i'm glad to know there may be logical solutions.