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.
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.
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?
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!
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.
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...
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.
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.
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?
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!