hi everyone!

I want a "Continuous marquee text" over and over again... back to back... i dont want the text to finnish scrolling right the way across before the next one starts... as soon as it has fully scrolled onto the flash file i want the same text to start scrolling and so on a so forth...

any help greatly appreciated...

Dani AI

Generated

The original request from is straightforward: have the same line of text scroll continuously so a new copy starts before the previous one has finished. The practical note from and is also important: Flash is deprecated in browsers and often blocked. For archival or controlled AIR/standalone SWF use, a simple, robust ActionScript 3 approach is to duplicate the text and recycle the copies so one follows the other seamlessly. Civil, focused replies are more useful than off-topic complaints such as the one from .

A simple AS3 pattern (create two text fields, move them left every frame, when one exits left move it to the right of the rightmost copy):

import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.events.Event;

var speed:Number = 2; // pixels per frame
var gap:Number = 40;  // spacing between repeats
var txt:String = "Replace with desired marquee copy";

function makeTF(s:String):TextField {
  var tf:TextField = new TextField();
  tf.defaultTextFormat = new TextFormat("_sans", 14, 0x000000);
  tf.autoSize = TextFieldAutoSize.LEFT;
  tf.selectable = false;
  tf.embedFonts = false; // true if embedding a font
  tf.text = s;
  return tf;
}

var t1:TextField = makeTF(txt);
var t2:TextField = makeTF(txt);
addChild(t1); addChild(t2);
t1.x = 0; t2.x = t1.x + t1.width + gap;

addEventListener(Event.ENTER_FRAME, onFrame);

function onFrame(e:Event):void {
  var items:Array = [t1, t2];
  for each (var tf:TextField in items) tf.x -= speed;

  for each (tf in items) {
    if (tf.x + tf.width < 0) {
      var rightX:Number = -Infinity;
      var rightW:Number = 0;
      for each (var t:TextField in items) {
        if (t.x > rightX) { rightX = t.x; rightW = t.width; }
      }
      tf.x = rightX + rightW + gap;
    }
  }
}

Notes and troubleshooting: set embedFonts = true when using embedded fonts so width measurement and rendering match; use autoSize so width tracks content; adjust speed or compute pixels/second (divide by stage.frameRate) for consistent timing. Add pause-on-hover, keyboard controls, or an ARIA-like alternative in non-Flash contexts for accessibility—moving text can harm readability and must offer controls. For modern web, prefer CSS3/JavaScript animations or libraries instead of Flash.

Recommended Answers

All 3 Replies

Why
some wont see it flash is blocked
others will avoid the site because it uses flash
why not shoot yourself in the foot if you want to cripple yourself

That would make me hit the back button at lightning speed.

fucking idiots, answer the fucking question , he asked for help not you damn 2 cents. What a fucking bullshit website, I am now hitting the back button at "Lightning speed" assholes...

commented: rude little person, 2years after the event -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.