# Changing Y position results in random position

**URL:** <https://forum.kirupa.com/t/changing-y-position-results-in-random-position/315969>\
**Category:** flash\
**Created:** [November 9, 2010, 2:01am UTC](https://forum.kirupa.com/t/changing-y-position-results-in-random-position/315969 "2010-11-09T02:01:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wMattD](https://avatars.discourse-cdn.com/v4/letter/w/aeb1de/32.png) [@wMattD](https://forum.kirupa.com/u/wMattD)\
**Post date:** [November 9, 2010, 2:01am UTC](https://forum.kirupa.com/t/changing-y-position-results-in-random-position/315969/1 "2010-11-09T02:01:15Z")

</div>

I’ve run into a new problem, this time with positioning. I’ve narrowed down the line that’s causing it–“block.y = block.y + block.height;” in SetOfBlocks.shiftDown. When I take it out, no problem. But with it in, instead of just dropping each block down by a block height, the affected blocks sometimes move up, and also often move about randomly within the X axis–although their new positions always keep them lined up with the ‘grid’, which is to say, within multiples of the block height and widths.

I don’t understand this behavior, especially since I don’t understand how changing an object’s y position can ever possibly effect it’s x position?

Any help is appreciated.

EDIT: Well, I just figured out _why_ they’re doing it–because their container is rotated. Now I just have to think of a way to move individual objects down globally without moving their container and with their local ‘down’ being any of the 4 directions.
