I’m writing a gallery and I have writen custom Tumbnail class that extends Sprite. Each tumbnail has an ID property so I can determine which one is clicked.
I’ve added event listeners to all of them and in handler function tried:
var target:Tumbnail = Tumbnail(event.targer);
so I can get:
target.ID
but I get this error:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Sprite@33ce241 to Tumbnail.
at TumbContainer/::onClick()
Anyone know what am I doing wrong?