How to replace MXML element with another?


hi. pretty new flex find attractive.

 

what trying achieve have 2 different layouts , initialize them based on user's choice. each of these layouts defined in own mxml component.

 

i have 2 components:

<components:leftaligned /> , <components:rightaligned />

 

i add both in beginning , have 1 visible don't want go down road. tried far have event handler replaces current instance hit wall. let's leftaligned component initialized first , want change rightaligned. now:

  • if try replace lement based on id: newelement:rightaligned = new rightaligned(); layoutarea = newelement; implicit coercion error can't convert rightaligned leftaligned.
  • if try removeelement(layoutarea); addelement(newelement); exception thrown other parts of application call layoutarea's methods (event based).

what solutions there this? thank you

check out states , includein attribute



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

Thread: gpg: Conflicting Commands

Adobe Acrobat Pro , Terminal Server Use

when i try using AE CC 3d camera tracker after the first step it says "Analysis solve failed." help?