4 Replies Latest reply on Aug 19, 2009 11:56 AM by rainestorm

    Bizarre AS2 error with Internet Explorer 6

    rainestorm

      I'll try my best to articulate the problem here. I have a client who is using IE6 on a hand-held device. They need an AS2 scripted file for Flash Player 7. I have the following script that serves as a welcome screen. It plays the welcome movie, then pauses for 4 seconds, then proceeds to the "intro" frame to begin the next movie.

       

      stop();
      var my_timedProcess:Number = setTimeout(my_delayedFunction,4000,1);
      function my_delayedFunction (arg1) {
          gotoAndPlay("intro")
      }

       

      It works fine on every browser I've used in-house. For some reason, however, the client says it gets hung up and won't proceed to the "intro" frame to play the next movie. I've tried eliminating the initial stop(); script, but then it doesn't play the movie at all and just goes to the next frame.

       

      Does anyone have any ideas on why this could be? While we're on subject, my_timedProcess is a variable but doesn't get called anywhere in the scripting. Could this be part of the issue?

       

       

      Appreciate any help you have to give. Thanks!

        • 1. Re: Bizarre AS2 error with Internet Explorer 6
          Rothrock Level 5

          I'm confused by what this means, "I've tried eliminating the initial stop(); script, but then it doesn't play the movie at all and just goes to the next frame." It would seem that going to the next frame would be the movie playing? But in any event, yes, if your remove the stop then there is no reason for the playhead to stop on that screen and so it would just keep going AND in 4 seconds (more or less) it would also execute that function so you would be in a world of hurt.

           

          As for the my_timedProcess variable. That is just a number that will allow you to stop the 4 (more or less) second wait. Suppose you had a replay button that allowed the welcome to be played again. Well in that case you would want to stop the function from getting called during the replay so you could add some code to the replay button like this:

           

          clearTimeout(my_timedProcess);

           

          Also it seems a little strange that you are passing your function the number 1. Why are you doing that? You don't seem to be using arg1.

           

          Finally onto your real reason for posting. I have no idea why that wouldn't work. Have you tried it with IE6 on a non-hand held device? Is the real problem the 6-ness or the mobile-ness?

           

          Back in the day when IE 6 was more common there were occasional cache/timing issues that could often be very tricky to diagnose. Are you sure that all your content has loaded?

           

          Are you sure that your client has the correct Flash plugin installed for IE 6 on their device? Many times the, "It doesn't work on this one platform/computer/for this one person" issue is really that the person doesn't have the correct plug-in installed -- EVEN WHEN they swear they do. Really you would be surprised at how often that is the case.

           

          Other than that I don't know what could be causing it.

          1 person found this helpful
          • 2. Re: Bizarre AS2 error with Internet Explorer 6
            rainestorm Level 1

            Thanks, Rothrock. I appreciate your in-depth reply. I'm a newbie at AS3 and even less familiar with AS2.

             

             

            As for the (arg1), I only put that there because it was in the example I was using. I thought it was code and not a variable. In any case, it didn't change things when I removed it.

             

            I'm certain that whatever is the problem, it exists on our client's end. But I wanted to see if there was perhaps some problem in my scripting that I was overlooking.

             

            Thanks again.

            • 3. Re: Bizarre AS2 error with Internet Explorer 6
              Rothrock Level 5

              Ah! Actually one more thing came to me: setTimeout wasn't included in Flash until Flash 8. So that is most likely the problem. Your machine has a newer Flash plugin and even if you publish to Flash 7, but playback with the Flash 8 plugin setTimeout will work. But if you actually use the Flash 7 plugin for playback it won't. It is silly and wrong, but that is the way it is. So you will have to use setInterval.

               

              So your code should be like this:

               

              var myIntervalID:Number;

               

              clearInterval(myIntervalID);

              myIntervalID=setInterval(someFunction,4000);

               

              function someFunction(){

              clearInterval(myIntervalID);

              gotoAndPlay("intro");

              }

               

              Don't forget to always clear your interval ID before you set a new one and then since you want this to run only one clear it again just as soon as the function is called.

               

              As for the arguments, that is how you would do it if you needed them, but if you don't then I wouldn't muddy the waters. Especially when you come back to update this next year and you spend half a day scrratching your head and wondering what that variable was for!

              • 4. Re: Bizarre AS2 error with Internet Explorer 6
                rainestorm Level 1

                Rothrock you are a genius. Unfortunately, I now have a new problem. I can't run my html files in Internet Explorer. I don't know what in the world I could have changed to cause this. I've scoured the publish settings and can't find anything.