1 Reply Latest reply on Jan 2, 2011 10:46 PM by prodigalmaster

    Unstable Code

    jaswerl

      Hi All

      ,

      I have a long screen shot that I have put in a scroll panel. I want the user to be able to point to a specific field and then have a tool tip fade in, hold for as long as it takes to read, and then fade out onRollout. To impliment this I covered all the fields in the scroll panel with a transparent button symbol. Then for each field, I create two moviclips. The first fades in on rollover and stops. The second one starts visible then fades out on rollout. However it seems that the more of these I do, the more unstable the code gets. In some instances it works just as designed. In other instances somtimes the tool tip doesn't appear, somtimes the fade tween dosn't play. And another issue is that the longer I play the .swf the more unstable it becomes. A snipit of my code  for one field/button combination is shown below. I'm very new to AS. How can I Improve the performance?

       

      selectionTxtOut._visible = false;
      selectionTxtIn.visible = false;
      selectionTxtIn.stop();
      selectionTxtOut.stop();

       

      /***********Sel************/

            sp.content.Sel.onRollOver = function()
            {
              
         selectionTxtIn.play();  
         selectionTxtIn._visible=true;
         gotoAndPlay(1);
           
        }


            sp.content.Sel.onRollOut = function()
           {
       
        selectionTxtIn._visible=false;
               
        selectionTxtOut.play();
        selectionTxtOut._visible = true;
        gotoAndPlay(1);
             
        }


      I have the same code for each field in the scroll panel. I put stop(); as the last statement in the Action layer. All the code and the movie clips reside in the first frame.

        • 1. Re: Unstable Code
          prodigalmaster Level 2

             sp.content.Sel.onRollOver = function()
                {
                  
             selectionTxtIn.play();  
             selectionTxtIn._visible=true;
             gotoAndPlay(1);
               
            }

           

          the selectionTxtIn plays but inside it does it get reset back to frame 1 and stopped. so on the last frame INSIDE the selectionTxtIn is there gotoAndStop(1); ?

          if not then do that for this and the selectionTxtOut.