Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class instantiation from string

Is it possible to have a string "ClassA" and use it in order to instantiate a real ClassA in my application?

like image 231
Ponty Avatar asked Feb 26 '23 17:02

Ponty


1 Answers

Take a look at flash.utils.getDefinitionByName. You should be able to use that to get a class object from a string of the class name.

like image 82
Matthew J Morrison Avatar answered Mar 04 '23 00:03

Matthew J Morrison



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!