Create array of images and make them rotate on click

Hi I am having problems doing this.  I dont get errors to create the images but I have problems with the rotation.  I would also like to know how to track which image/ x, y locations in the array is clicked and be able to change the image location, size, and actual png image upon click.  This isnt all the code just the parts to show creation of the image and event listener of the image.  Any help is greatly appreciated, thanks.

-- spinning of the image local function bubbleTapHandler( event ) -- how to reposition? This doesnt work, also how to change size of image and change image event.x = 0 event.y = 0 -- how to rotate? This doesnt work transition.to( event , { rotation=360, time=1300, transition=easing.inOutCubic } ) end timer.performWithDelay( 600, bubbleTapHandler, 0 ) -- Creation of images local function createBubbles() for h = #xpos, 1, -1 do for i = #ypos, 1, -1 do local bubble = display.newImageRect( createBubbleColor(), bubbleSize, bubbleSize ) local bubbleLetter = display.newText( bubbleLetters[f], xpos[h], ypos[i], native.systemFontBold, 40 ) bubble.x = xpos[h] bubble.y = ypos[i] bubble:addEventListener( "tap", bubbleTapHandler ) table.insert( bubbleTable, bubble ) table.insert(bubbleLetterTable, bubbleLetter) f = f + 1 end end end 

i see my mistake is that I need event.target instead of just event within the eventListener call

Glad you figured it out!

Rob

i see my mistake is that I need event.target instead of just event within the eventListener call

Glad you figured it out!

Rob