2 Replies Latest reply on Jan 11, 2007 7:10 AM by Newsgroup_User

    looking for any assistance

    Level 7
      see script below.. for some reason the createTextfield command does not
      display the text but does create the box. any ideas? I am also trying to
      repeat the movie clip with dynamic text in it to scroll up the screen but it
      is not creating the next instances of the clip when the repeater is called.
      please let me know what you would do. thank you!

      SW = Stage.width; // scene width
      SH = Stage.height; // scene height
      _global.MSG_SPEED = 3;
      var lvl:Number=0;

      MovieClip.prototype.Txt = function(){
      trace("clipName:"+clipName)
      trace("LVL:"+lvl)
      mc.createTextField("mytext",this.getNextHighestDepth(),100,100,300,100);
      mytext.multiline = true;
      mytext.wordWrap = true;
      mytext.border = true;
      mytext._alpha = 100;
      mytext.text = "Text Goes Here";
      trace(lvl+" - "+ smText);
      };
      MovieClip.prototype.Move = function(){
      if (mc._y > -100) {
      mc._y -=_global.MSG_SPEED;
      trace("mc._y:"+mc._y);
      } else {
      mc.removeMovieClip();
      trace("FireFly:remove");
      }
      };
      setInterval( MovieClip.prototype.Move , 20 );

      Repeater();
      //Repeat interval to write text to screen
      function Repeater(){
      //Call the new message function every X Seconds
      lvl= lvl+1
      clipName = "msg"+lvl
      trace(" clipName:"+ clipName);
      trace(" lvl:"+ lvl);

      var mc = this.createEmptyMovieClip( "mc",clipName,
      this.getNextHighestDepth());
      mc.beginFill (0x666666, 20);mc.lineStyle (1, color, alpha); mc.moveTo
      ( 200, 200); mc.lineTo ( 200 + 400, 200 ); mc.lineTo ( 400 + 400, 200 +
      200); mc.lineTo ( 400, 200 + 200 );
      mc.endFill();
      mc._x = 30;
      mc._y = SH;
      mc.Txt();


      };
      setInterval( Repeater , 2000 );


        • 1. Re: looking for any assistance
          Darshan Rane Level 3
          just a calling problem


          SW = Stage.width; // scene width
          SH = Stage.height; // scene height
          _global.MSG_SPEED =3 ;
          var lvl:Number=0;

          MovieClip.prototype.Txt = function(){
          //trace("clipName:"+clipName)
          //trace("LVL:"+lvl)
          mc.createTextField("mytext",this.getNextHighestDepth(),200,100,400,100);
          mc.mytext.multiline = true;
          mc.mytext.wordWrap = true;
          mc.mytext.border = true;
          mc.mytext._alpha = 100;
          mc.mytext.text = "Text Goes Here";
          //trace(lvl+" - "+ smText);
          };

          MovieClip.prototype.Move = function(){
          if (mc._y > -100) {
          mc._y -=_global.MSG_SPEED;
          trace("mc._y:"+mc._y);
          } else {
          mc.removeMovieClip();
          Repeater();
          //trace("FireFly:remove");
          }
          };

          setInterval( MovieClip.prototype.Move , 20 );


          //Repeat interval to write text to screen
          function Repeater(){
          //Call the new message function every X Seconds
          lvl= lvl+1
          clipName = "msg"+lvl
          //trace(" clipName:"+ clipName);
          //trace(" lvl:"+ lvl);

          var mc = this.createEmptyMovieClip( "mc",clipName,
          this.getNextHighestDepth());
          mc.beginFill (0x666666, 20);mc.lineStyle (1, color, alpha); mc.moveTo
          ( 200, 200); mc.lineTo ( 200 + 400, 200 ); mc.lineTo ( 400 + 400, 200 +
          200); mc.lineTo ( 400, 200 + 200 );
          mc.endFill();
          mc._x = 30;
          mc._y = SH;
          mc.Txt();

          };

          setInterval( Repeater , 1000 );
          • 2. Re: looking for any assistance
            Level 7
            thank you,
            you fixed one of the issues.
            could you help me with another?
            the else statement is designed to remove the clip and not to fire the
            repeater. the repeater is to repeat the action to create multiple instances
            of the same movie clip with new text.setInterval( Repeater , 2000 );
            how would you go about doing that?

            so basically I want to see 5+/- based on speed mc on the stage at a time
            each running independently of the other.




            "Paul Gallagher" <momoney@prgdesign.com> wrote in message
            news:eo4he7$q7r$1@forums.macromedia.com...
            > see script below.. for some reason the createTextfield command does not
            > display the text but does create the box. any ideas? I am also trying to
            > repeat the movie clip with dynamic text in it to scroll up the screen but
            > it is not creating the next instances of the clip when the repeater is
            > called. please let me know what you would do. thank you!
            >
            > SW = Stage.width; // scene width
            > SH = Stage.height; // scene height
            > _global.MSG_SPEED = 3;
            > var lvl:Number=0;
            >
            > MovieClip.prototype.Txt = function(){
            > trace("clipName:"+clipName)
            > trace("LVL:"+lvl)
            >
            > mc.createTextField("mytext",this.getNextHighestDepth(),100,100,300,100);
            > mytext.multiline = true;
            > mytext.wordWrap = true;
            > mytext.border = true;
            > mytext._alpha = 100;
            > mytext.text = "Text Goes Here";
            > trace(lvl+" - "+ smText);
            > };
            > MovieClip.prototype.Move = function(){
            > if (mc._y > -100) {
            > mc._y -=_global.MSG_SPEED;
            > trace("mc._y:"+mc._y);
            > } else {
            > mc.removeMovieClip();
            > trace("FireFly:remove");
            > }
            > };
            > setInterval( MovieClip.prototype.Move , 20 );
            >
            > Repeater();
            > //Repeat interval to write text to screen
            > function Repeater(){
            > //Call the new message function every X Seconds
            > lvl= lvl+1
            > clipName = "msg"+lvl
            > trace(" clipName:"+ clipName);
            > trace(" lvl:"+ lvl);
            >
            > var mc = this.createEmptyMovieClip( "mc",clipName,
            > this.getNextHighestDepth());
            > mc.beginFill (0x666666, 20);mc.lineStyle (1, color, alpha); mc.moveTo
            > ( 200, 200); mc.lineTo ( 200 + 400, 200 ); mc.lineTo ( 400 + 400, 200 +
            > 200); mc.lineTo ( 400, 200 + 200 );
            > mc.endFill();
            > mc._x = 30;
            > mc._y = SH;
            > mc.Txt();
            >
            >
            > };
            > setInterval( Repeater , 2000 );
            >