2 Replies Latest reply on Sep 2, 2009 8:29 AM by Barna Biro

    MXML Dynamic Object Creation

    San Question

      Hi ,

       

       

      Static Object Creation :

       

      Eg:


          <mx:Fade id="ViewStack_EffectStart" duration="500" alphaFrom="0.0" alphaTo="1.0"/>
          <mx:Fade id="ViewStack_EffectEnd" duration="500" alphaFrom="1.0" alphaTo="0.0"/>

       


      <comp:ErrorBox id="errorBox" active="{active}" showEffect="{ViewStack_EffectStart}" hideEffect="{ViewStack_EffectEnd}"/> .

       

       


      The above static objects is working fine, but the problem is that we have lot of similiar static object which creates a memory issue.If we create dynamic objects, will it avoid the issue.Is dynamic objects advisible?.

       


      Thanks in advance.Please reply ASAP.

       

       

       

      Thanks ,

       

      San.

        • 1. Re: MXML Dynamic Object Creation
          babo_ya Level 3

          hmn.. I don't understand your questions fully.

           

          What about create the fade object in "Model" and reference the same Fade object for all dynamic objects?

           

          or r u asking to find out how to create fade in actionscript?

           

          var fade:Fade = new Fade();

          fade.target = this;

          fade.alphaFrom = 0;

          fade.alphaTo = 1;

          fade.play();

           

           

          hope this helps,

           

          BaBo,

          • 2. Re: MXML Dynamic Object Creation
            Barna Biro Level 3

            I don't really understand your problem either. What do you want to create dynamically? The tween? The component itself? Either way, I don't really see why would that be of much help. It would be great if you could try to shed some light on this because your description/question was totally cryptic.