2 Replies Latest reply on Mar 3, 2010 9:41 PM by flash search

    how to add component clas by actionscript

    flash search

      Hi all

      i just want to know how to add acomponent class by actionscript?I am using flex 3.and want to add component class to a container.i have two components one for image view and other for video.I want to display each component one by one.but if i use it placing in the same main file it creating alignment problem.thats why i want to call them through actionscript by any possible way so that it come in the same possition.is it possible? please help me out

       

      thanks and regards

        • 1. Re: how to add component clas by actionscript
          Gregory Lafrance Level 6

          I'm not sure what you are trying to do.

           

          Would you like to overlay the two components and display only one at a time? If so then just put them both in a Canvas at the same position and change their "visible" properties as necessary.

           

          You should be able to do this in MXML, except for the switching part, which will likely be in AS.

           

          If this post answers your question or helps, please mark it as such.


          Greg Lafrance - Flex 2 and 3 ACE certified

          www.ChikaraDev.com

          Flex / AIR Development, Training, and Support Services

          • 2. Re: how to add component clas by actionscript
            flash search Level 1

             

             

             

            Hi Greg,

            Thanks for your reply. It was really helpful for me I used includeInLayout for this purpose with visible event because there is alignment problem if I only use the visible properties. It works. But the only problem is the image I used. It’s not coming in full screen total’s don’t know the reason. Little gape is there sending you the imagUntitled-1.jpge how it looks like.is this due to use same container?please help me

             

            Message was edited by: flash search