Tutu,
Here is an option for you...
Do a Google search for "Mysty Mood" by Loopix
Download their demo level ...
It's free and you can use all the code, script work and art work ...
In the folder you will find everything to do as you desire except the system is designed for a 3d application.
There is an art work file (bitmap) that has color coding to set textures etc... on a terrain as per the color codes on the art file...
Disect how they did their work to figure out how to do your work...
Best of luck...