terrain demo flash optimization