How can I make an image fade in and out slowly?

I’m trying to make an alert icon in my game and I want it to steadily fade in and fade out to draw attention to it. I currently have

[code]local alerticon = display.newImageRect( “alerticon.png” , 60, 60);
alerticon: setReferencePoint(display.CenterReferencePoint);
alerticon.x = 160; alerticon.y = 445 [import]uid: 16789 topic_id: 5189 reply_id: 305189[/import]

You could use a transition. Take a look at this sample app:
http://developer.anscamobile.com/content/transition-1 [import]uid: 6787 topic_id: 5189 reply_id: 17218[/import]

this still isn’t working, I copied it exactly the same way except replaced my own image and its not working [import]uid: 16789 topic_id: 5189 reply_id: 17224[/import]

Post your code? If you want us to look at it. [import]uid: 6787 topic_id: 5189 reply_id: 17226[/import]