1 Reply Latest reply on Jul 29, 2006 9:46 PM by julieta

    passing parameters not working...(Re: detecting mouse over text field..

    julieta
      Hi!
      I was not sure if I should open another topic for this, but since I had already marked the other one as answered... I have a little problem... I tried to make the function startTextLoop accept a parameter (because i want to do the same process with some other texts on the screen, and I wanted to use the same function). The function works if I don't pass a parameter, but if I do, it stops working. Any idea why? I guess I am just still a little clueless with all this... thanks for taking the time....

      here's my code:

      var i:Number =0;
      var loop:Number;

      textwindow1_mc.onRollOver = function(){
      loop = setInterval(startTextLoop(textwindow1_mc), 200);
      }
      textwindow1_mc.onRollOut = function(){
      stopTextLoop();
      }



      function startTextLoop(textmovie:MovieClip){
      textmovie.text1_txt.text = my_texts ;
      i++;
      if(i >= my_texts.length){
      i = 0;
      }
      }

      function stopTextLoop(){
      clearInterval(loop);
      }