Hi, try the below code to create object based on class name. public var cls:Class = getDefinitionByName("MyClass") as Class;
In this example MyClas is the name of the class. Hope this helps u. On Oct 30, 12:35 am, "Brolesi, Fogliarini" <brol...@gmail.com> wrote: > Hi people. > I'm trying to create an object at runtime, just passing the classname > as a parameter I already tried that with a standard Flex Component and > it worked very well. BUT, when I try to do this with one of my > components, an error occurs: ReferenceError: Error #1065: Variable > [myComponentClassName] is not defined. Thanks. > -- > > Fabio Fogliarini Brolesihttp://fabio.freesandbox.net/ > > "Se eu tenho uma maçã e você tem uma maçã, e nós as trocarmos, cada um > continua com uma maçã. Se eu tenho uma idéia e você tem uma idéia, e > nós as trocarmos, cada um fica com duas idéias." > George Bernard Shaw - Dramatrugo Irlandês --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---