View Full Version : Continuously Scrolling Text Field
02-05-2001, 08:16 PM
I am very new at this -- I want to use this scrolling effect with a separate text file that can be updated frequently. I know you addressed this in your tutorial, but I need to know what code to leave in and what code to change.
Could you please be very specific about what code to enter and where it should go when using a separate file? It's probably obvious to more experienced users.
02-06-2001, 12:28 AM
You just have to load up the text file into the variable which the text field shows. So make a text file called 'text.txt' and put this in it:
_level0.masker.contentText:contentText=The text that you want goes here
Then remove the _level0.masker.contentText:contentText = line of code on the first frame of the movie, and replace it with:
loadVariablesNum ("text.txt", 0);
That will load up the text file and set the text field to display the content of the text file.
Note that the text wont load instantly, it will need a second or two to load depending on how long your text string is. And also note that if the text string is very long it will get cut off at the bottom when you scroll right down, so you'll have to make the text field longer (just by draggingthe enlarge tab).
02-06-2001, 04:21 PM
Thanks, Jesse. for responding so quickly. I did try this but I get an error -- Error opening URL "file:///C|/.."
I have both of these files in the same directory. Is it looking only for a http address?
The code in Movie Explorer reads as you gave it to me.
In Frame Actions - the bottom 3 lines read
URL test.txt (I Used test as the file name)
Location: Level 0
Variables: Don't Send
(I changed the variables to the other choices, but I still get an error opening the url.)
I know I need to learn more about this by going through the book, but we are working on a project where we need this, and I like the way you set this up.
Thanks for any help you can give me.
03-02-2001, 06:40 AM
it works for me. i had everything right, but i didn't include the _root stuff in the text file itself. i'm a newbie also, and i'm kind of getting the hang of basic actionscripting. thanks
03-05-2001, 03:10 AM
You may want to try using "http://www.whatever.com/textfileName.txt" instead of a relative link.
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.