1 Reply Latest reply on Jul 31, 2009 8:54 AM by kglad

    Actionscript 2 and Flash Publish Settings

    mach6ix Level 1

      Hi Everyone,

       

      I have posted a couple questions as of late and received fantastic support from other members (Thanks K-Glad).

       

      I do have what I'm assuming to be a basic question however I cannot find an answer for it.

       

      I added some login script to a page as listed below.

       

      stop();
      eval("$version");
      appname="mikesapp"
      loadVariablesNum("http://bars.bevinco.com/mike/newlogin.php", 0, "POST");

       

      //This verifys the users status and forwards them to the portion of the website they are authorized to access. Frame 100 = Regional Access, Frame 200 = Franchise Access, Frame 300 = Employee Access and Frame 400 = Denied Access and Back Button

       

      this.onEnterFrame = function () {
          if(_root.checklog == 100){
              _root.gotoAndStop(5);
          }
          if(_root.checklog == 200){
              _root.gotoAndStop(10);
          }
          if(_root.checklog == 300){
              _root.gotoAndStop(15);
          }
          if(_root.checklog == 999){
              _root.gotoAndStop(20);
          }
      }

       

      My Question

       

      When testing this movie, I found that it was not moving to the section of the flash file that is relative to their "authorization level". I.E. I manually had my PHP echo back to flash, advising that REGIONAL ACCESS was used therefore it should be move this user to FRAME 5 of the file.

       

      I found that it was staying stuck on the first frame and not moving beyond the 1st frame which I thought had something to do with the stop(); that is listed at the top of the actionscript.

       

      However, when I changed the FLASH PUBLISH settings from Flash Player 8 to Flash Player 6, it works flawlessly.

       

      I attempted to publish using Flash 7 however it appears FLASH 6 is as high as I can go without loosing it's functionality.

       

      I'm curious WHY and will this limit our users from using the site if they have a lower version of Flash installed on their CPU?

       

      I have attached the project FLA file and the PHP file, being used on the server to manually tell this file that a REGIONAL has signed in or someone with "100" level status.

       

      As always, thanks in advance to anyone that has taken the time to read this post.

       

      Cheers,

       

      Mike

        • 1. Re: Actionscript 2 and Flash Publish Settings
          kglad Adobe Community Professional & MVP

          checklog is a string (even though it looks like a number to you).  flash 6 allowed quite a bit more code sloppiness than later versions.  so, it's very common for users to find publishing for fp6 works, while publishing for fp's higher breaks their code.

           

          you should use:

           


           

          this.onEnterFrame = function () {
              if(_root.checklog == "100"){

          delete this.onEnterFrame

                  _root.gotoAndStop(5);
              }
              if(_root.checklog == "200"){

          delete this.onEnterFrame

                  _root.gotoAndStop(10);
              }
              if(_root.checklog == "300"){

          delete this.onEnterFrame

                  _root.gotoAndStop(15);
              }
              if(_root.checklog == "999"){

          delete this.onEnterFrame

                  _root.gotoAndStop(20);
              }
          }