Referencing instances dynamically
is there other way of referencing existing instances on stage besides using "static" syntax:
this.myobject.aproperty = x ;
i need iterate through lot of instances on stage , use variable pass name of instance referencing. i've been searching books , online documents hour wihout finding answer.
an example in c-syntax showing how want reference these instances:
for( count = 0; count < 10; count++)
instance[ "instance_" + count ] = "#ffccaa" ;
any newbee appreciated - frustration growing fast!
this.myobject.aproperty = x ;
i need iterate through lot of instances on stage , use variable pass name of instance referencing. i've been searching books , online documents hour wihout finding answer.
an example in c-syntax showing how want reference these instances:
for( count = 0; count < 10; count++)
instance[ "instance_" + count ] = "#ffccaa" ;
any newbee appreciated - frustration growing fast!
if created several movieclips on stage during author-time , want dynamically reference them without giving instance name, use code below. flash must give movieclip on stage default name (“instance1”, “instance2”, etc.). code work fine it’s uncommon reference them default name. depends on situation.
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment