PDA

View Full Version : Dynamic Text Box


wonderstew
08-17-2007, 07:08 AM
Let me preface by saying that I'm a designer, not a developer. I know very little about actionscript... not really even enough to get by.

I've been having trouble getting dynamic text to load from an external .txt file. I think there are some conflicts in my .fla.

Here are the errors I get.

**Warning** Scene=Scene 1, layer=actions, frame=1:Line 1: The identifier 'loadVars' will not resolve to built-in object 'LoadVars' at runtime.
loadText = new loadVars();

**Warning** Scene=Scene 1, layer=Layer 28, frame=89:Line 1: The identifier 'loadVars' will not resolve to built-in object 'LoadVars' at runtime.
loadText = new loadVars();

Total ActionScript Errors: 2 Reported Errors: 2

I really have no idea what this means...

All the pertinent source files are here:
http://rustbucketbingo.com/flashhelp/Flash.rar

Any help would be overwhelmingly appreciated.

RysChwith
08-17-2007, 07:35 AM
It means that you neglected to capitalize the L in LoadVars. Case is important in ActionScript.

Rys

wonderstew
08-17-2007, 09:40 AM
Thanks for you input.

I fixed the case. Now I get no error... but the text still doesn't show up.

RysChwith
08-17-2007, 12:36 PM
I can't do anything with a .rar file, so I can't really tell you.

In general, I can tell you that a lot of mistakes are caused either by having the wrong path to the file or by assuming that the data load immediately. It actually takes a little bit of time, and you need to have the code that handles the data in an onLoad function or something.

Rys

DreamWeaver
08-17-2007, 04:22 PM
ok, i have looked at your file and....

it is a mess. first i need to ask how many different txt files you are trying to read from, and what there names are, also what they are to load into. Because currently, flash is looking for two text files, kirupa.txt and content.txt. it is trying to use kirupa.txt for scroller which is a dynamic text field and trying to load content.txt into box?

correct me if i am wrong.

this i had troubble with as there was only one txt file in the .rar

i'm sorry if this sounded a little harsh, but i need to know this before i can help you.



Dreamweaver

bsxiong
08-17-2007, 04:54 PM
where is the rar?

DreamWeaver
08-17-2007, 05:03 PM
where is the rar?

in the quote on the first post

wonderstew
08-19-2007, 06:30 PM
Hmmm...

Thanks for looking at it.

I'm trying to load content.txt.

I snagged the script from kirupa's forum but I haven't been able to get it to work. I thought I changed every reference to the text file from "kirupa.txt" to "content.txt" but I guess I must have missed something...

Sorry. Like I said, Designer. Not developer.

I'd stick to brochures if I could...

DreamWeaver
08-19-2007, 07:35 PM
Ok, i went through your file, deleted unnecessary code, and changed a few things. for starters, you cannot use ampersands in the txt file unless it is the first character. this is because ampersands are used for separating the txt file into subsections so that each one can be used separately. I replaced all of the ampersands with the word "and" as well as made some minor modifications to your code, but for the most part, it was right. the only problem left that you will find is that the scrolling function of the box has not turned out as you probably expected it to. (it has no scroll bar, so the only way to view all of the text is by highlighting it.) other than that, the website looks great, and i wish you the best of luck.

oh, and if you are looking for some good tutorials on websites made in flash, i suggest www.learnflash.com as they have a great tutorial on it (if you are willing to pay). it is worth the money, because it is a video tutorial and it goes into great depth, so you understand everything, great for those just learning action script.;)

anyways, the finished file is here (http://files-upload.com/files/445191/Working.zip).

feel free to pm me if you have any questions on what i have done or why :D

wonderstew
08-21-2007, 08:57 AM
I think that worked it out for me. Thanks heaps!

I'm curious where I had references to "kirupa.txt" buried. I searched all my actionscript...

DreamWeaver
08-21-2007, 11:37 AM
i believe it was in the very first frame of the actions layer