roadRect = road.getBounds(this); roadBitmapData = new BitmapData(roadRect.width, roadRect.height, true, 0); roadBitmapData.draw(road);