0 Replies Latest reply on Oct 1, 2010 5:00 PM by aktell2007

    Issues with AUTO cycling through ....

    aktell2007 Level 1

      I'm trying to do this:
      Any help with one or the other is very much appriciated !!!

      1) When the Timer is finish auto cycling through the tabs (1 to 16) of the ViewStack, and switching over to tab (1) to STOP, I would like to address a function to do something ???
      The question is now how to write the code to ID that the Timer has come to a STOP on tab (1), and how can I incoperate this into the existing (onTimerOne) function.

      2) The second item I'm after is that if I'm amnualy select any tab (1 to 16) to address also a function to do something ???

      3) The third item I'm after is to automaticly zero (0) the ViewStack to tab number (1) if I click a Btn.


          import flash.events.TimerEvent;
          import flash.utils.Timer;

          private var timerOne:Timer;
          private function initOne():void {

              timerOne = new Timer(5000, myViewStack.numChildren);
              timerOne.addEventListener(TimerEvent.TIMER, onTimerOne);
          private function onTimerOne(evt:TimerEvent):void {
              if(myViewStack.selectedIndex == myViewStack.numChildren-1) {
              myViewStack.selectedIndex = 0;

          private function autoOne():void {
              if (!timerOne.running) {

          private function manualOne():void {
              if (timerOne.running) {


      4) Well, the fourth item I'm trying to work out is as I'm reading my data from an Xml file to have a TextArea which shows the different countries from the Xml file for each ViewStack tab while auto cycling through these tabs (1 to 16).

      The diffuculty here is that I use this Xml with a specific urlID="1" to urlId="16" as part shown below.



          <urlOceania urlID="1"/>

          <searchCountry>American Samoa</searchCountry>



      I'm reading all the other items this way:




      Thanks in advance aktell2007