Problem Importing .text File
Hey, has anyone got any ideas for what I might be missing here...
I've instructed my flash site to import and display the contents of a variable from a .txt file and when I press Ctrl-Enter to test it out in Flash MX it works fine, I can see the words that have been imported from the txt file.
However, when I go to preview in HTML, my dynamic text box no longer shows up any of the words from the text file. Any help asap would be much appreciated.
Cheers Pete
FlashKit > Flash Help > Flash General Help
Posted on: 05-19-2003, 05:59 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Importing Text From A .txt File
I have a scrolling text box in my flash movie, on several frames that can be accessed by nav buttons in my movie. What i want to know is how do you import text from a text file, say text.txt, into the scrolling text box. I dont want to have to edit the movie each time i add new content and want to be able to update the flash movie, just by editing the text in the text file. Does anyone know how to do this? Import text from a text file?
ps. In Flash 5
Thanks
Importing Text File
I want to import a text file of guest book entries, but I cant seem to figure it out. Can someone direct me to a GOOD tutorial or simular? Each entry will have two variables (comment and persons name).
Thank you for your time
Importing Text File
I know I have asked about this before, but I am just not getting it, can anybody direct me to a good tutorial on how to import a basic .txt file. No php files or nothing, just a basic text file.
TIA
Walter
Importing A Text File
Can anyone tell me how I can use an External text file
to be read from Flash in an input box? But I also want
to be able to format the text with html code, is it possible?
Ive seen other sites with it and I dont know how they did it.
So I am trieng to do this..
Flash TextBox Reads > text.txt
in text.txt have <B>welcome</B> then change colors and everything.
I am getting sick of jamming my code on one line
Importing Ext Text File
Trying to get external text file to load in Dynamic text box. Problem turning large amount of HTML text into URL encoded text. Any help on creating a long text file? Do I have to use URL encoded text? Embedding the text within AS slows MX way down, so prefer to use external file. Thanks in advance.
Importing Text From A Txt File
I am importing text from a txt file into a array, the elements of which are fed into a number of dynamic text boxes. Am using the follow code to do this:
files = new Array();
lv = new LoadVars();
lv.onLoad = function() {
fl = this.filelist;
files = fl.split(",");
c = files.length-1;
};
lv.load("question1.txt");
The text file includes + and % characters and when the files are imported into the array and put in the text boxes in flash these characters disappear. Can anyone explain why and how i can prevent this? Thanks
Importing Text From TXT File
I'm importing text into Flash using:
ActionScript Code:
loadVariables("textfile.txt")
which works wonderfully in most cases although I'm working on a project that requires an "&" character, which in this scenario is also used to end text strings.
Is there a way to designate the ampersand as a character instead of a closing cue? (I've already tried using "&" to no avail.)
Thanks,
Nick
Importing An External Text File?
Need a bit of help with this one. Been going round in circles for a few hours.
Ive got an external file called text.txt (in the same folder as the swf)
In the Flash movie ive got a button and a text field.
When you click the button, I want the contents of text.txt to appear in the text field.
Cheers.
Importing An External Text File
I need to import an external text file into a varible in actionscript. Basically, so I can change output text in flash by only editing the .txt file.
Rundown:
myinfo.txt
needs to be imported into
textbox (one of my varibles in actionscript)
_______________________________________________
Could someone type up some syntax I could use to do
this. Help would be much appreciated.
Importing Text From External File?
Can anyone give me a basic explanation on how to use actionscript in a text box to load text from an external source aka a .txt file or something?
LoadVars() I understand will do this but I'm not sure how to set it up.
Any thoughts would be helpful
(simple) Importing Text File
Hi all,
Ok I am attempting to import a text file via loadVariables.
This is the code I have so far :
Code:
// Frame 1
FileLoaded = 0;
loadVariables ( "test.txt" , 1 );
// Frame 3
if (FileLoaded == 0) {
a4 = FileLoaded;
gotoAndPlay(2);
}
//Frame 4
a1 = Item1;
a2 = Item2;
a3 = Item3;
a4 = FileLoaded;
stop();
and a text file of :
&FileItems=3&Item1=1&Item2=2&Item3=3&FileLoaded =1
Since this is for test purposes, I have dynamic text fields on the stage named a1, a2, a3, a4
When I Ctrl+Enter it runs, no complaints, but the FileLoaded is always 0.
What did I do wrong?
Vince
Importing A .txt File From Another URL Into A Dynamic Text Box
I was browsing through the tutorials and found this which is exactly what I need.
---------------------------------------------
To include a text file, html file, XML file, etc from a different server/domain - only a simple script is needed. In the Flash movie you would have something like this:
loadVariablesNum("GetFile.php",0);
You would also have a dynamic text box named 'Results'. After calling the script this text area would be populated with the information at the URL your requesting. Here's the script:
<?php
1) $URL = "http://www.somesite.com/Data.txt";
2) $fp = fopen( $URL,"r");
3) $Results = fread($fp, 800000);
4) fclose( $fp );
5) print "Results=$Results";
?>
----------------------------------------------
My problem is the instructions are for Flash 5 and I have Flash MX and I am a complete novice to Flash, period. I want to include news from a news program in my Flash site. The news is ever changing so I know that a dynamic text box is required.
If someone could further explain how to do this in Flash MX, I would be super grateful.
Where does the loadvaribles go and where does that script go? The simplest way you could tell me would be best.
Thanks so much
Importing Array From Text File
Hi all,
I'm trying to import an array from a text file
the array is written as such
myArray=[a,b,c,d,e,f,g]
when I "LoadVariablesNum" it loads the variable as, I think, a string. ie if you then trace myArray.length it gives 15, which is the number of characters including brackets and commas.
can anyone tell me how to import the thing properly?
thanks in advance
Problem With Importing Text File :/
Hey,
I am making my flash site editable via text files. I have successfully imported a text file with just text, but when I want to import a text file with a table in it, nothing shows up. Can flash not recognize tables, just text? Please reply.
Importing Flash With Text File?
hello, i have got a program that can make some cool lookin text effects, but the problem is, i cant play the swf file without the text document it comes with. How can i import the swf file into flash so i can edit it and view it? i can view it in the flash player but how can i IMPORT it, cause to play it, like i said, it needs the text file, and i cant import the text file.
the text file looks like this - &label600=Matrix&constructor=[type Function]&__proto__=[object Object]&globalsound=[object Object]&freeze=&url=http://www.violent-se7en.tk&urljumpto=www.violent-se7en,tk&loop=0&loaded=1&effect=600&colorbackgroun d=0x000000&colortext=0xEF0000&line1=Violent Se7en&line2=&line3=&line4=&line5=&x1=5&x2=5&x3=5&x 4=5&x5=5&y1=150&y2=150&y3=150&y4=150&y5=150&vol=11 0&s1=100&s2=100&s3=100&s4=100&s5=100&bg=&frameto=f ive
-im pretty sure i copied it all-
If u can follow my question, plz reply and help. i need to eb able to open this file in flash so i can edit it and export it as a avi.
thx
Importing Content From A Text File
We can import a text file's content to flash using
variable name= content for example (the quick brown fox jumps over the lazy dog)
Is it possible to import content from text file without giving the variable name in the begining.
If yes please let me know how.
Thanks
Salim
Importing A Text File Into Flash MX
Hello big world that lies beyond my front door
Can anyone point me in the right direction please - how do I import external text files into Flash MX
thanks...................................
Importing Lines Of Text From Txt File
Hi, I have multiple lines of unformatted text in a ordinary text-file looking something like this:
First line of text
Second line of more text
Third line of even more text
Last line of example text
What I was wondering was if there is a way for flash to import the lines separately and save them in strings created on the fly.
Note: I know that this is much simpler done in xml but since I want it to be as user-friendly and as easy to update as possible I would like to avoid any kind of mark-up.
Thanks
Importing (and Analyzing) A Raw Text File
I have to import a (long) text with that structure (this is the 5 first lines of the text)
The text will be often updated, so I can't edit it..it should be imported as it is
Code:
[Category]
item1=big / red
item2=thin / blue
item3=big / blue
item4=thin / yellow
I've understood that in Flash I must use the LoadVars() object:
Code:
loadText = new LoadVars();
loadText.load("test.txt");
loadText.onLoad = function() {
trace(this)
};
If I import the text like that, here's the result in the output window:
Code:
%5BCategory%5D%0D%0Aitem1=big%20%2F%20red%0D%0Aitem2%3Dthin%20%2F%20blue%0D%0Aitem3%3Dbig%20%2F%20blue%0D%0Aitem4%3Dthin%20%2F%20yellow&onLoad=%5Btype%20Function%5D
So, my question is:
How should I proceed to have that properly filtered and put in an array?
Thanks very much!
Importing An Array From A Text File?
Hi All
is it possible to import an array variable from a text file?
lets say i have
myarr=[["dave","jones",20],
["steve","smith",30],
["bob","wilkes",15]]
now could i have a text file with just the delimited values then import that into flash some how to build up the array?
I know i could do it like
name1=dave&sur1=jones&age1=20&name2=steve....etc.. .
but then the text file just looks harder to manage than the array itself
Does anyone know of a way of just being able to read in comma delimted data or am i asking too much?
regards
Harvey
Importing Arabic Text From An XML File
Importing text from an XML file to appear as text in Flash works in English, however if the text I want to import is in Arabic, when I test the movie there is no text at all.
Is there some particular syntax to preface the Arabic text?
I'll want to import text from XML in other languages too. (French)
I'd cut and pasted some Arabic text into the XML file that displays pictures and text in the "slideshow.fla" (http://www.adobe.com/support/flash/applications/jpeg_slideshow_xml/jpeg_slideshow_xml03.html)
Substituting Arabic text for English text, editing the XML file with Dreamweaver.
Any ideas as to how I might achieve my objective of importing Arabic text into Fash?
I'd started developing my prototpe in Macromedia Director 7, and then Director MX, but I have not found a suitable Arabic font that I can embed that will allow me to display Arabic fonts in Adobe Director. I have the Arabic text in a Word document.
I've dicovered that my Flash MX Pro and Dreamweaver both support Arabic fonts, but I want to import text from an XML file.
I'd prefer using cast libraries and cast members, but I don't know of an equivalent in Flash to what I'm comfortable with in Director.
Importing Text From External File
Hello All....Hopefully someone will be able to help. I am new to flash and have read several books on CS3 and all have said you can use external files and utilize the UILoader and UIScroller to accomplish this. Number one, I cant find the UILoader component but I can find a Loader component in Flash CS3. This doesn't except text files. It will except graphics files.
All I am trying to do is use my existing text files to populate a small movie but I don't want to have to script (unless I have to) and make the movie any more complicated. None of the text tools are helping since most want the field to be editable by the user. I want the textarea to be read only. I wrongly assumed that a TextArea would accomplish this.
Any words of wisdom from you experienced users.
Thanks
Importing (and Analyzing) A Raw Text File
I have to import a (long) text with that structure (this is the 5 first lines of the text)
The text will be often updated, so I can't edit it..it should be imported as it is
Code:
[Category]
item1=big / red
item2=thin / blue
item3=big / blue
item4=thin / yellow
I've understood that in Flash I must use the LoadVars() object:
Code:
loadText = new LoadVars();
loadText.load("test.txt");
loadText.onLoad = function() {
trace(this)
};
If I import the text like that, here's the result in the output window:
Code:
%5BCategory%5D%0D%0Aitem1=big%20%2F%20red%0D%0Aitem2%3Dthin%20%2F%20blue%0D%0Aitem3%3Dbig%20%2F%20blue%0D%0Aitem4%3Dthin%20%2F%20yellow&onLoad=%5Btype%20Function%5D
So, my question is:
How should I proceed to have that properly filtered and put in an array?
Thanks very much!
Importing (and Analyzing) Raw Text File
I have to import a (long) text with that structure (this is the 5 first lines of the text)
The text will be often updated, so I can't edit it..it should be imported as it is
Code:
[Category]
item1=big / red
item2=thin / blue
item3=big / blue
item4=thin / yellow
I've understood that in Flash I must use the LoadVars() object:
Code:
loadText = new LoadVars();
loadText.load("test.txt");
loadText.onLoad = function() {
trace(this)
};
If I import the text like that, here's the result in the output window:
Code:
%5BCategory%5D%0D%0Aitem1=big%20%2F%20red%0D%0Aitem2%3Dthin%20%2F%20blue%0D%0Aitem3%3Dbig%20%2F%20blue%0D%0Aitem4%3Dthin%20%2F%20yellow&onLoad=%5Btype%20Function%5D
So, my question is:
How should I proceed to have that properly filtered and put in an array?
Thanks very much!
Importing (and Analyzing) A Raw Text File
I have to import a (long) text with that structure (this is the 5 first lines of the text)
The text will be often updated, so I can't edit it..it should be imported as it is
Code:
[Category]
item1=big / red
item2=thin / blue
item3=big / blue
item4=thin / yellow
I've understood that in Flash I must use the LoadVars() object:
Code:
loadText = new LoadVars();
loadText.load("test.txt");
loadText.onLoad = function() {
trace(this)
};
If I import the text like that, here's the result in the output window:
Code:
%5BCategory%5D%0D%0Aitem1=big%20%2F%20red%0D%0Aitem2%3Dthin%20%2F%20blue%0D%0Aitem3%3Dbig%20%2F%20blue%0D%0Aitem4%3Dthin%20%2F%20yellow&onLoad=%5Btype%20Function%5D
So, my question is:
How should I proceed to have that properly filtered and put in an array?
Thanks very much!
Importing Text From Outer Txt File
hello there,
I have been looking form some nice tutorials to import text from and external txt file, and I know that it is doable since i have done it before, but I have yet to find a way that does not bug. The way that I currently do it only lets me load the text into one form field and when I start the process over again it does not work. Does anyone have a really good tut for me to see how to do this, or otherwise can show me how to this (action script and all)?
Thanks
Also I wanted to know if it would be possible to load php output text into a flash movie? I wnt to retreive data from my db into the flash movie.
Nick
Importing HTML File & Formatting Into A Dyn. Text Box
I've got a company that wants a Flash site, but wants to be able to update the text on their site all the time. I know how to import a *.TXT file by referencing the dynamic text box with a "variable=" at the beginning of the *.TXT file and using the A.S. <loadVariables ("textfile.txt", varText);> to load the *.TXT file. But all the paragraph breaks are double-spaced! See... http://www.rejuvesite.com/derisco/main.html
But, in the dynamic text box panel, there's that HTML checkbox. That sounds like what I want to use but I can't reference the textbox to an *.HTML file! <loadVariables ("htmlfile.html", varText);> returns nothing. And, if I copy all the HTML code into a *.TXT file, it'll work, but the formatting's not there and the lines are all double-spaced again! Grrrr!
All I want is to be able to let these guys make an HTML file in Dreamweaver (or whatever they use) and use Bold and HREFs and stuff and save it. Then, a dynamic textbox'll read whatever they made.
I'd really appreciate a helping hand with this if anyone could spare a brain cell or two. Thx.
Importing Number Variables From Text File
I have a slight problem that I cant figure out for you Flash Guru's out there. Here is the code.
for (i=1; i<=NoPlans; i++) {
setProperty ("_root.Menu.DropMenu.ClipButton" add i, _visible, true);
}
The "NoPlans" variable is loaded from a text file with a whole number value, but doesnt seem to work. If I were to place a text field in the movie with the name "NoPlans", the variable displays in the text field!! But why does it not work in the for statement??!! Me no understand.
Any help would be greatly appreciated.
Importing Text File Into Flash Array
Is there anyway to import a text file into flash and use each line as a different slot in the array? I am using a batch file to do a DIR on a directory and then redirect the output to a text file. I then want to use the random number generator to pick a random number and pull out a random slot, store that data into a variable, and delete that array value and shift the other values up. Is there any way to do this? I am rather new to action scripting, but I know a little programming so I think I just need guidence. Thanks in advance!
Dan
Importing Variables From A Text File Problem
Right. I am loading some variables from a text file. The text file contains one specific variable,
Code:
&de_amount=2
This variable is posing a big problem because when I later come to use this variable in a mathematical equation is doesn't read it as a number. For exmaple,
code: result = de_amount+1;
result shows as "21", not "3".
I rarely import from a text file, but unfortunately I have to on this occasion.
Can anyone tell me why this happens?
Thanks in advance.
Importing Text File Data In Flash
At the moment I know how to enter data from a text file into a flash file, for example this is my 'Monday.txt' file (a cut down version)
"AK2~Hairdressing Level 2 Year 2 Of 2","HDRN2AK2-2B1FA","12:30","14:30"," 10/ 9/2007","M316"
"AK2~Hairdressing NVQ L2 (Grp A)","HDRN2AK2-1B1FA","12:30","14:30"," 10/ 9/2007","M316"
"AK2~Hairdressing NVQ L2 (Grp B)","HDRN2AK2-1B1FB","12:30","14:30"," 10/ 9/2007","M308"
"Beauty Therapy Level 1 Grp D","BTHN1-1B1FD","9:00","10:30"," 10/ 9/2007","M306"
"Beauty Therapy NVQ Level 1 Grp A","BTHN1-1B1FA","9:00","10:30"," 10/ 9/2007","M306"
"Beauty Therapy NVQ Level 1 Grp B","BTHN1-1B1FB","9:00","10:30"," 10/ 9/2007","M306"
"Beauty Therapy NVQ Level 1 Grp C","BTHN1-1B1FC","9:00","10:30"," 10/ 9/2007","M306"
"Beauty Therapy NVQ Level 2 Grp A","BTHN2-1B1FA","9:00","12:00"," 10/ 9/2007","M217"
"Beauty Therapy NVQ Level 2 Grp A","BTHN2-1B1FA","12:30","14:00"," 10/ 9/2007","M306"
"Beauty Therapy NVQ Level 2 Grp D","BTHN2-1B1FD","12:00","15:00"," 10/ 9/2007","M217"
Using this coding, I now know how to get it into columns in a tabbed layout
Code:
var lv:LoadVars = new LoadVars();
lv.onLoad = func;
lv.load("Monday.txt");
function func(ok) {
if (!ok) {
trace("file not loaded.");
return;
}
var tf:TextFormat = new TextFormat();
tf.tabStops = [220, 340, 390, 440, 490, 520];
tf.font = "Verdana";
tf.size = 9;
var nextD:Number = _root.getNextHighestDepth();
var w:Number = Stage.width - 20;
var h:Number = Stage.height - 20;
var txt:TextField = _root.createTextField("schedule", nextD, 10, 10, w, h);
txt.wordWrap = txt.multiline = /*txt.border =*/ true;
txt.autoSize = true;
txt.setNewTextFormat(tf);
var temp1:Array = unescape(this).split("=&onLoad")[0].split("
");
for (var i:Number = 0; i < temp1.length; i++) {
var temp2:String = temp1.split(",").join(" ").split(""").join("");
txt.text = (txt.text.length > 0 ? txt.text : "") + temp2 + (i == temp1.length-1 ? " " : "
");
}
}
The problem I have now is, in the text file I am going to have upto 120-130 of these records, now the maximum I can fit onto the screen is 20, is there a way I can split this text file up so I can show Page 1/7, 2/7, 3/7, 4/7, 5/7, 6/7 and 7/7, where it switches over automatically via a timer of some sort, say after 20 seconds. Any help would be greatly appreciated, thanks
[CS3/AS2] Problem Importing Vars From Text File
This is a repost from ellis001's RESOLVED thread. I didn't think anyone would open the RESOLVED thread.
I'm trying to do almost exactly the same thing as ellis001, but I'm still getting (undefined). When I trace the variable that's being split into the array, it returns: <p align="left"></p>
My text file is MEname9.txt and contains:
&MEnames=1,2,3,4
The code I have currently for this section is:
var photoNum = 0;
var NameLoader = new LoadVars();
NameLoader.onLoad = function(success){
NameArray = new Array();
if (success){
MEnames = NameLoader.MEnames;
NameArray = MEnames.split(",");
}
}
NameLoader.load("MEname9.txt");
trace(MEnames);
NameBox.text = NameArray[photoNum];
It's identical to what a_modified_dog posted, and I can't see any difference in what I'm doing vs. what ellis001 was trying to do as far as importing the text and putting it into an array. But the array just isn't working. Any advice?
Importing External Text File Problem
Hello,
I have an external TEXT file which I wish to import its content into a FLASH file. I don't have any problem importing the content into the main window but once I move my Text area into a Movie Clip it doesn't work.
I am using the following comand for importing the Text into the Flash file.
---> loadVariablesNum("
Problems With Importing Data From Text File
i'm making a simple test program that takes data from a text file and uses it to compute with.
the problem is that the program doesn't run the line in the order they are written in. here's the code:
(see code at the bottom)
data.txt just says:
x=6&y=-4
and the output is:
----------------------------
c 1,1
a 1,1
b 6,-4
----------------------
why does trace('c '+coordinate); go before trace('b '+coordinate); ??
and what do i do to make it go in the other order???
Attach Code
// declare global array
var coordinate:Array = [1,1];
//----------first get points from txt file and put them into global array
var myLoader:URLLoader = new URLLoader();
myLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
myLoader.load(new URLRequest("data.txt"));
myLoader.addEventListener(Event.COMPLETE, onDataLoad);
function onDataLoad(evt:Event) {
var x1:Number=0;
var y1:Number=0;
x1 = evt.target.data.x;
y1 = evt.target.data.y;
trace('a '+coordinate);
coordinate = [x1,y1]
trace('b '+coordinate);
}
//-------------then use them ------------------
trace('c '+coordinate);
Importing Actionscript Code From A Text File
I'd like to keep some ActionScript code in a text file so it is easy to update. I've been trying to make a test, but it doesn't work. It traces correctly, but doesn't launch the code. Here's the code I'm using.
Code:
blahBlahText = new LoadVars();
blahBlahText.load("textDoc.txt");
blahBlahText.onLoad = function(loaded) {
if (loaded) {
launchCode = blahBlahText.launchCode;
button_mc.onRelease = function() {
launchCode;
trace(launchCode);
// trace returns:
// getURL("http://www.cnn.com", "_blank");
};
}
};
Somehow I need to activate the imported code?
Thanks for any help.
-pm
Importing A Mc In 04 And Displaying Data Via A Text File
Hi i need to display an ad in the header which is called from a another swf(ad.swf).
The main header has a link to the main page as well as search like mtv.
now ad.swf calls the ad banner from a text file along with the link.
previously i had it in the main swf but it caused issues with the other links as well as the search (its not working and I cant test it because of this problem)
the problem is whenever i click on any link or the search area it goes straight to the ad page. Dunno why? I am not good at scripting and the ad script was provided by members from Kirpa itself it was working fine till this problem surfaced. I have tried out everything i could search on the net but its not working.
please help me out in whatever way possible. The files are attached below.
Importing Actionscript Code From A Text File
I'd like to keep some ActionScript code in a text file so it is easy to update. I've been trying to make a test, but it doesn't work. It traces correctly, but doesn't launch the code. Here's the code I'm using.
Code:
blahBlahText = new LoadVars();
blahBlahText.load("textDoc.txt");
blahBlahText.onLoad = function(loaded) {
if (loaded) {
launchCode = blahBlahText.launchCode;
button_mc.onRelease = function() {
launchCode;
trace(launchCode);
// trace returns:
// getURL("http://www.cnn.com", "_blank");
};
}
};
Somehow I need to activate the imported code?
Thanks for any help.
-pm
Importing A Mc In 04 And Displaying Data Via A Text File
Hi i need to display an ad in the header which is called from a another swf(ad.swf).
The main header has a link to the main page as well as search like mtv.
now ad.swf calls the ad banner from a text file along with the link.
previously i had it in the main swf but it caused issues with the other links as well as the search (its not working and I cant test it because of this problem)
the problem is whenever i click on any link or the search area it goes straight to the ad page. Dunno why? I am not good at scripting and the ad script was provided by members from Kirpa itself it was working fine till this problem surfaced. I have tried out everything i could search on the net but its not working.
please help me out in whatever way possible. The files are attached below.
Importing External Text File Into Movie Symbol
I'm trying to import text from an external TXT file into a movie instance. The Dynamic text box works fine in the main timeline, but will not load the text into the movie symbol.
The movie symbol has a dynamic text field calling one of the variables in the text file. The action for frame 1 of the symbol is
loadVariablesNum ("testfile.txt", "this");
This works in the main timeline, but not in the movie instance. Any ideas what I might be doing wrong?
Freaking Out - Importing Multiple Arrays From Text File
i'm trying to import 51 arrays for each state and DC...
text:
AK1=Alaska~http://www.ak.nea.org~<a rel="nofoll...Alaska~114</a> Second Street~Juneau, AK 99801~Phone: (907) 586-3090
&AL1=Alabama~http://www.myaea.org~<a rel="nofollo...g/~Alabama</a> Education Association~422 Dexter Avenue~Box 4177~Montgomery, AL 36103~Phone: (334) 834-9790]
&AR1=Arkansas~http://www.aeaonline.org~<a rel="nof.../~Arkansas</a> Education Association~AEA Bldg.~1500 W. 4th St.~Little Rock, AR 72201~Phone: (501) 375-4611
etc...
script:
onLoad = function () {
AK = AK1.split("~");
AL = AL1.split("~");
AR = AR1.split("~");
...etc
I've also tried:
AK = new Array();
AK = AK1.split(~);
or
AK = new Array();
AK = eval (AK1.split(~));
But AK1 never splits!!!
ends up:
AK = undefined (or blank)
AK1 = "Alaska~http://www.ak.nea.org~<a rel="nofoll...Alaska~114</a> Second Street~Juneau, AK 99801~Phone: (907) 586-3090"
I'm about to lose it!! help!!
Importing Strings Into A Text File And Converting Them In The Movie For Use.
I have a text file, in that text file there are several strings that look like this.
&&S1=[room,250,1]&&
&&S2=[room,252,1]&&
&&totalRooms =2&&
Any they go on like that. Now what I am wanting to do is to load this text file and convert the strings into items that can be used in the movie.
The code I have tried using for this is
code:
function buildInfo() {
for (i=1; i<=totalrooms; ++i) {
foo = "T"+i;
foo2 = "S" + i;
foo = foo2.split(",");
trace("foo:"+foo[0]);
}
}
Now I was expecting this to make the S1 into T1 with the information from text file. This is not working, when I run the movie the trace("foo:"+foo[0]); returns the actual name of the S1 file and that is it. I am just not sure what I am doing wrong. Thank you for any help. I f I have not made myself clear enough, please let me know.
Importing Multiple Data Types From A Text File
I have a text file where I want to pull out multiple variables of different types.
Take for example the following
GalleryActive = true;
ImageDirectory = "Interior";
subGallery[1] = Before;
subGallery[2] = Construction;
subGallery[3] = After;
Images[1] = 15; // number of images in sub gallery "Before"
Images[2] = 10; // number of images in sub gallery "Contruction"
Images[3] = 17; // number of images in sub gallery "After"
MainHeader = "The Gradow Estate";
SubHeader = "Exploring the Interior";
I have pulled arrays out of a file before with parsing, but this was only an array and not multiple variables including arrays. Can anyone help me with this? I'm not even sure if this is a good listing convention. Basically I need to import this data from a text file and I was wondering if anyone could show me some sample code for this?
Thank you in advance.
Importing HTML; Coloring The Text Via External File
I am trying to import text using LoadVars(). That works fine. however the text i am importing needs to be coded so that each line can have the color defined. my text file is as follows, but it does not work when the html tags are added.
here is the action script:
code:
_root.available1 = new LoadVars();
_root.available1.onLoad = function() {
_root.avail1.html = true;
_root.avail1.htmlText = _root.available1.avail;
};
_root.available1.load("text/unit"+1+".txt");
here is the text file:
code:
&avail=Residence 1
<font color=#ff0000> 4512 - Available </font>
<font color=#ffffff> 4412 - Available </font>
<font color=#ffffff> 4312 - Available </font>
<font color=#ffffff> 4212 - Available </font>
<font color=#ffffff> 4112 - Available </font>&
thanks for any help!
Importing External Text File Problems.... My Head Hurts Now...
Ok I posted this on another board, gonna copy and paste it here... you guys might be able to help me.
::wo0pz::
My problem is I'm trying to load a text file inside of a flash movie in my home page... my home page is located at the root and the text file is located a few folders up... I can't help the text files location and if it were at the same level as teh swf and my home page it works just fine... but the text file has to be located in the folder where it's at cause it's updated frequently there from my msg board and my msg board doesnt give options to store the information at any other location.
your importing an external text file tutorial says "this works best when all the files are stored in the same directory" how can I get around this?
:ldnewbie::
Don't see why using the full & exact path (even if it's in another folder!) with the loadVariables action, would cause any particular problem!
Have you tried it and had problems?
Regards,
:Thought::
The "your tute" implication isn't quite correct... Unless the authour of the particular tutorial posts here, then we're not necessarily going to be familiar with anything written - as this is a message board that relies on people volunteering their knowledge and help.
Sometimes it gets frustrating, like when people don't bother to at least check some of the previous posts and ask the same damned questions again and again.
Sometimes it is really rewarding, like when a major issue or problem is resolved.
And all the time, it is done for free and in everyone's respective spare moments.
So as long as you take that to heart, you'll get more out of it. It may also be useful to post a reference to the tute which you've been using. (-:
If you learn enough to be able to put in what you've gotten out of the board, then everyone benefits (-:
::wo0pz::
I've gone through and searched the board before hand but I didn't find anything to solve this problem but heres the link to the tutorial I was mentioning
http://www.virtual-fx.net/tutorials/...adtextfile.htm
I've been doing some trial and error stuff with my problem... if I place the swf file in the same directory as the text file and make the changes for it, it'll open up the text file just fine so I know i'm not doing anything wrong i cant even be doing my paths wrong cause with the flash file and text file together there are no paths to make, it's just a straight up "text.txt"
If I open up that swf file in that folder with my home page at the root, the flash file will open on the page and all but it won't import the text file... the flash file opens just fine on my page, and all the graphics in it and all, but the bloody text file doesn't.... now I made a new web page in the same directory with the flash file and text file and when it opens the flash file it DOES open the external text file..... but that doesnt help me much cause I need flash in my home page to open it... the only think I can think of get it to do what I want is to move my home page into that directory but then I have to do a whole site makeover and do a lot of link changing... I'll find a way yet!
Hope you guys can help
Proble In Importing Text From AI Format File Of Adobe Illustrator CS
Hi,
I am developing a map application in flash. The map have so many text on it. The map is designed in illustrator CS. I am saving the map in .AI format and importing it in flash 8. After importing the map has some problem -
1. the text alignment is distorted.
and its first color of the text is changed to red color.
2. The map file has lines also. the lines are converted in dotted line automatically.
How can i get rid from this problem.
. . . . . . . . . .
Can i import tabular data from ms word in flash. The data should be come on stage in tabular format with lines and texts.
|