actionscript 3 - AS3 how to do a string to attribute -
how attribute string? like, want utilize "this.a" "this" 's x position.
var a:string="x" trace(this.x,this.a)
use bracket notation:
trace( this['x'] );
or:
var a:string = 'x'; trace( this[a] );
string actionscript-3 attributes
No comments:
Post a Comment