Flash CS4 Bug: Distribute To Layers moves objects 0.5 pixels

March 17th, 2009 by Steven Sacks

So here's another weird bug in Flash CS4. The first time it happened, I started to write a blog post about it, and then I made a new file and it didn't happen. I thought it was a fluke. But, it's happened a few more times since then in different files on different machines.

Bug Description
You have some items on the stage in a MovieClip all on the same layer, like Shapes and/or TextFields. You click on the layer, then right-click on an item and choose Distribute To Layers. Everything gets distributed correctly, but some items get shifted by 0.5 pixels in a random direction. If you undo and do Distribute To Layers again, they get shifted again but in a different direction.

This does not happen in brand new Flash files. It seems to only start happening once you have been working in a file for awhile. Once it starts happening, it's pretty much going to happen in that file from then on anytime you use Distribute To Layers.

How To Reproduce
Unfortunately, I don't have any specific steps to take to make it happen reliably. I can say that it happens on both OSX and on Windows XP, and it has happened on different machines with different files. It's only intermittent in that it doesn't always happen to a file, but once it happens once, it continues to happen in that file from then on. It also does not make a difference whether you're inside the MovieClip directly (double-clicking in the library) or if you dug down to it from the top level.

Workaround
You can copy and paste the MovieClip from your library into a new Flash file, go inside it and Distribute To Layers and it will not shift the items. You can then copy it back to the original Flash file.

Posted in Bugs, Flash

8 Responses

  1. Sebastian

    Hi Steve,

    i noticed this bug some time ago in CS3. It's really annyoing because distribute to layers is a nice way to have your layers named automatically and separate each object/movieclip.

    I now use it in combination with a .jsfl-script executed via a keyboard shortcut to shift the object back to whole pixels. But this doesnt't always work well with Textfields or Shape Objects.
    Maybe it is possible to recreate the distribute to layers function with jsfl an integrate the whole-pixel-rounding.

    Sebastian

  2. Mads Bjerre

    I noticed this too in CS3 (I was on the closed beta) and even submitted a bug report regarding the problem. Kinda bummed that Adobe hasn't considered it high enough priority yet to fix it.

  3. Ben P

    I've heard about this bug before.
    In CS3 it seems to only happens if you have "Snap to pixels" turned on. I distribute to layer often and it doesn't move stuff when I have it turned off.
    –just remember to turn "Snap to pixels" off before distributing to layer, and then turn it back on after if you wish (JSFL?).

    I'm not sure about CS4 though…

  4. Rob

    This bug was mentioned in the comments of a Mike Chambers blog post he wrote five years ago.

    http://www.mikechambers.com/blog/2004/07/13/modify-timeline-distribute-to-layers/comment-page-1/

  5. amoslanka

    As the previous commenters stated, this was definitely an issue in CS3 as well, and only when snap to pixels was turned on. Our solution was to write a JSFL command, which doesn't work perfectly like the built in command, but at least gets most of the job done the same way. We posted it on our blog if anyone is interested:

    http://summitprojectsflashblog.wordpress.com/2008/10/17/flash-cs4-fails-to-fix-distribute-to-layer-jsfl-script-in-response/

  6. Steven Sacks

    Wow. I can't believe this old bug has never been fixed. I never noticed it before and I use Distribute to Layers all the time. Thanks for the info!

    Hey Adobe, fix this!

  7. YL

    Now I really, really, REALLY miss the old Macromedia days.

    I still have my Studio 8 installed, so maybe I'll just use that when I don't need AS3.

  8. YL

    EDIT:

    …Sorry for not reading through previous posts. It's there since Flash 8!?

    I'm not a programmer, but I don't think this problem is too hard to fix. Just stop considering if Snap to Pixel is on when using the Distribute to Layers command!

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

About Steven Sacks

I am a professional Flash developer with over 13 years of programming experience. I have consulted for high-profile agencies and companies in San Francisco, Los Angeles, Atlanta and New York, and developed numerous award-winning websites and rich internet applications for clients including Adobe, Fox Sports, FX Networks, Anheuser-Busch, GE, DirecTV, ESPN, The Weather Channel, Home Depot, and Coca-Cola.

I am the author of the open-source Gaia Framework for Adobe Flash, which dramatically reduces development time and makes developing Flash sites much easier.