# Trying to hide indivdiual tiles in tilemap effectively

**URL:** <https://forum.kirupa.com/t/trying-to-hide-indivdiual-tiles-in-tilemap-effectively/321249>\
**Category:** flash\
**Created:** [April 14, 2011, 8:12am UTC](https://forum.kirupa.com/t/trying-to-hide-indivdiual-tiles-in-tilemap-effectively/321249 "2011-04-14T08:12:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Teonnyn](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@Teonnyn](https://forum.kirupa.com/u/Teonnyn)\
**Post date:** [April 14, 2011, 8:12am UTC](https://forum.kirupa.com/t/trying-to-hide-indivdiual-tiles-in-tilemap-effectively/321249/1 "2011-04-14T08:12:03Z")

</div>

Hello to Kirupa!  
I’ve been working on a game for the past couple of months and have gotten to the point where it’s almost ready - however, there is one part that has me completely stumped. My tilemap rendering class works the way it should, loading a file from XML… however from there, to make it more efficient I’m trying to figure out ways to hide it when the map goes off-screen - past particular x/y coordinates. So far… I’ve studied Tonypa’s AS2, but can’t figure out how to apply it to this:

[http://pastebin.com/x2x9mn6j](http://pastebin.com/x2x9mn6j)

Each tile is a movieclip object with different frames to switch to depending on conditions based in the loaded XML file.

Can anyone suggest anything?

Edit: If needed a rewrite is feasible, but the tile assignments need to be kept.
