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




Loading Variables From A Text File



Easy question:

Can I load a text file and variables from the text file on the same frame (different layers) or do the variables have to be loaded one frame ahead..

Thanks



FlashKit > Flash Help > Flash MX
Posted on: 10-01-2003, 08:48 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 Variables From Text File. ( Not Fixed Variables )
i would like to know how to make my Flash werbby load variables like this automatically everytime i load my flash webby

(this is contained inside a text file) example:

&news[15462]=hello&
&news[14890]=uuuuuuuuuuuh :P&

but i won't be using fixed numbers. these numbers will be randonmize. but how do i tell my textfield to load allll variables that contain the word "news" and a value (number) ? or is there any other ways of doing this?
[Edited by xanbarian on 07-08-2002 at 12:56 AM]

Loading Variables From Text File
I am wanting Flash to pull a variable from a Text file. I know how to bring a string into a dynamic text file, but I then want to set a condition within flash depending on what information has been pulled into the field.

Loading Variables From A Text File?
so my text file looks like:

var1=bob
&var2=cindy
&var3=sandy

but Flash can't properly evaluate the expression (var2 eq "cindy)" as true because the line break...

i really don't want to have my text file look like:

var1=bob&var2=cindy&var3=sandy

is there a way around that so I can keep the text file people friendly?


thanks in advance

Loading Variables From A Text File.
I'm trying to load a group of variables from a text file and then use those variables to set a status. My text file looks similary to this (it does not have any blank lines before the variables begin):

BPMBDailyStatus=2/21/02+5:10PM
&BPMBDailyAudit=2/21/02+5:30
&BPMBDailyComments=This+is+a+test+again.
&FLStatus=Red&ETOLStatus=Yellow&BPMBStatus=Blue
&BPMBDailyAtlas=2/21/02+5:20

However, when I import the variables some will have an "
" attached to the end, but others will not. Any suggestions?

Thanks,
Teancum

Loading Variables From A Text File
I'm wondering if it's possibile to load variables from a text file into an array, so that each variable in the text file is stored in a different array container? The number of variabled in the text file is unknown, but the variables names will be sequential (ie. ball1, ball2, ball3, ball4...). Thanks in advance.

Jim

Loading Variables To A Text File
Hello All,

Can we write variables to a text file from Flash without an HTML page? As we load variables from the text file in flash by

on (press) {
loadVariables("source.txt", "_wherever.text_box");
}


how can we do the opposite?

thanks

nixthinx

Loading Variables From A Text File
i am using flashMX (trying at least) to load name values pairs (such as name=ross) from a text file and for some thick reason it isn't working; well one works but no more do

i am creating dynamic text fields giving them a variable name (name for instance) and then using loadVariablesNum to link to the text file

is it a problem that i am using lots of name/value pairs or am i just doing it stupidly wrong? i am just updating my site using flashMX and need to update from a generator template

could people at least give me some links to decebt tutorials on the subject?

thanks

Loading Variables From A Text File
Hi there.
So I am playing around with php, and I got to writing to a text file, and can read it back in to a point, then I get stuck...

This is where I started:

Text file looks like this:
Count = 5&Hat5=red&Weather5=rain&Shirt5=red
&Hat4=yellow&Weather4=sun&Shirt4=yellow
&Hat3=yellow&Weather3=sun&Shirt3=yellow
&Hat2=green&Weather2=rain&Shirt2=blue
&Hat1=blue&Weather1=rain&Shirt1=green

loadVariables('PhotoBook.txt', 'Photo0');
Q = Number(Count);
L = Q + 1;
labels = new Array();
for (n=0; n<L; n++) {
labels[n] = Photo0.Shirt2;
trace ("Shirt" + n + " = " + labels[n]);
}

it returns:

Shirt0 = blue

Shirt1 = blue

Shirt2 = blue

Shirt3 = blue

Shirt4 = blue

But I really want the values for Shirt1, Shirt 2, etc. So I try:





labels = new Array();
for (n=0; n<5; n++) {
labels[n] = Photo0.Shirt add n;
trace ("Shirt" + n + " = " + labels[n]);
}

This returns:

Shirt0 = _level0.Photo0.Shirt0
Shirt1 = _level0.Photo0.Shirt1
Shirt2 = _level0.Photo0.Shirt2
Shirt3 = _level0.Photo0.Shirt3
Shirt4 = _level0.Photo0.Shirt4


I cant figure out how to get the value of Shirt(n)
Any suggestions???

Thanks,
Patty

Help Loading Variables From Text File?
OK, I've gone to two sites (this and another) and both have not done CRAP for me. Here's two scripts i've gotten:


Code:
onClipEvent (load) {
this.loadVariables("myText.txt")
}
doesn't work, I receive error messages. then there's this one,


Code:
myNewLoadVars = new LoadVars();
myNewLoadVars.load("myText.txt");
myNewLoadVars.onLoad = function (success) {
if (success) {
myText.text = this.DTBVariable; //or .htmlText
} else {
myText.text = "error";
}
}
I have no damn clue how to set it up, I know this CAN'T be that hard - so can someone give me an IN DEPTH Action Scripting process on how to GET VARIABLES from an external text file?

Let...

MC = homeText
Dynamic Text Box Variable = homeText
Text File = homeText.txt

just to make it easier for me and possibly you.

Loading Variables From Text File
Hi,
I was just wondering if it is possible to load in only certain variables from a text file. I want the variables to be labelled so 1= house&2= road&3= tree etc, the script will then generate a random number and load in only that variable with the same number. Is it possible or is there a better way to do it taking into consideration that my list will be very long.

Thanks

Sean

Loading Variables From Text File
Hello again to everyone,

Its been a while since I was able to do any programming due to major computer failure so it's taking me a while to get back into it!

Anyway, to my problem - I am trying to load variables in from a text file and use this variables to create a movie that has several textfields in it (the textfields being populated by the variables in the text file). I keep getting the script making flash run slow error which I remember being connected to my loop deifinitions but I can't work out whats wrong. Its also the first time I have ever used text files so I'm not sure if this is correct.

Heres my code anyway:

This is the text file called weeklynewstext:

Code:
&numberofweeks = 4
&week1 = this is the news for week 1 %OD
isn't it great
&week2 = this is the news for week 2 %OD
isn't it great
&week3 = this is the news for week 3 %OD
it's been a pish week
&week4 = this is the news for week 4 %OD
who gives a monkeys
&textloaded = OK
And in my Flash movie

frame1.

Code:
loadVariables("weeklynewstext.txt",0);
trace(textloaded);
if(textloaded == OK){
gotoAndPlay(4);
};
frame2

Code:
gotoAndPlay(1);
frame3
blank

frame4

Code:
//load text variables into array
trace("gothere");
trace(numberofweeks);
textarray = new Array;

for(arraycount = 1; arraycount++; arraycount>=numberofweeks+1){
textarray[arraycount] = "week" + arraycount;
};

//set variables
weekcount = 1;
newstripwidth = 260 * numberofweeks;

//create main movie clip
createEmptyMovieClip("newstrip",1000);
_root.newstrip._width = newstripwidth;

//main loop
for(newsloop = 1; newsloop++; newsloop >=numberofweeks+1){
xvalue = newsloop *260;
_root.createTextField("textfileholder"+newsloop,newsloop*1000,xvalue,90,240,220);
_root.newstrip["textfileholder"+newsloop].text = textarray[newsloop];
};
With regards to the trace commands in frame 4, it is able to display "got there", but says that number of weeks is undefined. This makes me think that I am not loading the variables correctly.

Has anyone any idea where I am going wrong?

Thanks for your help,

Graeme

Loading Variables From Text File
I need to load x and y coordinates from a text file to change the position of a movieclip (theclip) on the main timeline.

Here's my Text file (go.txt)

Code:
&xpos=115&ypos=24


here's my code

Code:
loadVariablesNum ("go.txt", 0);
xpos = Number(xpos);
ypos = Number(ypos);
setProperty ("_root.theclip", _x, xpos);
setProperty ("_root.theclip", _y, ypos);


This doesn't work, it just moves the clip to the upper left corner of the stage. I'm sure I'm missing something simple that one of you gurus will see immediately. Thanks for you help

Loading 100's Of Variables From Text File
hey guys!

i need to import LOTS of variables from a text file to a couple of arrays. and before i struggle to figure out how to do that i'd like to know if you thing the flash player will choke on all the variables coming in, or be ok?

i'm playing back recorded mouse movements among other things -

thanks!!

Loading Variables From A Text File?
Hi all,

This doesn't seem to work:

-------code--------
on(release) {
loadVariables ("pic.txt", "_root.targetMC);
trace("anz")
}
------/code--------

and in the txt file:
---------
anz=100
---------

what am I doing wrong?

Thanks to you all in advance!

----va

Loading Variables Text File
Hey guys,
I have a quick question about a text file that I have. I want to load two variables, how do I do that. for some reason, it all gets merged as one variable when i load it up.
I have info="sadfasfdsfa" info2="dsaffdas"
What is the proper way to separate these. Thanks in advance everyone
Don

Loading Variables From A Text File
hi,
is it possible to load variables from a text file using actionscripting? for example, i have the following data in a text file:

colour1 = "#CCFFCC";
colour2 = "#000000";
name = "My page";

is there a command to get the data from this text file local to the final swf movie using actionscript? cheers

burnsy

Loading Variables From Text File
Hi Folks

Basically i'm wanting to load some variables from a text file into a dynamically created menu. The problem is that i dont want the loaded variables to be assigned to a Dynamic Text Field. I've found plenty of info and have had success loading to text fields but i want to take the values from the text file and assign them to variables on the root timeline. It shouldnt be as difficult as it seems. I've even tried loading the variables into a Dynamic text field then set the _root variables to the value of the text field but that dont work either

It is really frustrating

Thx in advance

Peter

Loading Text File Variables :
i have swf file loading variables from text file, it works fine offline , but online it does not load the variables when text file size is larger than 3 kb !!
here is the action :
frame 1 :
eof1 = "0";//var used to check loading txt file vars

N.B. text file has variable : eof1=1

frame 2 :
loadVariablesNum("mcq_questions.txt",qlevel);

frame 3:
if (eof1==1) {
gotoAndPlay ("work_frame");
}
frame 4 :
gotoAndPlay (3);

problem : when file size > 4 kb it stops at frame 3 and does not continue,,
how can i modefy that simple preloader to load my data online correctly?

Loading Variables From A Text File.
I have this txt file which include lots of vars,

What is the "easiest" way to load them with flash.

Loading Variables From A Text File
I made a flash interface that succesfully uploads values using PHP to the corresponding txt files I made. Now I need to make it load them but I don't understand how.

I was thinking I need to use loadvariables()?

but then how do I make that info a variable I can use?

Loading Variables From Text File On Local
Can anyone tell me the code to put into Flash to load variables from a text file located on C:? I have been trying:

loadVariables ("c: est.txt","_root.display");
loadVariables ("file:///C|//c: est.txt);
etc.....


I need to load it up in one scene and display it in another.

Any suggestions would be greatly appreciated!!!
Please be very specific.

Thank you in advance,

Jason

Loading Variables From Text File And Checking
hi

in script... how would i programm the script so that when i load a text file "notice_board.txt" and inside the text file it has "nb_checker=1" . how would i tell it to check if "nb_checker=1" then it will perform a command?

example ;-

*THIS IS NOT REAL CODING. AM GUESSING*

- Text file ( notice_board.txt )

nb_checker=1

- Action sctipt

LoadTextFile = notice_baord.txt

if nb_checker = "1"

gotoAndPlay(8);

else

stop();



Hope someone understands :P

Loading From Text File And Manipulating Variables
I searched for the answer and have looked through ActionScript dictionary for the answer. I am close, but I need help from a more experienced FLASHer.

I am trying to create a script that will take a movie clip and duplicate it based on what I type in the text document. For instance, within the text document I have:

totalClips=4&

Based on the totalClips variable, I need to duplicate the movie clip that many times. However, when I try to compare the totalClips with the currentClips variable, they never are of an equality.

I have got so far as to figure out that I will somehow have to use parseInt, but after that it just won't work.

Any ideas?

Please let me know if you would like to see the code in its entirity.

Thanks.

Loading Variables From Text File. What Is Wrong Here?
Ok, I have 3 frames in my movie. On frame 1 it stops and pulls in the loader movie clip.

This clip has this action:

onClipEvent (enterFrame){


function myFunction(){
//data is loaded
_root.boo = container.boo;
_root.coo = container.coo;
trace(_root.coo);
//note, the above trace says "ready66"
if(_root.coo=="ready66"){
_root.gotoAndStop(2);
}else{
_root.gotoAndStop(3);
}
}


container=new LoadVars();
container.onLoad = myFunction;
container.load("test.txt");

}


It always goes to (3) even though _root.coo = "ready66" when I view variables. I have tried removing all the _root and just doing container.coo, etc.. I have also added more items to the text.txt file around coo.

Loading The Variables From The Text File Into The Movie
Good day!

I'm trying to create quiz. My questions are in text file.

q1.txt
q2.txt
so on...

I used this code to load the variables


Code:

filename = "q1.txt"
loadVariablesNum (filename, 0);
My variables for q1.txt

question
a1
a2
a3

My problem is when i run my movie, variable question is only loaded.

Can anyone help me.
Thank you in advance.

[F8] Loading Dynamic Text Variables Through A .TXT File.
I just read a very short Tutorial on how to make a dynamic textfield, "link" it to a variable and then put the varuable value into a .TXT fiel and load it.

It seemed very easy but i didint get it to work, maybe cause i use FLASH 8.

Its a flash 6 (MX) tutorial.
( http://www.visualxtreme.com/flash_tut1.html )

So anyway, what do i do wrong? I make a dynamic tetxbox. In the VAR field i enter the value "text".

On the frame the texbox is in i write:

Code:
loadVariablesNum("textvar.txt", 0);


Then i create a textfile that i put into the same folder as the flash file called textvar.txt. In the text file i write "text= balbalblbalbalbalb"

When i run the SWF nothing happens. Am i close?

Help With Loading Variables Form Text File.
Hello guys
I am trying to get data from a text file and load it to variables or an array in flash. I am able to get the variables using the loadVars function and display them in a dynamic field. But I can’t seem to get the damn things into variables so I can use them in statements.
This is how the variables are formatted in the text file:
name1= &name2= &name3=&…….name50&
price1= &price2= &price3= &…….price50&
the best thing would be if i could use two arrays, let say name_array, and price_array.

Your help will be greatly appreciated.

thanx

Loading Variables From Text File On Button
Hiya,

Ok, heres the problem: I have an external text file with a bunch of different variables in it. Looks a bit like this:

&variable1=This is the first variable
&variable2=This is the second variable
&variable3= This is the third variable

So, I have my flash file with a text area to display the contents of the variable, I also have an input text box and a submit button.

What I want to happen, is if the user types variable1 in the text box, and then clicks submit, I want the contents of the variable to be displayed in the text area.

Heres the code I have for the button:

submit_btn.onRelease = function(){
user_response = input_txt.text; //to store whatever is inputed
myLoadVars = new LoadVars();
myLoadVars.onLoad = function() {
Text_area.text = this.user_response; //takes user input and finds variable name
}
myLoadVars.load("MyText1.txt"); //loads external txt file.
}

So, basically it doesnt work, but I cannot see why, it just comes back with an undefined. I'm sure this is something really stupid on my part, Im not the best at as! But, any help offered would be greatly appreciated!

Thanks

Just to add to this, I am creating a kind of glossary thing, where I want to be able to search the variables within the external txt file. So, if anyone has any other ideas as to how to do a basic text search for a glossary of terms, that too would be helpful , thanks

[F8] Loading Multiple Variables From Text File
I want the values of the variables in my text file on click of a button in my dynamic text field.My text file is
counter=3
msg1=text1
&msg2=text2
&msg3=text3
..and so on
I just want text1,text2,text3,..and so on to come on click of a button not the value of the counter.Plzz help.Thnx a tonne in advance

Loading Variables That Stand For Url's From Text File
First off, I feel like a dumbass since my last question was such an easy fix. Second, I think this is probably an easy fix too. I am trying to load variables to a movieclip and these variables contain, or are suppose to contain, the relative url's of images to be loaded a few frames later. The variables are named pic1, pic2, pic3... and so forth in that fashion. I used the code:

_root.window.content["thumb"+i].pic.loadMovie("pic"+i);

inside of a while statement. When I test the movie, sever errors come up saying it cannot find ....pic1, ....pic2, and so on. The text file with this data looks something like this:

pix=10&pic1=%22image2.jpg%22&pic2=%22image3.jpg%22 &pic3=%22image5.jpg%22 ... and so forth

I know that atleast the first variable is loading due to the fact that the script creates the correct number of instances of "thumb." Again I beg for help.

Loading Variables Into An Array From A Text File
hello fellow flashers

i've been asked bya a friend to make a flash movie that shows a list of words on the stage, one by one, each filling the stage as much as possible.

my original idea was to make individual textfields for each word (custom sized to spread them accross the stage) and place each textfield in their appropriate frame, letting the file fly swiftly over each one. but i've been wondering if there is a smarter alternative.

i'm fairly new to ActionScript, so i'm not familiar with many of its terms and restrictions, but lately i've made some progress and came accross the loadVariables method. is there a way to use this method or something like it to load a list of words in a text file into an array? i was thinking that afterwards i could simply make a loop that went along the array printing the words on the screen, instead of making the million and a half textfields i was talking about. of course, that would still leave me with the stage-covering dilemma, but it would certainly be a start... :-P

thanks for the help

(yay! first post! hi mom!)

Loading Variables From A Text File- Scope?
I’m building a CD presentation and I’ve run into some difficulty. I have an swf that uses

loadText.load("TEXT3.txt");
newsBox = this.answer10;
question = question10;

to populate a couple of text fields, all good so far. http://www.traugmanvaluation.com/faq.swf

the faq.swf is loaded into a blank movieclip on 2000menu.swf
and works properly from there, I can see the text fields populating properly.
http://www.trugmanvaluation.com/2000menu.swf

the menu is loaded into an empty movie clip on the intro movie
http://www.trugmanvaluation.com/2000intro.swf


my problem is when I try to run the faq from the main movie, I can’t see the text from TEXT3.txt, doesn’t appear to load at all, but the swfs load OK. It seems like it should work consistently. Can you smart flash folks offer some idea about it? Thanks in advance, pretty much out of my depth here.


Paul Elwood

Loading Dynamic Text Variables From Txt File
I have a form with dynamic text fields that are populated by an external text field using LoadVars.

I now would like to add a combo box or list that would specify the name of the external txt file to load into the text boxes.

The current code just loads the text file named in the quotations.
How can I specify to load from a combo box selection?

Loading Data From Text File Into Variables
Hey,

I am trying to load variables from a text file into a variable in my Flash movie, and then parsing that data into an array. I can get the read to work fine if I read the data into a dynamic text field, but not when I just want to read it into a variable behind the scenes in Flash.

The text document contains something like the following:

news=Item 1|||Item 2|||Item 3

Then in Flash I have:

Code:


loadVariablesNum("news.txt", 0);
someArray = news.split("|||");



I have a text field called txt1, and if I change the var in the text document to txt1=... then the text field becomes equal to the value of the text. This is not what I want however, as I need to parse the data first.

Any ideas what I am doing wrong?

Thanks!

Loading Text File Variables With Cold Fusion
I need ColdFusion to write to a .txt file which will later be loaded by a flash movie. when coldfusion writes to a file it automatically does a carriage return when it is done. the problem is that there cannot be any extra spaces in the text file and thus when using coldfusion to write to a text file, loading them into flash does not work. any suggestions or any way to get rid of this carriage return? if not is there any other scripting language (php, cgi, perl) that can write to a file without a carriage return???

thanks
Chris

Checking Full Loading Of Text File Variables
little question for you guys -

is it possible to check the loading of text file variables?

i have a whole lot that i load in one frame at the start of the movie:

loadVariables ("copy1.txt", "faces.dummy");
loadVariables ("copy2.txt", "faces.dummy");
etc...

but sometimes not all the variables are loaded when the user clicks the relevant button.

how do i guarantee the copy appears when needed?
thanks,

hed


[Edited by hed on 07-18-2001 at 10:51 AM]

Critical Delay In Loading Variables From A Text File
Hello all,

I have a flash menu system in which I am trying to change variables by loading them from separate text files. I have a large gap in my understanding why the loadvariable command does not load the variables completely before it continues to the next line of script. In my file the variables are not even able to be accessed by the following frame. I can use them on the third frame from the frame in which the Loadvariable command is used.
Does it need time to be loaded? and if so does this mean that if loaded from the web it will take longer as this delay exists locally on my machine. Then if this is so how can I fix it elegantly.

Any help would be greatly appreciated.

Will

Loading Flash Variables From Text File And Using In Random
In flash 5 I loaded variables from a text file and i can display them in dynamic text fields. (varibles are integers), but I can't do math with them or use in the Random() function. Flash recognises their values as 0. Does any one know how I could do this, thanks.

Trouble With Loading And Using Variables Form Text File
Ok , i'm creating a dynamic movie that is updated by the values stored in a text file.

I want the movie clip to either display red amber or green, depending on the text file's contents.

So far I have this:
in the text file:

color=green

in the flash file:

stop ();
loadVariablesNum ("info.txt", 0);
if (String(color) == "green") {
gotoAndStop ("green");
} else if (String (color) == "red") {
gotoAndStop ("red");
} else if (String (color) == "amber") {
gotoAndStop ("amber");
}

Loading/Sending Color Variables To/from Text File
Hi, I'm a newbie to ActionScripting and I need some help.

What I have are two movies. One we'll call admin and the other will be called user. For the admin movie, only certain people will have access to the password protected URL where it resides. Once there, they will change colors to represent different market areas on a map by clicking a color button and then choosing an area to be shaded accordingly. Once the admin is done setting the colors, I'd like the color value of each clip in the movie to write to a text file.

Then on the user movie, I'd like to load the text file in and have the color values of each clip display dynamically.

Right now I have a test file set up that works a little differently. I have it so that the admin will choose the colors and when they click on a submit button, a new URL will open with the colors the admin user just picked populating into the user movie. Here is the URL: http://141.158.15.45/sample2.html

(Choose a color, then click on a triangle area - then click the purple button)

This works great, but I think I'll have trouble in the end because I will have 210 variables in my final movie. Also this is not quite the functionality I need for my application.

I've tried using:

loadVariables("color.txt", 0); with the color.txt file contents like this:

ob1_c=0xFFFFcc&ob2_c=0xFFFF00&ob3_c=0x00FFFF

but nothing much happens when I try that.

I feel like I'm *this* close to figuring this thing out, but I'm missing something crucial. HELP PLEASE!

Loading A Movie That Has Loaded Variables From A Text File
Does anyone on this board know how to load a swf into a movie during playback, when the swf being loaded has variables loaded into it from an external text file?

This applies to Flash 5.

Loading Variables From Text File To Set Colours Of Objects?
I am making a Flash file which will have the text driven by an external text document. I wondered if it was possible to also set variables in the doc to control colours of items in the movie, e.g. to colour borders/shapes etc?

Thanks

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.

[MX04] Loading Variables From Text File Into Array And Combo Box
Haven't been here for a while, but I will try and reciprocate any help.

I'm loading a long list of variables from a text file (delineated by "|" and line breaks) into an array, and populating a combo box dynamically. Everything works fine locally, but when playing off of the server, only the first line is loaded from the text file.

This code is running in the first and only frame of a child movie to the root. I've experimented with moving the code to the root, over multiple frames, and using loadVariables with onLoad--all variations work locally but not on the server.

-----------------------

_lv = new LoadVars();
_lv.onLoad = function() {

// clean up text sting
var_temp_array = unescape(this).split("=&onLoad=");
var_temp_string = var_temp_array[0].split('
').join('
');

// make array
var_temp_array = var_temp_string.split('
');

_global.devs = new Array();

for (a=0; a < var_temp_array.length; a++) {
devs.push(var_temp_array[a].split('|'));
box.cbNew.addItemAt(a, (a+1)+". "+devs[a][1], a);
}
}

_lv.load("data_post.txt");

---------------------
Any help is much appreciated.

Loading Variables From A Text File And Using Them Globally In A Flash Document
well im making a little flash music player thing. and i want to put some variables in a text file and use them globally.

So far i havent been able to work out how to do this. I have searched the net and came up short..

i say again.. i want to use them GLOBALLY..

Help With Loading Variables From External Text File On Local Machine.
Hi guys,

I am a relative newcomer to Flash MX and although I can solve most probs that i come across, can take considerable amount of time doing so.

Therefore some help with the following would be great:

I am trying to load variables and their values from external text file on my local machine into a Flash movie. I am currently experimenting with the LoadVar object instead of the XML object.

I have the following code so far:

myLoadVars = "new LoadVars()";
myLoadVars.load("variables.txt");

where variables.txt is the external text file.

Some questions:
1. Have i referenced the text file correctly?
2. What format/syntax does the text file need to be in?
3. How do I use an event handler to access the variable values in the Flash movie?

Many thanks for any help that I receive.

Problems Loading External Text File With Load Variables In Windows
Hi,

I want to load the text content in my Flash movie from a external text files with the load variable action. Everything works great, that is when I test it on my Mac, when I try it in Windows under virtual PC explorer won't load the external text files into my movie. Sometimes it even crashes Explorer completely! I tried several source codes which I found on Flashkit but every time the same happens.

Assigning Dynamic Text File Variables To Variables
Ok so I know exactly how to load variables from a text file and catching these variables in a dynamic textbox to show there string content. But I wanted to work with the string in the passed variable (ie from txt file) BEFORE I display the text in the dymnic text box. I seem to be having trouble assigning the passed .txt file variable to a newly created variable in my movie, it keeps saying "Undefined" when I run a trace().

<code>
//The contents of the text file looks like this
&textxxx=This is the text withing the text variabale

//1st frame, layer 2 in main
loadVariables("text.txt", _root)

//1st frame, layer 1 (below layer 2)
_root.strText = _root.textxxx

</code>

->So why does it say strText "Undefined" !? Does flash not allow variables to be assigned to variables?

If you help that would be fantastic

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