new instances are not created from class
hello,
i have created class called surveryslide in have linked bunch of slides. each slide registers how many questions has class (itself). problem need each movieclip own instance of surveyslide ( have surveymanager class built deal each. using attachmovie show them in sequence on stage (loading 1 after other). assumed linking each movie clip class new instance created each time 1 instance created. i.e. questions put array should instance everytime new instance loaded added on array.
i don't know if explaining clear enough so.....
in each instance of class (which movie clip) register question slide...
i.e.
slide instance 1
this.registerquestion(1);
this.registerquestion(2);
//if output array here 1,2
slide instance 2
this.registerquestion(3);
//if output array here 1,2,3
//i want output 3
does know off hand why happening?
i have created class called surveryslide in have linked bunch of slides. each slide registers how many questions has class (itself). problem need each movieclip own instance of surveyslide ( have surveymanager class built deal each. using attachmovie show them in sequence on stage (loading 1 after other). assumed linking each movie clip class new instance created each time 1 instance created. i.e. questions put array should instance everytime new instance loaded added on array.
i don't know if explaining clear enough so.....
in each instance of class (which movie clip) register question slide...
i.e.
slide instance 1
this.registerquestion(1);
this.registerquestion(2);
//if output array here 1,2
slide instance 2
this.registerquestion(3);
//if output array here 1,2,3
//i want output 3
does know off hand why happening?
i resolved redelcaring array in contructor. silly me
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment