display.remove does not work as expected

local imgBackground = display.newImage("image\_320x480.jpg")  
  
display.remove(imgBackround)  
  
imgBackground = display.newImage("image\_320x480.jpg")  
imgBackground.alpha = 0.0  
  
transition.to(imgBackground, { time=3000, alpha=1.0 })  

This is a sample code. In the above i expect it adds an image and removes it immediately, then it creates a new image and fades in. But apparently it does not the remove the previous image, and transition does not seen.

I appreciate if you can help me solve the issue.

Thanks… [import]uid: 46529 topic_id: 11113 reply_id: 311113[/import]

@culutas,
spelling mistakes

imgBackround and imgBackground are different and hence will not work

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 11113 reply_id: 40375[/import]

it is a shame i overlooked this simple mistake… thanks for pointing it out. :wink: [import]uid: 46529 topic_id: 11113 reply_id: 40380[/import]