Flex 4 Targeting Components that were created at run time

51 views Asked by At

I have some components that are created at run time, I would like to execute functions in those components during certain parent events.

Problem is this only works with components I create before runtime.

EG I can go this[SomeComponent].BorderShow(); if SomeComponent was already in the code.

How ever if I add new components to the stage on the fly I cant go

this[SomeNewComponent].BorderShow()

Can someone please advice how I could pass a function the name of component as a string and then have said function execute a function or method from the component.

Please and thank you C

1

There are 1 answers

0
Craig Mc On BEST ANSWER

I eventually used an Object as a proxy to the component found by name so that I could target its methods.

C