9 Replies Latest reply on Apr 25, 2014 10:01 AM by Ned Murphy

    clear rollovers from previous scene

    mowse.ink

      Hi, gang...

       

      I'm going out of my mind. I webmaster two Flash (AS2) sites that consist of scenes, and for some reason, it has started happening that each scene remembers the rollover areas from the PREVIOUS scene. They don't clear until you click on another scene, in which case, the rollover areas from the scene before are then still active.

       

      Here are the sites:

      Site 1

      Site 2

       

      Can anyone think of why this might be happening? Do I need to call some kind of action to clear the rollovers when the scene switches? I'm not super proficient in Flash, and I just can't figure this one out. I'd really appreciate your help.

       

      Thank you!...

      —jonathan

        • 1. Re: clear rollovers from previous scene
          Ned Murphy Adobe Community Professional & MVP

          Can you provide a screenshot that show what you mean and explain how to reproduce it?  I visited the two sites and I don't see anything remaining from a previous landing point. 

          • 2. Re: clear rollovers from previous scene
            mowse.ink Level 1

            Hi, Ned!...

             

            Thank you so much for looking!

             

            I'm attaching two screenshots...one of the HOME scene and one of the TELEVISION scene.

             

            Screen Shot 2014-04-24 at 7.02.52 PM.png

             

            Screen Shot 2014-04-24 at 7.03.10 PM.png

             

            On the HOME scene, there are four buttons on the right side (Rock of Ages, OMC, ****** County and Twitter...outlined in purple). If you click on TELEVISION in the navigation, in the area where those four buttons previously were on the HOME page, there are rollovers still active. (In the area outlined in purple, the pointer turns to a hand as if there are links there, and if you click in that area it'll take you to one of the links from the buttons before.)

             

            Likewise, there's only one button on the TELEVISION page (the link to IMDb at the bottom). If you go to another scene, say THEATRE, the area where the link was for IMDb still has a rollover area there.

             

            Each scene always has the rollover areas for the current scene but also rollover areas from only the immediately previous scene.

            • 3. Re: clear rollovers from previous scene
              Ned Murphy Adobe Community Professional & MVP

              I understand now, thanx.  For those rollovers/links to still be active means they are still present.  That will mean they are either alpha-ed out to 0 so that they are no longer visible (but fully interactive still), or they are hiding behind the new content that took over the area.

               

              You'll need to examine the fla file to see how the content transitions are managed to see why the old content doesn't go away until a move later.

              • 4. Re: clear rollovers from previous scene
                mowse.ink Level 1

                Thank you, Ned...I really appreciate you trying to help me. I'm completely at a loss. To be honest, since I didn't build the sites, I don't even know where to look. I suspect it has something to do with a some masks that are being called as a transition between scenes, but I don't even understand how they work.

                 

                I know it's a lot to ask, and I completely understand if you say no, but is there any possibility that you would be willing to glance at the fla to see if there's something glaringly obvious that I'm missing? I've placed it on Dropbox here.

                • 5. Re: clear rollovers from previous scene
                  Ned Murphy Adobe Community Professional & MVP

                  While I don't normally download files, I did and I took a glance and can see why it does what it does, though I didn't go into detail checking of it all.  The file has two blank movieclips, see layers labeled mc1 and mc2.  The 2 empty movieclips have the content pages loaded into them... the non-visible one always being used to load in the next requested content movieclip.  When you change to a new page the current page is faded out, but it does not go away.  It gets replaced when you choose yet another content page. 

                   

                  The content should be unloaded from the movieclip after the fading out is finished.

                  1 person found this helpful
                  • 6. Re: clear rollovers from previous scene
                    mowse.ink Level 1

                    You're the best, Ned!...Thank you so much for taking a look! That points me in the right direction.

                     

                    This code exists for each navigation button:

                     

                    _root.title_mc.home_btn.onRelease = function() {
                              if ((primarymc == "1") && (currentPage == "home")) {
                                        //do nothing
                              } else if ((primarymc == "1") && (currentPage != "home")) {
                                        mc2.attachMovie("home","mc2",1);
                                        _root.nav_mc.gotoAndStop(1);
                                        currentPage = "home";
                                        primarymc = "2";
                                        trace(currentPage);
                                        trace(primarymc);
                                        fadein2();
                                        fadeout1();
                              } else if ((primarymc == "2") && (currentPage == "home")) {
                                        //do nothing
                              } else if ((primarymc == "2") && (currentPage != "home")) {
                                        mc1.attachMovie("home","mc1",1);
                                        _root.nav_mc.gotoAndStop(1);
                                        currentPage = "home";
                                        primarymc = "1";
                                        trace(currentPage);
                                        trace(primarymc);
                                        fadein1();
                                        fadeout2();
                              }
                    };

                     

                    ...(where in each instance "home" replaced with the name of each page). It looks as if this is where it's fading out each clip and loading the new one. So, I'm assuming I need to plug in a removeMovieClip or unloadMovie somewhere in each of these, is that right? I tried fiddling with no success....Is it an easy thing to do?

                    • 7. Re: clear rollovers from previous scene
                      Ned Murphy Adobe Community Professional & MVP

                      You probably want to look at the fadeout functions that get called.  They use Tweens to fade out the movieclips.  What you need to do is wait until the fade out completes and then remove the loaded content.  Since the mc#.attachMovie method is used, you would use the mc#.removeMovieClip method to remove what was attached.

                       

                      Here is a link that explains the Tween.onMotionFinished event management that you probably want to incorporate...

                       

                      http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00003008.html

                       

                      Beyond that, keep fiddling.

                      1 person found this helpful
                      • 8. Re: clear rollovers from previous scene
                        mowse.ink Level 1

                        Thank you, thank you, Ned! I really appreciate your help, and I'll let you know if I get it solved. Can I send you a cup of coffee or something?

                        • 9. Re: clear rollovers from previous scene
                          Ned Murphy Adobe Community Professional & MVP

                          You're welcome.  Even if I drank coffee, I doubt you could find anyone to deliver it where I am.