I know this has been asked before, but...

Ask a Question related to Macromedia Flash Sitedesign, Design and Development.

  1. #1

    Default I know this has been asked before, but...

    I've searched through the archives here and have found this question asked but only vaguely answered. I've tackled the flash tech notes on the subject [url]http://www.macromedia.com/support/flash/ts/documents/dynamic_text_scrollmx.htm[/url]
    But I feel like it's either missing a key step or two, or it thinks I know more than I really do (I know far less than even I think I know.) Actually, I couldn't even get the .fla from that tutorial to work after I downloaded. It just gave me output errors.

    So here it is....scrolling text from an external file. Please please take pity on me.

    I can scroll text with no problem, and I can even load text from an external file (through antiquated Flash 5 techniques) but I CANNOT scroll dynamically loaded text.

    The name of my text file is "text_news.txt"
    (The first line of my text file is "var1=blah blah blah, this is my text....", without the quotation marks. I don't know if the "var1" is really supposed to be there or not....or if there should be something different in its place...or if there should be quotation marks or ampersands somewhere....like I said, I don't know much!)

    I set up my text box in my movie by selecting "dynamic", "multiline", and gave it the instance name "text_news". (I'm not sure if this instance name should be the same as the text file's name or what...) and I dropped the ol' scroll bar componant into it. All set...good to go (I think)...

    I couldn't make much sense out of the actionscript used in the technotes, but this is how I adapted it for my movie (I'm almost embarrassed to show this...)

    loadVarsText = new loadVars();
    loadVarsText.load("text_news.txt");
    loadVarsText.onLoad = function() {
    textbox.html = true;
    textbox.htmlText = this.var1;
    };

    So, I gave it my best shot, but I'm a huge failure. It doesn't work one bit. The only thing that shows up when I test the movie is an inactive scroll bar.

    Could some kind soul possibly walk me through this? You can point out all of my stupid mistakes and blatant omissions. It'll be fun!

    Oh, and I am using Flash MX.

    xo,
    wickedlame.


    wickedlame webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Fonts & PS7 - I know this has been asked before
      Hello! I once posted a while back about how I had bought a few fonts online but PS7 wasn't recognizing it. I was told by some helpful forum members...
    2. sure this has been asked before but.....
      me being new, I need to ask. is there any tutorials that layout how to make a flash template? the following site is something like what I want to...
    3. somebody asked about scrolling MENU's!!!
      solution: http://portfolio.jumpout.co.uk/examples/director/scrollingMenu.zip (version 7.02) (7k) download other examples found at ...
    4. Save to CD (probably asked before)
      > Is it posible to save a site created in DWMX to a CD so that it can be A 'site' is simply a collection of web documents (html, gifs, asp, etc.)...
    5. What do you say when asked...
      "How'd you do that?" by the general public? I know when someone with PS asks me that, they want to know details. They understand that there's not a...
  3. #2

    Default Re: I know this has been asked before, but...

    Here's what I have been using.

    var FILENAME=myRemoteTextfile.txt;

    x = new XML();

    /* interdict 'XML' parsing with custom procedure */
    x.onData = function(data)
    {
    myTextString=data; //myTextString will now contain all of your text

    /* process text if required, initialize scrolling parameters */

    /* whatever else */

    stop(); //wait for somethjing to happen
    }

    /* bring in the text */
    x.load(FILENAME);

    Note use of onData function that waits for loading to be complete, and you have to stuff the result of the loading into your own text variable. I don't think it makes any difference to use loadXML or loadVars, because this stops the parsing and makes it do your own stuff instead. That's why 'x' in this case won't have anything in it and is useless.



    Pete Hughes webforumsuser@macromedia.com Guest

  4. #3

    Default Re: I know this has been asked before, but...

    Pete,

    Thanks so much for responding, but I guess I didn't make myself perfectly clear in my original post:

    I am an idiot.

    I really have no idea how to use the code you just gave me.

    I was hoping that someone could just help me out with the code that Macromedia provides in its technotes (I mean, theoretically, that code SHOULD work) so that I can at least have something to refer back to in the future if I have to modify it. Can anyone tell me what I'm doing wrong? There are many things, I'm sure. Instead of getting a scrolling text box, I just end up with an inactive scrollbar....no text appears at all.

    Help? Please?

    xo
    wickedlame.



    wickedlame webforumsuser@macromedia.com Guest

  5. #4

    Default Re: I know this has been asked before, but...

    In order for the file you downloaded from macromedia to work, you need to put the swf in the same directory as the text file.

    1/create a file mytext.txt and write var1 = blah blah enough to see it scroll.
    2/create a dynamic textbox with instance name scroller
    3/drag the component onto it
    4/in the first frame type
    loadVarsText = new loadVars();
    loadVarsText.onLoad = function() {
    scroller.text = this.var1
    };
    loadVarsText.load("mytext.txt");


    Certified but not by Macromedia!
    myurl
    stwingy webforumsuser@macromedia.com Guest

  6. #5

    Default Re: I know this has been asked before, but...

    Stwingy,

    Thanks so much....on first attempt I got the text to show up (huge progress!) but the scroll bar was still inactive. After a playing around a little, I've got everything up and running...I even managed to get html formatting. :)

    xo
    wickedlame.


    wickedlame webforumsuser@macromedia.com Guest

  7. #6

    Default Re: I know this has been asked before, but...

    Glad to help.


    Certified but not by Macromedia!
    myurl
    stwingy webforumsuser@macromedia.com Guest

  8. #7

    Default Re: I know this has been asked before, but...

    Ok, so I got my text file to load, got it to scroll, and got it to display basic HTML. However, I've encountered a little problem.

    First, I've found that when there is a character that Flash doesn't like (or thinks is something else) it stops displaying the text all together. (For example, "The cat & the dog" gets displayed as "The cat"). I've gotten around this for most characters using "%26", etc., but I'm having a huge problem with my mailto links.

    I have a huge list of links which start off with 5 mailto: links. If I remove those 5 links from the text file, the rest of the file shows up fine in the text box...but when I put the mailto: links back into the text file, nothing shows up at all. My HTML for these links looks like this:

    <u><a href=mailto:me@myaddress.com">me@myaddress.com</a></u>

    Anyone know why Flash fails to display this and all subsequent lines?


    wickedlame webforumsuser@macromedia.com Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139