7 Replies Latest reply on Dec 20, 2011 3:58 PM by TheSimpsonater
      • 1. Re: Using SpinnerList to use pushview?
        Shongrunden Adobe Employee

        You might find it useful to specify the next view in your data objects, for example:

        <s:SpinnerList id="list1" labelField="name" height="100%" width="100%">

            <s:dataProvider>

                <s:ArrayList>

                    <s:DataItem name="Projects" message="Learn more about what we're working on" nextView="{views.Projects}" />

                    <s:DataItem name="Locate Office" message="Find directions to our nearest office" nextView="{views.Locate}" />

                    <s:DataItem name="Contact Us" message="Let us know your thoughts!" nextView="{views.ContactUs}" />

                    <s:DataItem name="About Us" message="" nextView="{views.AboutUs}" />

                </s:ArrayList>

            </s:dataProvider>

        </s:SpinnerList>

         

         

        <s:Button label="Go" click="navigator.pushView(list1.selectedItem.nextView)" />

        • 2. Re: Using SpinnerList to use pushview?
          TheSimpsonater Level 1

          I followed that, but now instead of displaying what i want on the list, all of the items say "[object Object]" what can i do to fix that?

          • 3. Re: Using SpinnerList to use pushview?
            TheSimpsonater Level 1

            nevermind, i fixed that.

            • 4. Re: Using SpinnerList to use pushview?
              TheSimpsonater Level 1

              Wait, can I use something similar to make it so that a sound effect is played under the same kind of circumstances? if so, how?

              • 6. Re: Using SpinnerList to use pushview?
                TheSimpsonater Level 1

                Yes that did help a little bit, but I'm not sure how to tell it to play the sound.

                 

                What I have is:

                in the list:

                <s:SpinnerList .... labelField="data" selectedIndex="1" wrapElements="False" id="SoundsList">

                         <s:dataProvider>

                                     <s:arrayList>

                                                  <s:DataItem Label="**********" id="qwerty" soundEffect="{soundeffect}"></s:DataItem>

                                                   and so on

                                                   Then all of the tags are closed.

                 

                FOr The button:

                <s:Button ................ Label="***" click="soundEffect(SoundsList.selectedItem.soundEffect)"/>

                 

                The error message is on the line of the button tag, it says "Multiple Markers at this line   - 1180: call to a possibly undefined property soundEffect.   - soundsList"

                 

                I am assuming that the first error is referring to where it says soundEffect outside the (). I do not see the problem with SoundsList, the program is showing that that and where in says soundEffect inside the () are linked up to the corresponding parts in the spinnerList. Is my problem that I'm using the wrong thing to call the data from the list?