Saturday, January 3, 2009

1118: Implicit coercion of a value with static type Object to a possibly unrelated type .

var myvar:classname=e.target could result in the compiler error:
1118: Implicit coercion of a value with static type Object to a possibly unrelated type . in actionscript 3

Possible fixes / solutions:
try var myVar:classname= e.target as classname;

or

var myVar:classname=e.currentTarget;