18 Replies Latest reply on Oct 16, 2009 4:36 PM by kglad

    Help

    G. Y.

      I am working on revising an old Flash file that was created by someone else. The person used the following code:

       

      on (release) {
      //load Movie Behavior
      if(_root == Number(_root)){
        loadMovieNum("U6_V1_Instructions.swf",_root);
      } else {
        _root.loadMovie("U6_V1_Instructions.swf");
      }
      //End Behavior

       

      However, when the activity played in Blackboard, the very first time, it won't load up. It will have a background screen with "done" at the status bar. Yet, if I loaded again, it will play correctly. I suspect the code above is the problem, however, I am hesitate to correct it. Can you please help?

       

      Thanks,

      Grace

        • 1. Re: Help
          kglad Adobe Community Professional & MVP

          that's screwy code but it should work.

           

          any code you have elsewhere in your loading swf will fail if it hasn't completed executing when that button is released, however.

          • 2. Re: Help
            G. Y. Level 1

            Hi, Kglad. You are correct. That is why sometimes the code in U6_V1_Instructions.swf is not working and sometimes it will.

             

            Can you point me some directions as to how to make modification to these code? My idea is as below:

             

            on (release) {

            //load Movie Behavior
            loadMovieNum("U6_V1_Presentation.swf", 0);

            //End Behavior

            }

             

             

            Can you please help?

             

            Thanks,

            Grace

            • 3. Re: Help
              kglad Adobe Community Professional & MVP

              that code reduces to:

               

              on(release){

              _root.loadMovie("U6_V1_Presentation.swf");

              }

               

              but, if you're having any problems it's because you don't want to replace the main (loading) swf with the U6 swf and should use something different like:

               

              on(release){

              loadMovieNum("U6_V1_Presentation.swf",1);

              }

              • 4. Re: Help
                G. Y. Level 1

                Hi, kglad. Actually, I think the original designers do want to replace the main (loading) swf with the U6 swf.

                The  code

                on(release){

                loadMovieNum("U6_V1_Presentation.swf",1);

                }

                 

                produces the U6_v1_presentation on top of the loading swf and which is undesirable.

                 

                However, the code

                on(release){

                _root.loadMovie("U6_V1_Presentation.swf");

                }

                will cause the continue button to be clicked twice before the u6_v1_presentation loaded.

                 

                I felt that I am so close to find the right solution. Would you please help me more?

                 

                Thanks,

                Grace

                • 5. Re: Help
                  kglad Adobe Community Professional & MVP

                  what's the continue button have to do with this?

                  • 6. Re: Help
                    G. Y. Level 1

                    The original designer of this interactive learning activity

                    • created a html file that load the U6_V1_Intro.swf.
                    • The U6_V1_into.swf contains a continue button which is what is referenced in my previous email.
                    • When you click the continue button, it will load the U6_V1_presentation.swf.
                    • The U6_V1_presentation.swf is a preloader and it will load U6_V1_presentation_cont.swf which contains the main video and animation.
                    • The U6_V1_presentation_cont will automatically load up the video and animation but it also allows the user to click a Continue button to load up U6_V1_Instructions.swf.
                    • The instructions contain another continue button to load up U6_V1_Stills.swf.
                    • U6_V1_Stills.swf is preloader to load U6_V1_Stills_cont.swf. This swf contains the main slide show to teach about vocabulary.

                     

                    There are about 8 units which follow the same structure as shown above.

                     

                    Thanks,

                    Grace

                    • 7. Re: Help
                      G. Y. Level 1

                      Hi, kglad. It just dawned on me that probably the loading problem has nothing to do with these codes. It is because the preloader does not load for the 1st time. Do you have any suggestions on that topic except for me to find a better preloader?

                      • 8. Re: Help
                        kglad Adobe Community Professional & MVP

                        this entire setup is poor.

                         

                        but it's still not clear from anything you've decribed why that first swf is failing.  it will load and there must be code in it that then fails.  but i haven't seen that code.

                        • 9. Re: Help
                          G. Y. Level 1

                          Hi, kglad. I am attaching that little preload fla file. The only code I found is :

                           

                          on (complete) {
                              this.setVisible(false);
                          }.

                           

                          Can you help?

                          • 10. Re: Help
                            G. Y. Level 1

                            Cannot attach it through the forum, so just reply to this email

                            • 11. Re: Help
                              G. Y. Level 1

                              Zip the FLA file and want to try again.

                              • 12. Re: Help
                                kglad Adobe Community Professional & MVP

                                no, i usually don't download and correct files unless i'm hired.

                                 

                                for free help, you can post the preloader code in this forum.

                                • 13. Re: Help
                                  G. Y. Level 1

                                  The code is

                                  on (complete) {
                                      this.setVisible(false);
                                  }.

                                   

                                  thanks,

                                  Grace

                                  • 14. Re: Help
                                    kglad Adobe Community Professional & MVP

                                    what's that attached to?

                                    • 15. Re: Help
                                      G. Y. Level 1

                                      A progress bar object called myPB.

                                      • 16. Re: Help
                                        kglad Adobe Community Professional & MVP

                                        that's not going to do anything useful.  as soon as the progress bar loads, it disappears which means it will never be visible.

                                        • 17. Re: Help
                                          G. Y. Level 1

                                          Actually, it works like the 2nd time, but not the first time. Why? Can I change the code to the followings:

                                          on (release) {

                                               //load Movie Behavior

                                               if(_root == Number(_root)){

                                                    loadMovieNum("(the name of the file to load goes here",_root);

                                               } else {

                                                    _root.loadMovie("the name of the file to load goes here ");

                                               }

                                               //End Behavior

                                          }

                                          • 18. Re: Help
                                            kglad Adobe Community Professional & MVP

                                            that will never work.

                                             

                                            something else may be working that you see but, that's such a mess you should start over.