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
Post a Comment