How to make a Copy of a display object

I'm trying to implement my own caching system. I have a situation where I need multiple copies of an image, scaled to a particular value.

Doing this is slow:

1
2
3
4
5
for i=1,10 do
    local image = display.newImageRect(imageName,width,height)
    image.y = (i-1)*(height+margin)
    group:insert(image)
end

I'm running into the same problem. Does anyone know how to (deep)copy a display object?

views:1814 update:2011/9/27 18:14:54
corona forums © 2003-2011