5 Replies Latest reply on Feb 20, 2012 10:12 AM by PierreSolutions

    Not sure how to...

    frogman.pep

      Setting up my new portfolio website: here, when the user clicks on one of the project icons from the custom component aligned to the right of the home state, how can I direct them to a different state of the home component?  View source is enabled so tell me what you think is the best direction to go.  Some images load slow as I haven't optimized them yet.  Thanks...

        • 1. Re: Not sure how to...
          PierreSolutions Level 2

          There are several ways you could accomplish that.

           

          My preference would be to set it up so that clicking on the buttons in the projects_cont_small component triggers an event.

          I would listen for that event in the code in the home component

          In the event handler in home I would look at the information reveiced with the event and accordingly update the state of the main_cont component.

           

          This would require you to create a custom event class (google AS3 custom events if you don't know how) that you trigger in one component and listen for in another (using addEventListener) and finally, do something to another component based on the data in the event.

           

          If you don't know how to do all that, you will want to learn. Custom event use and creation is fundamental to getting the most power out of Flex.

           

          Question: Did this design come out of Catalyst?

          1 person found this helpful
          • 2. Re: Not sure how to...
            frogman.pep Level 1

            Thank you much Pierre, your reply has directed me to where I need to go.  I thought that would be the best way to do it.  I've gone through several examples/tuts on custom events before, and have made a few in some other projects.  I definitely need to understand this process a little more and this will be a good exercise to solidify this knowledge.

             

            The buttons were made in Catalyst, and the portfolio scrollbar was made there initially but I changed it a bit and essentially did it over from scratch utilizing some of the code that would work well, for now.  Everything else has been a .fxg imported from Illustrator converted into a custom component in Flash Builder.

             

            Thanks again, got to get busy...

            • 3. Re: Not sure how to...
              PierreSolutions Level 2

              If you don't mind, please tell me more about "Everything else has been a .fxg imported from Illustrator converted into a custom component in Flash Builder."

              In general, what is the process for that?

               

              Any links? Tutorials?

              • 4. Re: Not sure how to...
                frogman.pep Level 1

                Think you'll need a membership to check out these vids, but this series at lynda.com is rather helpful: http://www.lynda.com/Flash-Builder-4-tutorials/and-flex-4-essential-training/61161-2.html  Chapter 11 is the one you want. Think I got a few examples and such from searching using many of the words from the different chapters' headers.  Didn't organize them to well and don't remember there being a better explanation than lynda's or figuring it out on my own.

                 

                I could put something together on the process I've used/tips/etc a bit later.  Lemme know as I wouldn't mind sharing and figuring out better/best ways as I forsee using this process much more.

                • 5. Re: Not sure how to...
                  PierreSolutions Level 2

                  I'm interested if you are willing to put in the time to document the process.

                  I'd try it and give you feedback.

                   

                  I'll check out the Lynda.com training as well.

                   

                  Thanks.