I don't think you need the Next function. You should by di1 you mean di then removeSelf() should be sufficient for it to disappear from view. Also I'm not seeing any code to initialize the di before first tap. You should have something like
local nextIndex = 1
local dotted = {....}
local di -- avoid globals
local function loadingImages1()
di = display.newImageRect(dotted[nextIndex],150,300);
... set x, y, height, width; then:
-- update next index, cycle back to 1 if necessary
nextIndex = nextIndex + 1
if nextIndex > #dotted then
nextIndex = 1
end
end
loadingImages1() -- run once to initialize
local function onObjectTap( self,event )
di:removeSelf() -- remove di
loadingImages1()
return true
end