3 Replies Latest reply on Jan 13, 2010 1:57 PM by jsd99

    Multiple copies of a component?

    jsd99 Level 3

      Is there a way to take a single .mxml component and make multiple copies of it?


      I've got an app where the user can page through various screens.  Each screen should fade out and slide away while the next one slides in.  There has to be two copies active at any given time because the user should see both the old and new animating simultaneously.  I've got it working with an ActionScript class but positioning elements, setting properties, etc, is much harder than with an MXML component.


      For example, I've got an Image object, but I can't set the horizontalAlign, verticalAlign properties like you can in MXML.  They just don't seem to be exposed in ActionScript.  Or maybe I'm doing it wrong?


      What's the best/simplest way to achieve what I want?