7 Replies Latest reply on Mar 20, 2010 4:50 AM by Igor Rolim

    Controller Flash Component Dropdown

    Igor Rolim

      Hi guys, i would like to know how i can controller a dropdownlist generate in flash and export in swf.

       

      I made the menu of my project in flash. And the options of menu dropdown have to make reference to markers in director project. The markers are name 01, 02, 03, and ... .

       

      Very Thank you for someone to solve my question.

        • 1. Re: Controller Flash Component Dropdown
          Sean_Wilson Adobe Community Professional

          I'm not sure I understand correctly - can you clarify? You have made a menu in Flash, and when an option is selected you want it to tell the Director host to go to a named marker - is that correct?

          1 person found this helpful
          • 2. Re: Controller Flash Component Dropdown
            Igor Rolim Level 1

            Yes, is exactly this. I can't find the solution.

            • 3. Re: Controller Flash Component Dropdown
              Igor Rolim Level 1

              I think I have another choice  better and simpler.

              My project manager is this:

              I have the right of the stage called an SP01  scrollpane which loads an external jpg, called 01.jpg.
              And  the left side I have the menu, when I click the button "01" from the  menu. go to mark "01" and shows the "SP01"  which has the image 01.jpg charged. And so is the button 02 and so on.

              But I see that this way will  take a lot more work. The easiest would be when clicking on the  button 01, load the image 01.jpg in the ScrollPane. By clicking the button 02 the  same thing, and so on.

              So I guess the easiest to do is when clicking the menu  button, change the "contentPath" the ScrollPane.

              I can explain better? Managed to understand now? I really hope you can help me, I have two weeks to deliver  this work.

              • 4. Re: Controller Flash Component Dropdown
                Igor Rolim Level 1

                I try...

                on mouseUp me

                member ("SP").contentPath = "fachada2.jpg"

                end

                 

                But dont works... someone?

                • 5. Re: Controller Flash Component Dropdown
                  Sean_Wilson Adobe Community Professional

                  Try setting

                  sprite.contentPath = _movie.path & "fachada2.jpg"
                  
                  1 person found this helpful
                  • 6. Re: Controller Flash Component Dropdown
                    Igor Rolim Level 1

                    Friend.. i did! I did a simple trace test:

                     

                    on mouseUp me
                      trace(Sprite(12).contentPath)
                    end

                     

                    And I discovered that the button was not  working. I do not know why. But when i change the  button, it worked. And with the code I had posted before. (What you posted did not  work).

                    So I am very grateful for you helping me.

                     

                    Its possible to controller this(change contentPath of ScrollPane) with a external Flash Component(dropdown)?

                     

                    Thank you indeed!

                    • 7. Re: Controller Flash Component Dropdown
                      Igor Rolim Level 1

                      The code in AS2 to my combobox:

                      function getLink(Lingo) {
                      getURL(String(Lingo));
                      }

                      var data_array = new Array();
                      // first item
                      data_array[0] = {label:"01", data:"lingo: "};
                      // second item
                      data_array[1] = {label:"02", data:"lingo: "};
                      // third item
                      data_array[2] = {label:"03", data:"lingo: "};
                      // set data provider
                      my_cb.setDataProvider(data_array);
                      // set change handler

                      my_cb.setChangeHandler("getLink");

                      var listenerObject:Object = new Object();
                      listenerObject.change = function(eventObject:Object) {
                      getLink(my_cb.selectedItem.data);
                      }
                      my_cb.addEventListener("change", listenerObject)

                      Now  just lack know how to put put the lingo code.

                       

                      The lingo code to transform is:

                       

                      on mouseUp  me

                      member ("SP").contentPath = "fachada2.jpg"

                      end

                       

                      Any help would be so  greatly appreciated!

                       

                      ------------------------------------------------ Edited --------------------------------------------------------

                      The problem is quotes I did a simple test with trace (withouts quotes) and the buttons are working!

                      When i put:

                      lingo: trace (sprite(2).contentPath) --this work
                      lingo: sprite(2).contentPath = _movie.path & "fachada2.jpg" --this a problem apear

                      ------------------------------------------------ Edited 02 --------------------------------------------------------

                      SOLVED!

                      "lingo: sprite(2).contentPath = _movie.path & \"fachada2.jpg\" "};

                      Thanks very much man!!

                      Message was edited by: Igor Rolim