A Flash Developer Resource Site

Results 1 to 19 of 19

Thread: FAQ style scrolling text

  1. #1
    Member
    Join Date
    Feb 2002
    Posts
    63

    FAQ style scrolling text

    I would like to make a FAQ scrolling text block in MX.

    Is it possible to make a scrolling text frame that has embedded anchors? Right now i have a scrolling text box made with a actionscript that goes and gets a text.txt file.

    I can add "a href" tags but they only pop open a new browser window. I want the text to jump into itself in the scrolling frame.

    If there is a better way to do this let me know. thanks.
    jeff

    ps. i have included a file showing what it looks like.
    Attached Files Attached Files

  2. #2
    Member
    Join Date
    Feb 2002
    Posts
    63

    changed to text.htm

    i changed the "loadVariablesNum("./text2.txt", 0);" to "text2.htm" and now it understands the rest of the html tags (and it handles links) but it still won't recognize the named anchors in the document (the document that loads in the scrolling field). maybe i'm doing the anchors wrong?


    i put this by the first FAQ question:
    $a href="#1">question 1</a>

    then this by the answer:
    $a name="1"></a> this is the answer.

    [replace the first $ with a <]

    Is this not right for the anchoring in html?

  3. #3
    Member
    Join Date
    Feb 2002
    Posts
    63

    flash only understands limited html tags

    i got online and the macromedia help site said that rich text (html) only knows certain tags = -A-, -B-, -FONT COLOR-, -FONT FACE-, -FONT SIZE-, -I-, -P-, and -U-

    i would think that the -A- tag would encompass the anchor reference?

  4. #4
    FK's Official War Driver wiReZ's Avatar
    Join Date
    Jun 2002
    Location
    wireless
    Posts
    615
    You're referring to this right? Unfortunatly, anchor tags are not supported. Flash only allows HTML 1.0 formatting.
    My current rig: AMD Athlon64 3500+(Winchester Core) MSI K8N Neo2 Platinum - 1GB
    (2x512MB) Kingston HyperX DDR333 BH5 - ATI All-In-Wonder 9800 Pro 128mb - SB Audigy 2
    WD 80GB 7200RPM 8MB - WD 250GB 7200RPM 8MB - MAX 120GB 7200RPM 8MB - Dell 2001FP 20.1 LCD

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    It may be possible to use the asfunction and then set a scrolling position in the textfield itself.

  6. #6
    Member
    Join Date
    Feb 2002
    Posts
    63

    hmmm

    if i'm not that good with actionscripting is there another way to do a FAQ? maybe a template?

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    http://members.lamicro.com/~FGill/faq.html

    Used the asfunction. Everything is basically in the html source.
    Ouside of the asfunctions themselves, on the first frame of the movie.

  8. #8
    Member
    Join Date
    Feb 2002
    Posts
    63

    YES!

    that looks right, but the html source only talks about the embedding of the swf. can you send a .fla file? should i pay you for your time?
    thanks!

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Sorry I ment the text file!

    Try this attached .zip.

    No need to pay me! Wanted to test my theory!
    Attached Files Attached Files

  10. #10
    Member
    Join Date
    Feb 2002
    Posts
    63

    you ROCK!

    awsome

  11. #11
    Hey thanks for that oldnewbie!

    I have got it all working fine on the root level of my movie, however, when I try and add the script and other stuff to a movie clip then add the movie clip to root level it doesnt want to work!

    Do you have any idea how I can get it working...

    Thanks heaps in Advance.

    chaps.

  12. #12
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Must be a path to your asfunctions.

    It's been a long time since I did this thing. Can you attach your .fla and text file if one is envolved. It should be zipped up and in MX only format, not MX2004.

    I'll have a look.

  13. #13
    ok, here it is....
    I have just set up a tempoary .fla file which is still basically the same as what I am trying to do...

    Thanks heaps for this...

    Rob
    Attached Files Attached Files

  14. #14
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    No asfunctions are included in this .fla? Did you just forget to add them in this one?

  15. #15
    Hey,

    Sorry, Im not sure what the asfunctions are used for...
    It seems to work fine if I do not use it within the movie clip and just directly on the scene???

    I have just simply used the example you developed a couple of messages up...

  16. #16
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Sorry my bad! Been so long! I was looking for some kind of comment indicating that those where the asfunctions, and all that time, they were sitting there on the first frame.

    Hold on... Will be back in a second!

  17. #17
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Here it is...

    Added a few comments, about the asfunctions... Hope you understand them!

    But your main problem was that you have to add the instance name of the movie clip. I gave it an intance name of "holdermc" and corrected the scripts accordingly.
    Also changed the variable's name starting off the text file to "mytext" instead of "text". Flash could be confused by "text" alone, as it is a reserved word.
    Attached Files Attached Files

  18. #18
    WOW! thanks so much for helping me here hey...
    It works great now... the only thing is, how do I set the point where I want it too jump too, eg. I change the number in "gotoPos,105", but does this number refer to the line number?

    Thanks again...

  19. #19
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Not necessarily! You could have several < br> tags on one line in the text file, that would throw off the line numbers...

    It's all a question of ajusting each different text file, according as I commented in the .fla, to the actual number of lines in the text file, the tags as < br>, the textfield's height, the font's character size, etc...
    Trial and error! Start from the top and test it. Best I can do!

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