I’m trying to get an external text file to load into my movie… I read the tutorial about the scrollbar w/ external text file but it’s not really clear and it seems somewhat out dated…
I’m anxiously awaiting ASDG2 coming out on December 19th, but meanwhile, if one of you gurus could enlighten me real quick, I’d appreciate it a lot.
what would the code look like to load a text file called “theText.txt” into a text field called “theField_mc” created with AS itself attached to a mc called “theMC_mc” created w/ createEmptyMovieClip(); ?
I’m trying to do this %100 AS, no instance manually put on the stage.
ok, I copy/paste your example in the AS editor and your LoadVars is nice and blue but the one I got from the tutorial is not… I wondered about that loadVars for a while last night 'cause the reference didn’t mention anything about it and if it wasn’t a built in function, then, where else in the tutorial’s .fla was it referenced? After looking on every layer of every object, I got annoyed/discouraged… But when I saw your LoadVars blue in the editor it hit me: “LoadVars” and not “loadVars”…
I was about to blame myself but I’m very vain so I checked the tutorial:
loadText = new loadVars();
loadText.load("kirupa.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.kirupatext;
looks like it’s not entirely my fault after all
Still a question thought: is there a rule as what function starts w/ capital letter? usually, it always starts with small letter… That’s what got me…
ok, I decided to go for the manually created text field on the stage since the resulting .swf file displays the text beautifully like that…
BUT, if I load that .swf into the main movie with loadMovie, the text fanishes!!!
This is kinda driving me crazy… Anyone knows why it would do that?
thx.
it’s cool, I figured it out. I’m new to loadMovie and I didn’t realize that _root meant “root” of the main swf, not the loading one…
I got it all working: text field created dynamicaly filled with a text file text
But I ran into some kinda bug…
One of the loaded movie’s text doesn’t want to stay in the textField box… It bleeds even outside of the loaded mc on the main movie’s stage until the border of the main .swf! I forgot to mention that the problem comes from the fact that I’m embedding the font to display… with Arial, everything’s fine… wasting hours on little details… but I want it to look good!