Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Loading Text File



need help please...

i have this movieclip which act as button to load external text files and my problem is when the text file load into my empty movieclip which i attached a scroller and when i load the next text file it starts to the position where i stop scrolling..

my code is very simple its like this:

on (release) {
loadVariables("sometext.txt", "_root.emptyClip");
}



FlashKit > Flash Help > Flash MX
Posted on: 10-28-2003, 05:42 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Load Variables From Text Then Loading Image File With The Filename Given In Text File
The problem is, that i need flash to load variable from text file, eg: info.txt, with image=gt.jpg in it.
Then I want flash movie to load a gt.jpg into a blank movie.
The point is that after i change filename in txt file, i want movie to load that img.

I wrote AS:
loadVariablesNum("info.txt", 0);
loadMovieNum(image, 0);

but it's not working
After i traced variable image, debugger showed that this variable undefined, but if i put textbox with image as variable, it shows "gt.jpg".

Please help

Loading An Array Of File Names From A Text File.
Basically I want to do the following.

Create an array of

Image[x] = "x.jpg"

from a text file where the images are listed as

x.jpg
y.jpg
z.jpg

I can't figure out how to load these in an array and I haven't been able to produce this from the closest examples I have found.

Any suggestions?

Dynamic Loading Text File Not Loading Correctly
I am loading info from a text file (noticeBoard.txt) using the following code;


sourceTXT = "noticeBoard/noticeBoard.txt";
nodeSource = new LoadVars();
nodeSource.onload = gotoAndStop(printText);
nodeSource.load(sourceTXT);


Then writing it into a textfield when the timeline moves to the 'printText' frame.

The swf is working when I load my html page (notice.htm), with all my values being displayed. If I then navigate away from this page to one where I write more info to the text file and then return to notice.htm the latest info in the text file does not show in my swf. Even if I refresh the html page the new info does not appear until I shut my browser window then reopen it.

Does anyone have any suggestions to why this info is not coming in on the fly?

Thanks

Loading A Html-tagged Text File Into A Text Field...it's Just Not Working For Me...
hi,

i'm trying to load news.txt into a textfield using loadvars.

news.txt:
-----------------------------------
&news=<p font face="Verdana" size="12"><b>Recent Achievements:</b><br>Congratula etc. etc.

the as:
----------------------------------
loadnews = new LoadVars();
loadnews.load("flash/news.txt");
loadnews.onLoad = function(success) {
newstext = loadnews.news;
trace(newstext);
gotoAndStop(2);
}

the trace is showing that newstext is the text out of news.txt ... in the frame 2 that the onLoad function refers to is a textfield (multiline, with the html as true) which is supposed to display the newstext variable.

If i set newstext to something else ... eg: newstext = "some text" then it works fine ...

what's going on???

Cheers,
Ben

Loading External Text File Into Flash Using Links From Dynamic Text Field Link?
I am using a dynamic text field to load in .txt files with html tags. I have a couple "click here" type links that I would like to use to load a different .txt document into the same dynamic text field instead of a url link like it does default. Is this possible? I'm sure I could put a button over the text since its not long enough to need a scrollbar but I would like a more dynamic and flexible way to do this if its possible.

Thanks

Loading Pictures From A File Like Loading Text..how To Do It?
I don't know if this is possible...but I'll ask it anyway.

I know how to load text into a flash movie from a text file, (the load variables function), but is it possible to load an external picture file, like a jpg or a gif in the same way without using the flash program?

If it's possible, can someone please tell me how it is done?

Thanks,
JRL
http://www.xtranix.com

Loading External Text File Into Text Area (flashMX)
Hi,

I am trying to load text from an external text file into a textarea in FlashMX. I am able to set the contents of the textarea by using a string ("test thingy"), but I was wondering if anybody could point me in the right direction on hoe to include text from an external file.

Used to set string:
scroller.text="test thingy";

Thanks a bunch,
Niklas Wahlberg

Loading HTML/Text From External Simple Text File…
To all the Flash Gurus:

Basically how do you do the above? I've gotten very small snipets of text to load from an external text file, but there was probably at maximum 50 characters. This is even after a long load time and a very fast connection (T1/off of the HD).

I'm trying to get this to work so that I don't have to update the flash files to update the text - or rather so that someone else can update them w/o me acting as a middle man except for special occasions. The best example, I think, of what I'm trying to do is www.spartamusic.com

Thanks-
Davin

Loading Text From A Database Into A Text File Inside A Movieclip
Okay. I have a movie clip with two frames. Inside frame 1 is a text box named "home_copy". The mc in which this textbox resides is given an instance name of "copy". Frame 2 has a different text box (we'll worry about this after solving probelm 1.)

So I'm using loadVariables so that the site is compatible with old browsers.

The PHP file I'm grabbing has this at the end:
Code:
&home_copy=Welcome to EROS. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. etc.
So how do I get my php source code to go into the text box, "home_copy", which is embedded into a movieclip, named "copy".

thanks

Loading Text Into Mulitple Fields From A Single Text File
Hi there. I am trying, and failing(so no soucre) to make text load dynamically into multiple fields.

I am trying essentially to load text using only one text document- into several fields. This is so I can run a very primitive cms system in flash. (all the fields need to call different portions of the text.

If anyone understands what I mean and how it could be done, it would be great

Loading Text From Text File And Then Scrolling It Using Components?
Helloo.

Can anyone please help me.

I want to dynamicaly load text into flash, probably from a txt file. Then I want to be able to set up my file so the text field is scrolable using the 'scrollbar' component.

Can anyone please help? Everytime I do it my text field wont scroll, even though I'm sure there is more text than can be seen?

Can anyone help with a .fla?


Cheers SHACK.

p.shackleton@brahm.com

Loading Text Into A New Text File On Local Network
How do you write text to a simple text file on a local network without using php.

Loading A Text File Into A Dynamic Text Field
Ok I have a dyamic text field called "Load"
I have a text file that is a few paragraphs, Is it possible to load the text file into that field?
I was think Load=loadVariableNum("http://www.___.com/text/text.txt","GET");
Maybe something similar. Thanks

Loading External Text Without Variable Name In Text File
i need to be able to load text from a file and put it in a dynamic text box but i cannot modify the text file to put in a variable name

ie the text file cannot contain variablename=1234
but rather must simply contain 1234

Is it possible to load some text without a variable name indicated in the file using flash mx 2004 and, if so, how would one do this?

Loading Actions And Text From External Text File
how do i do this....

i would like to add links to my flash webpage via an external text file. i have 6500 links to admin.

if possable would i be able to tell a button to goto a different url from an external text file.

Loading Values From A Text File Into Dynamic Text Box
Hello,

I'm using the as code to load a text file and trying to set it as the value for texboxes;


Code:
loadVariables("data.txt","");
date_text.text = date1;
title_text.text = title1;
entry_text.text = entry1;
the textfile is;

&title1=Welcome to my Flash Blog
&date1=13th November 2005
&entry1=This is the first entry in my blog. This is sample entry and all the data.


The as code has all the correct names of the dynamic text boxes, also it works fine if i put the names of the varibles from the text file as the var propertie of the tex boxes, but i dont want to use this method.

im sure its a silly little error, but been searching for a solution for over an hour with no luck

Loading Text Into Text Fields From An External File…
I have a file supplied to me with a couple of text boxes in it.

My friends would like to easily update the content of these boxes by using an external text file.

I have tryed tests with the "loadVariables" property, but can't seem to get any text to load at all. I have a text file called "Content.txt" and the dynamic text box has an instance name of text1 (original I know) and a variable name of myText.

The beginning of my text document starts of with "myText = "…

The line of code I was using was
loadVariables("Content.txt", text1);

this produced no result… does anyone have any suggestions for this problem?

Cheers.
Joel

Dynamic Text Issues When Loading From Text File
I've got a dynamic text block that loads text from a text file in the same directory as the flash file. The dynamic text area is scrollable, renders the text as html, and applies the stylesheet that i load externally correctly. For a scroll bar i used the UIScrollbar in Flash MX 2004 V 7.2

If i test out the movie clip on it's own it loads fine and all the text shows up in the text area. However, if I load the movie clip into a time line, where it is animated, in other words, if i have a motion tween on it, all of the text shows up in the area, but the scroll bar won't scroll down far enough to read it all. The only way to see all of the text is to highlight it and drag down.

I've tried calling the scrollPane.refreshPane() action after the motion tween but nothing seems to work to get the scroll bar to go all the way down to the last line of text.

I'm pretty sure this is another bug that has probably been worked out somewhere else, and I just can't find the solution online.

Any ideas?

Thanks,
Nate

Loading Dynamic Text Without External Text File...?
Hello,

I apologize if this has been asked before as i'm sure it has but for the past few days with all my searches on sitepoint, google, and flash kit but haven't been able to accomplish it.

What i'm trying to do is have text in my flash movie change based on a variable displayed on a WEBPAGE. I tried to accomplish this using FLASHVARS but i'm not even sure if I used flashvars correctly since not only did it not work but I couldn't find a tutorial that told me what i had to do inside the .fla file to make the flashvars function work.

I was wondering if someone here can point me into the correct direction or explain to me how exactly i would go about doing this...?

Again, all i'm trying to do is make a text in the .swf file change based on a variable in the web page, such as how FlashVars works...

Thank you in advance, and again i apologize if this was answered before.

Loading Dynamic Text With Hyperlinks From A Text File.
Is it possible to load text from an outside source using loadVarsText.load("text.txt"); and have some text bold and other text have html links?

Where can I find how to do this, or is it even possible?

I'd gladly pay you on Thursday
for a hamburger today!

Loading External Text File Into Dynamic Text Box
I have a dynamic text box on my stage that has a set width and height i want to populate it with an external text file to make it easy to update the text with out having to touch the fla. I'm just beginning to learn AS3 and don't know were to begin, in AS2 i would give the text field a variable and in my text file start with the variable name= ,variable on text isn't supported by AS3. any help would be appreciated.

Jake

Dynamic Text, Loading Text From Text File
I have a large text file, full of, believe it or not, alot of text. When it loads into the textbox in flash, it cuts off after a certain amount of lines. How many lines does it cutt off at and if I can, how do I increase this? THanks

Loading Multiple Text From Same Text File?
Hey all!

I've been looking for a tut and searching the forums, but am having trouble locating info on this.

I need to do a movie where there are probably 40 or so spots where I will need to load text dynamically from a text file, just phrases and sentences. I would like to do this from the same text file though. I've used just the basic load text using the name= , which is pretty simple. But what if i want to put a whole bunch of variables like this on the same text file?

Thanks for any help with this!!

Loading Text Variables From A Text File
Well Im quite new to Loading text variables and creating a way for our clients to easily add news and update a "news" textfield, and I would appreciate it if someone could provide some samples or sample ActionScripting coding & a brief description of how-to do it, thnx its greatly appreciated.

Links to a good Flash MX tutorial on this would be also great.

Fade In Text When Loading From A Text File.
I have a text box that loads flash from a text box and ive turned that into a movie clip and by changing the movie clip alpha from 0 to 100%.....it only effects the scroll bar not the actual text coming in from the text file....anyone know how to do this?

Loading A Text File Into A Dynamic Text Box
I am having some issues loading text into a text file.
The loads fine from an external .rtf file using the loadVariables function.
I have embedded fonts and it looks great.

My issue is, characters like ' and " appear as weird characters.
Also, I want to bold or italicize some words, and, if possible, make some words different colours.

Could someone point me in the right direction?

I have seen the use of the backslash. Is this the way to go, and if so, how does one use the backslash to solve this issue?

AS 3.0 Loading External Text From A Text File
OK, so things have changed, a lot. In AS 2.0, I could create a text or HTML file with variables and have dynamic text fields to display the text from the loadVariablesNum argument. AS 3.0 uses a totally different model. How can I simply grab text from an external document and display it in a dynamic text field?

Loading Text And Image From Text File?
Hi there... This is probably a really dumb question so dont laugh.

I've created a dynamic text box within my flash file which loads an external text file. In this text file, I thought maybe I could use html like <img src="myimage.jpg"> to load an image along with text i have in this file. Obviously it doesnt work like that....so is there another way I can do this? I wanted to do it this way so that anyone who knows just a tad bit of html can edit this text file without touching the flash file.

thanks for your help!!

Loading Text And Image From Text File?
Hi there... This is probably a really dumb question so dont laugh.

I've created a dynamic text box within my flash file which loads an external text file. In this text file, I thought maybe I could use html like <img src="myimage.jpg"> to load an image along with text i have in this file. Obviously it doesnt work like that....so is there another way I can do this? I wanted to do it this way so that anyone who knows just a tad bit of html can edit this text file without touching the flash file.

thanks for your help!!

Loading Text From An External Text File
i wanna know if there's a way for me to load my txt file into flash? so that when i have to change something, i wont have to open up flash and publish it.



thanks

Loading Text From External Text File
Hi, i want to make a map editor for an Arkanoid style game. And i want to draw the stage in tiles. For this i want my flash to read from the external text file. I will write the characters in the text file where each character will represent a tile in the game and will be drawn at runtime. My question is that when i write something in text file lets say i write

A A A B C A A B

in the text file. where each character represents a tile in the game. How will i get this data from the text file. like if i load it through
loadvariables() command then where this data will go. How can i manipulate this data.
can anyone plz help me.
And sorry for the bad english.

Having A Nightmare Loading Text From Text File
Hi there

I've got a quite complex structured movie that I'm working on and I'm having a nightmare with the loaded text. It's difficult to explain and I can't post the fla as it's massive.

Basically it is a presentation that I'm building for my boss that has all the text held in external text files. On the main stage, as well as other things, there are 5 buttons and a text slider which has 5 positions on it and slides into place depending on which button is pressed.

the slider movie is structured like so.

instance name of txtSlider - inside this are five mc's called text1, text2, text3, text4, text5 and inside these are the text boxes that i want to load the text into from the text files.

lets take text1 mc - i have 2 dynamic text boxes in there one has the variable name of title1 andthe other has the variable name of body1. my text file has the follwing in it...

title1=Welcome To This Presentation
&body1=This is the main body text for section one.

on frame one within text1 is this code:

stop();
this.loadVariables("texts/main_text.txt");
title1.text = title1;
body1.text = body1;

within text1 mc i also have 4 buttons and i want these to load text into body1 text box from another text file and overwrite the originally loaded text.

I've had no problem doing this, but when the the main movie slides to another section when one of the 5 main buttons is pressed, when i return to this first section the original text [title1 and body1] doesn't load in. What I get is the last loaded text from the buttons within text1.

Is this making any sense?

I tried adding the code to load the text inot text1 to the main button on the main stage but this doesn't do anything or doesn't work, so i guess I've got that wrong.

What is the best way to load multiple texts into one textfield from different locations in the movie?

aaaaaaaaaaaaaaaaaaaaaarrrrrrrrrrrrrrrrrrggggggggghhhhhhhhhhhhhhh

Can anyone help?

Loading From Text File
I would like to use a menu set up found on http://www.flashkit.com/tutorials/Ac...41/index.shtml. Is there any way I can the variable name and text to load from a text file? If so how?

TRN

Loading Text From A File
I am sure this has been asked a million times, but I could not find it in the forums.

How do I load a plain text file into a textbox? Assume I have already created a dynamic text field with the variable name someText or something.

Thanks in advance.

Loading Text From A .txt File
Hello,
I am using a load variables command to call the text from a file called test.txt. The way the text is set up in the text file is:

Variable=&Welcome to this page, it generates the text on the fly! Cool!&

the error i am getting is:
Wed Oct 03 13:19:06 EDT 2001: C:Documents and SettingsJeffCDesktopTest.swt
Set Environment: Data source format error, invalid number of data records in : test.txt

I know this is confusing but if anyone has any ideas they would be greatly appreciated.
Thanks alot
Jeff

About Loading Text File
Hi everybody
I have problem of loading a text file, i would like to load a text file from server and display in my html which is using flash, the text file content will update every minute.
i have used a button and the actionscript is
------------------------------------------------------------
On (press)
{loadVariableNum ("http://address/file.txt", 0);
}
------------------------------------------------------------
when i try the swf file before export as html, it works perfectly, but when i export it to html, the content of the text file dont update anymore, why??????? Any solution according to this problem, pls help me , thank you so much!!!!!!!!!!!!

Loading From A Text File
Hello all,

This is what I'm trying to accomplish.. I understand (I think) how to load text from a text file into the flash movie at runtime.. This is what I need to figure out now. Let say I'm trying to create an ASCII map to represent a graphical picture. For example

MAP
===
************************LL******
***********************LLLL*****
***********X***********LLLL*****
****************X*******LL******
********************************
************BBB*****************

and lets say that "*" represented a "grass" tile, the "X" represented a tent, and the "B" would represent a building tile. respectifully named
grass.gif, tent.gif, building.gif

Now I have done this before in a programming language.. pretty simple..
open up the text file, create a loop to parse the text file and add hit checks
if(charHit == "*")
{
runDisplayGrassTileFunction();
}


my question is.. how do I do this with actionscript in flash? is it even possible.. the reason I ask, is because we have a "tent city" and I'm creating this flash movie that shows a graphical layout of the city.. and what I want.. need to be able to do is change this layout.. now I could create a .gif of the layout, and everytime we add / remove a tent change the graphic, re-compile the flash movie.. and re-upload.. but what would be 10000,000 better and move efficient, would be to update a simply text file.

If anybody understands what I am trying to do, and can help. It would be appreciated..

Thank You.

Loading A Text File
Hi,

Does anyone know a good tutorial on loading a text file??

I cant find one, and this problem is becoming the bane of my life!!!!!!!

Thanks for any help

ADam

Loading Text File...
Hello! Is there a way to simply load some lines of text from an actionscript? I simply want to store some information, separated by line-breaks.

Okay, you could use XML, but the text-file should be as easy as possible (because it should be used by some people not very familia with such things as tags...)

Okay, you could also use LoadVars, but there ist the same problem and it's not easy to store a changing amount of lines.

Solutions?

Martin

Loading A Text File Into An MC
How do i load a text file into an MC? I tried to follow this tutorial but it was all on the global line...i also need to scroll it too...

Help With Loading Text From A File
Well, I make a php script that outputs information from a database. It loads correctly, but I want it to show one record at a time. It come in the format user0=Blah &msg0=blah &user1=someone &msg1=blah &... etc etc... my problem is, how do i tell flash to look at the variable user+x

Loading Text From A TXT File
I know this may seem easy but here it goes.

I have a dynamic text box. I would like it to load a basic TXT file that can have links and other formatting. How do I do this?

Loading Text From Txt File
I'M FED UP!!!

Okay, I'm loading some variables off of a server via a text file. My script includes the full path (i.e. Http:\www..... ) to the text file. When I test the program, or run the swf locally on it's own (not within a html file) everything works great!!! It gets the variables, updates the text file etc. etc. However, when I post the SWF file onto the server then try it or try it locally tagged into an html file, it crashes!!! I don't understand!! it's all the same path etc. Basically it works on it's own and not in a Browser. Can anyone help me?!?!?!?!

Loading Text File
k this is my first post so if it messed up sorry. i need help in loading my text file into the flash file for my web site.

Loading A Text File
Yea, I know this subject has been answered many times before, but I looked at the tutorials on the FK site, an dI couldn't understand it. I am a complete newbie to Flash by the way, and I'm running Flash 5. I have a little box on my Flash movie, and I'm trying to load a text file into the box, but I don't know how. Can someone please break this down for me so taht I can understand? Thanks.

Text File Loading
I have successfully gotten a text file to load into specific variables using the loadVariables function and using name/value pairs in my text file. Is there a way, however, to stream in the text from the file not caring about the format? The server will be dropping down various text files and I do not have the luxury of getting the format of those files changed. Thanks in advance for any help.

Text File Not Loading In Swf
gidday,
I have a flash movie that targets another swf file into it. The swf has a
scroll bar that loads an external text. When i play this swf on it's own the
text loads and is viewable. But when the swf is loaded into another swf the
text doesn't load.
This is the script I'm using to load my text into the intial swf.

loadVariables("text.txt", "_root");

Any help appreciated.
web

Text File Not Loading?
Hi, here is a code I'm using to load the contents of a text file into my swf...


Code:
on (release) {
loadVariables("text/about1.html", _parent.textbox.text);
}



When I export the movie, the output window pops up and tells me there was an 'error opening url', yet it is showing the path to the file perfectly. Could the problem be with either the path to my mc or is my text file corrupt? I'd like to add that it works fine when I have the mc that will hold the text on my _root timeline. It doesn't work though when I place that mc within others, which is really what I need to do...any suggestions?

Loading Mp3's Through A Text File
i have this juke box that works on my local machine but when i upload it

it doesnt load the text file that tells the jukebox what to mp3 play?

can anyone help?

thank you

caseybusch

Loading Text From .as File?
ok so here's the thing.

I've been given a test as part of getting a full time flash design job. They gave me a half-made site and want me to put it together which is no problem eccept for one thing. They have all the text fields loading from one .as file (info.as) which contains 4 different fields of text labeled &sInfo1,&sInfo2,&sInfo3 and &sInfo4.

I've loaded text from a txt file before but not with multiple sections like this nor from an .as file. Would anyone be willing to help me out here? I tried to search the flashkit but the search function seems to be down in the forum.

I know this is a big question but I have taken pity on the big questioned newb a few times myself hehe..

Thanks for any links and feedback

Copyright © 2005-08 www.BigResource.com, All rights reserved