2 Replies Latest reply on Apr 10, 2007 12:34 PM by zipperbrain

    startTime and endTime

    zipperbrain
      Hi, there

      I am really messd up with my movie controller.
      I am making movie player that user can drag&drop bubble box onto movie clip.
      When I drop just one bubble and manage left(for startTime) and right(endTime) limiters, it works.
      When I drop two bubbles at the same time and manage the left and right limiters, it does not work.

      Please help me...

      here is fla...

      fla link
        • 1. Re: startTime and endTime
          MotionMaker Level 1
          var bub:Object = new Object();
          var barLimi_mc = attachMovie("barLimi", "newBar"+timeCount, timeCount+20);
          var lLimi_mc = attachMovie("leftLimi", "newlLimi"+timeCount, timeCount+10);
          These variables only exist inside their respective function and are destroyed next time their respective functions are called.

          Create arrays outside the function
          var bubs:Array() = new Array()
          var barLimi_mcs:Array() = new Array()
          var Ilimi_mcs:Array() = new Array()
          Inside the fuctions push the variables above onto the arrays. This way the reference although destroyed inside the function persists outside the function in the array.
          • 2. Re: startTime and endTime
            zipperbrain Level 1
            Thanx... MotionMaker

            I solve this problem, I used Obects for each bub and timeLine functions(actually, the array and Object is kinda family, right?).
            If I did not get your advice, I would not understand the global var and solve this problems.

            Many thanx..^^