dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Marquee that loads an external text

  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    14

    Marquee that loads an external text

    Hi,

    Did someone know which is the script to make a marquee that loads an external .txt file text? So I can easily update the text of the marquee?

    Also, how can I control the size, font, color and the speed ?
    Im using Flash MX.

    Thanks in advance.

    DAVID

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    msg1 is the <instance name> of a dynamic textfield
    this code is on the main timeline, same frame as textfield -
    Code:
    function marquee(){
    lv = new LoadVars();
    lv.onLoad = function(){
    msg1.text = lv.txt;
    len = msg1.text.length;
    tickSpeed = setInterval(ticker,100); // 100ms is the speed
    };
    //lv.load("ticker.txt?"+ new Date().getTime()); // test online file
    lv.load("ticker.txt"); // test local file
    };
    
    function ticker(){
    first = msg1.text.substring(0,1);
    second = msg1.text.substring(1,len);
    msg1.text = second+first;
    updateAfterEvent();
    };
    
    // to stop and reset the marquee, end the setInterval with -
    
    clearInterval(tickSpeed);
    msg1.text = "";
    
    // and start & restart with -
    
    marquee();
    the text file format is -
    &txt=... you're ready, Momma ? ... make sure you don't type too fast this time, i mean this has to be the one...this has to be the one with all the right words in it&

  3. #3
    Junior Member
    Join Date
    Aug 2006
    Posts
    14
    It works Great !!!!
    My friend: ... Xiexie again!!

    Cya.
    DAVID

  4. #4
    Huygens to Titan PCRIDE's Avatar
    Join Date
    May 2002
    Location
    PLUTO
    Posts
    1,335
    I tried this and its not loading. Does someone have an example I can use? I just need something quickly.

    THanks
    PC
    All out of Honey Buffers, so i grabed a few Goose Heads

  5. #5
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    you can download a xml ticker from my library
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center