PDA

View Full Version : Circular Mask Alignment Problems


OneninetyArtwork
09-18-2008, 01:20 PM
I'm having problems with the alignment of masks on circular bitmap objects.

In my example I'm using scans of coins but no matter what I do the transparency is out of register with the image.

If I delete the background in Photoshop and export as a .png with transparency the image looks fine on the stage, but when I run the preview it looks as though the alpha mask has moved up and to the left.

Keep the coin on a neutral background and export as .gif with out transparency and create a mask manually in Flash exactly the same thing happens.

I've posted an example HERE (http://62.233.101.75/clients/flash_test/coin_mask.html). The coin in the left is correctly masked but as you can see it displays incorrectly. The coin on the right has had the mask moved until it looks right in the preview.

Anyone know why this is happening and if it's possible to fix without having to manually move the mask?

mambo4
10-01-2008, 07:49 PM
I could be wrong, but:

it's not the mask, it's the bitmap that's the problem
or rather how flash renders bitmaps, and where the bitmap is onstage:

make sure your X and Y position for the bitmap is on a 'hard' pixel, not a fractional pixel. for example X:125 , y:200 instead of X:125.4 , y:200.3

When flash finds bitmap data on a fraction of a pixel, it has to round off which real pixel to render the bitmap data to, causing a pixel shift between .fla and .swf