SHOW:
|
|
- or go back to the newest paste.
| 1 | private var test:String="hello"; | |
| 2 | ||
| 3 | function blah() | |
| 4 | {
| |
| 5 | var me = this; | |
| 6 | ||
| 7 | tf.name="test" | |
| 8 | ||
| 9 | - | tf.addEventListener(Event.CHANGE, function(event) |
| 9 | + | tf.addEventListener(Event.CHANGE, function(e) |
| 10 | {
| |
| 11 | var id = e.currentTarget.name; | |
| 12 | trace(untyped me[id]); // cannot create property 0 on Main (Did it cast to int because of array access?? :s) | |
| 13 | ||
| 14 | var id:String = e.currentTarget.name; | |
| 15 | trace(untyped me[id]); //hello | |
| 16 | }); | |
| 17 | } |