4 Replies Latest reply on Mar 18, 2009 8:05 AM by decpariem

    problem with global counter

    decpariem Level 1
      hi! I'm new here and in flash too! I downloaded a free fla file open source for pageflip. It uses a global function which is this:
      _global.mcnt = 0; //counter (used on a page where is an animation).

      So now I want to put an animation in a page and i assume that i have to call or use this function. the problem is that i don't know how. if anyone can help i would appreciate!
        • 1. Re: problem with global counter
          kglad Adobe Community Professional & MVP
          whenever you want to change or update the value of mcnt, use:

          _global.mcnt=whatever;

          whenever you want to use the value of mcnt use

          whatever = mcnt;
          • 2. Re: problem with global counter
            decpariem Level 1
            Thanks for your reply but it didn't work! I want to put a stand alone animation onto the pageflip . It's a kind of slideshow. The pageflip had an animation on one page but the move was directed by mcnt. I just want to enable my ready animation. If it helps this is the code that the pageflip uses:
            spiral._rotation = (15*(mcnt-1))%360; //mcnt is a global counter!!! of pageflip main movie!
            //trace("reset spiral "+(mcnt-1));

            onEnterFrame = function () {
            spiral._rotation = (15*mcnt)%360;
            //trace(mcnt);
            }
            also, should i remove the mcnt? Cause it causes all the trouble, or that would be a disaster?
            If you have any other suggestions please help.
            • 3. Re: problem with global counter
              kglad Adobe Community Professional & MVP
              the information i gave is correct. whether that helps you accomplish what i you want is a different issue.

              to help you accomplish what you want is not amenable to forum help. it's not, at all, clear what you're trying to do and you may not be experienced enough to pinpoint the issue.

              someone will probably need to download your fla and correct it (once your explain exactly what you're trying to do). that's likely to require a fair amount of time so you may not find people willing to do that unless they're hired.

              you could try to look for volunteers by starting another thread and stating exactly what you're trying to do.
              • 4. Re: problem with global counter
                decpariem Level 1
                Thanks for your time!