Hi All, Is it possible to use call() on a Function instance that represents a static function? Since Function.call(thisObject) has a mandatory argument, what would I have to use as the argument in the case of a static function ?
The bigger picture of this question is as follows: I'd like to implement a couple of exercises in a Flash application. I plan to create a Symbol backed by an AS class for each exercise. As AS does not have a fully fledged introspection framework, I plan to put all available exercises in an array in an ExerciseRegistry object (AS class, Singleton, implements mx.utils.Iterator). When the application starts, I query ExerciseRegistry for registered exercises and for every exercise I'll create a Button (aMovieClip.createClassObject(...)) with an appropriate label. The method ExerciseRegistry.instantiate(aButtonLabel) allows me to instantiate an exercise upon clicking a button. But here the issue described above comes into play: If all my Exercises implement a static Function 'instantiate()', how can I call this method programmatically, i.e., from within my ExerciseRegistry's AS code? The alternative would be to call every exercise's Constructor, but how do I do this with the call() method? I believe 'thisObject' doesn't make any sense neither in the context of a Constructor. Any help is appreciated! I am also open to completely different solutions as I am not in a very advanced stage of the project yet. Thanks a lot. stefan. _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

