# \[FMX04\] Tile-based Centering Issues

**URL:** <https://forum.kirupa.com/t/fmx04-tile-based-centering-issues/306425>\
**Category:** flash\
**Created:** [March 15, 2010, 10:20am UTC](https://forum.kirupa.com/t/fmx04-tile-based-centering-issues/306425 "2010-03-15T10:20:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PsychoPop](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@PsychoPop](https://forum.kirupa.com/u/PsychoPop)\
**Post date:** [March 15, 2010, 10:20am UTC](https://forum.kirupa.com/t/fmx04-tile-based-centering-issues/306425/1 "2010-03-15T10:20:05Z")

</div>

I’m creating a pseudo-tile-based system for a project I’m working on, in the sense that from a programming perspective the project is tile-based, but the end-user won’t be able to tell, because the visuals will be pre-drawn without tiles. Anyway, this means in the code I have a matrix representing the map (the usual [[0,0,0,0],[0,0,0,0],[0,1,0,0],[1,1,1,1]] type deal) and a given constant size for tiles (say 32x32), and then I have a symbol graphically representing the map that’s - for the example I just gave - 128x128 pixels in size.

```
 The actual map, however, is actually much bigger. 36x27 tile maps. Anyway, I'm running into some issues centering the map around a certain point. For example, say I want to start the program out with the tile located at (10, 12) in the center of the movie. I initially tried things like "map._x = map._width/2 - 32 + centerx; map._y = map._width/2 - 32 + centery;" and similar formulae, but none of them appeared to work properly... how would I go about getting this to work? 

   Thanks, in advance.
```
