flash - Casting Variables to a Movie Clip -
how can convert gecko object movie clip?
function finish(boxname, arrayname:array):void { each (var item:string in arrayname) { trace(boxname+"_"+item); var gecko:movieclip = (boxname+"_"+item) movieclip ; trace(typeof(gecko)); gecko.gotoandplay("glow"); } }
this gives following error:
high_hsymbol_1 object typeerror: error #1009: cannot access property or method of null object reference. @ quizz_fla::maintimeline/finish() @ quizz_fla::maintimeline/dropit()
boxname+"_"+item should reference movieclip, no need casting think not possible string movieclip. associative arrays. supposed movieclips childs of "this":
var gecko:movieclip = this[boxname+"_"+item];
Comments
Post a Comment