4 Replies Latest reply on Feb 3, 2010 1:15 PM by jhypsyshah

    Help with images and buttons

    jhypsyshah

      I was wondering if anyone could recommend a tutorial or point me in the right direction. I've been trying to figure out how to use buttons to add images (been using png from photoshop with alphachannel) to a canvas. I don't have any problems skinning the buttons nor putting in a single image, nor text. As far as getting the images to layer when the buttons are clicked then I'm pretty lost. Not sure if an array is best or if adding and removing them as children in another container would be any easier..

        • 1. Re: Help with images and buttons
          David_F57 Level 5

          Hi,

           

          I'm not sure what you are asking here, are you talking about skinning buttons with images or calling a list of images and then displaying them in some sort of list ...

           

           

          David.

          • 2. Re: Help with images and buttons
            jhypsyshah Level 1

            Hi!

             

            Calling a list sounds like it would work. I wanted to have each individual button capable of making an image displayed on a canvas either visible or invisible. So far, I have a background image in it and some graphics layed out without a list or group but can't get the images to layer from the event that the mouse clicks a button. I just have a few buttons at the moment to keep it simple and I can skin them easily..even without the list, it's hard for me to get a button to make an image visible and invisible.

            • 3. Re: Help with images and buttons
              Flex harUI Adobe Employee

              These days, we need to know if you're using Flex 3, or Flex 4 with Spark,

              and whether you plan to embed the images or not.

              • 4. Re: Help with images and buttons
                jhypsyshah Level 1

                I've been using flash builder beta 2. I was planning on embedding the images. I'm not sure if the help files and examples I am reading are not compatible or if I just have the syntax wrong. I haven't been able to find any examples that use embedded images and toggle visibility. I've used spark components. In design mode it puts the code in for a button when drag-dropped, then recommends using spark component instead. It seems that the only time that the images really do anything is when there's a spark component.

                 

                I've never used flex before would it be easier to use wordpad and try compiling it with something other than flash builder?