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




Read From File



how do you load string variables from a seperate text file, and display the in a text box



FlashKit > Flash Help > Flash MX
Posted on: 01-10-2003, 10:04 AM


View Complete Forum Thread with Replies

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

Trying To Get A Flash File To Read An XML File And Autoscroll It Like A News Ticker.
Code:

function processXMLData(success)
{
if (success)
{
var rootNode=this.firstChild;

var contentNode=findNode(rootNode, "content");
content=getValue(contentNode);
}
else
{
content="Today's news is not found";
}
}

function getValue(node)
{
if (node && node.firstChild)
return node.firstChild.nodeValue;
return "";
}

function findNode(node, nodeName)
{
if (node.nodeName==nodeName)
return node;
for (var i=0; node.childNodes && i<node.childNodes.length; i++)
{
var foundNode=findNode(node.childNodes[i], nodeName);
if (foundNode!=null)
return foundNode;
}
return null;
}

var xmlData=new XML();
xmlData.ignoreWhite=true;
xmlData.onLoad=processXMLData;
xmlData.load("news.xml");

function scrollDown():Void{
if(xmlData.scroll<xmlData.maxscroll){
xmlData.scroll++
}else{
xmlData.scroll = 0;
//back to start
}
}




Code:

<?xml version="1.0" standalone="yes"?>
<news>
<content>Scientists discovered a cure for the widely publicized boredom-syndrome. Bla...bla...bla... They recommend a full month of nice vacation in for people with stage one and two of boredom-syndrome.</content>
<content>Scientists found out that flash really is great</content>
<content>123</content>
</news>



Good news:
It reads the XML.. WOOHOO

Bad News:
It won't autoscroll like a news ticking from bottom up and then repeat.

News Ticker Flash File

I've enclosed the source files above. I'd greatly appreciate the help whomever it is that has the time to do so. It's probably just a few code changes.

How Do I Read In A HTML File And Format With A CSS File?
I want to read in a HTML file and format with a CSS file.
I'm using MX2004.
From what I've read, this should be possible?

I'm getting stuck at the first obstacle, I can't figure out how to read in the HTML file.
THe use of the CSS styling seems to be straight forward.

Any help would be appreciated.

Thanks.


OM

How Do I Read In A HTML File And Format With A CSS File?
I want to read in a HTML file and format with a CSS file.
I'm using MX2004.
From what I've read, this should be possible?

I'm getting stuck at the first obstacle, I can't figure out how to read in the HTML file.
THe use of the CSS styling seems to be straight forward.

Any help would be appreciated.

Thanks.


OM

Need To Change Gallery To Read Php File Instead Of Txt File. Pls Help...
Heya! I was hoping someone will help me with my problem.. i have posted on this forums trying to change a gallery that reads xml file to one that reads txt files and that also has a preloader and centrally resizes automatically. since i got no replies i tried and finally after a few months managed to get it to read txt files. unfortunately, i have realised that i require the gallery to read data from a php file and not a txt file because i dont have the permissions to create a txt file and edit it on the server. so could anyone help me convert my actionscript so it reads from a php file? here are my codes:


ActionScript Code:
spacing = 10;//photo._alpha = 0;pArray = new Array();loadArray = new LoadVars();loadArray.load("imageList.txt");loadArray.onLoad = function(success) {    if (success) {        pArray = this.myImages.split(",");        changePhoto(0);//added this one    }};/*   i wrote this code, but you can use and abuse it however you like.   the methods are defined in the order which they occur to make it   easier to understand.*/// variables ------------------------------------------// put the path to your pics here, include the slashes (ie. "pics/")// leave it blank if they're in the same directorythis.pathToPics = "animation/";// fill this array with your pics//this.pArray = ["image0.jpg", "image1.jpg", "image2.jpg", "image3.jpg", "image4.jpg", "image5.jpg", "image6.jpg", "image7.jpg", "image8.jpg", "image9.jpg"];this.fadeSpeed = 20;this.pIndex = 0;// MovieClip methods ----------------------------------// d=direction; should 1 or -1 but can be any number//loads an image automatically when you run animation//photo._alpha = 0;loadMovie(this.pathToPics+this.pArray[0], _root.photo);MovieClip.prototype.changePhoto = function(d) {    // make sure pIndex falls within pArray.length    this.pIndex = (this.pIndex+d)%this.pArray.length;    if (this.pIndex<0) {        this.pIndex += this.pArray.length;    }    this.onEnterFrame = fadeOut;};MovieClip.prototype.fadeOut = function() {    if (this.photo._alpha>this.fadeSpeed) {        this.photo._alpha -= this.fadeSpeed;    } else {        this.loadPhoto();    }};MovieClip.prototype.loadPhoto = function(pic) {    // specify the movieclip to load images into    var p = _root.photo;    //------------------------------------------    p._alpha = 0;    p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);    this.onEnterFrame = loadMeter;};MovieClip.prototype.loadMeter = function() {    var i, l, t;    l = this.photo.getBytesLoaded();    t = this.photo.getBytesTotal();    bar._visible = 1;    per = Math.round((l/t)*100);    //if (t>0 && t == l) {    if (t != 0 && Math.round(l/t) == 1 && this.photo._height != 0) {            var w = this.photo._width+spacing, h = this.photo._height+spacing;        this.onEnterFrame = fadeIn;        border.resizeMe(w, h);        bar._visible = 0;    } else {        bar._width = per;        trace(l/t);    }};MovieClip.prototype.resizeMe = function(w, h, pic) {    var speed = 3;    this.onEnterFrame = function() {        this._width += (w-this._width)/speed;        this._height += (h-this._height)/speed;        nav._x = Math.round(this._x-this._width/2);        nav._y = Math.round(this._y+this._height+spacing/2);        //if you want the next and prev button on a solid place, skip next three lines        if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {            this._width = w;            this._height = h;            photo._x = this._x-this._width/2+spacing/2;            photo._y = this._y+spacing/2;            photo._alpha = 100;            delete this.onEnterFrame;        }    };};MovieClip.prototype.fadeIn = function() {    if (this.photo._alpha<100-this.fadeSpeed) {        this.photo._alpha = 0;    } else {        this.photo._alpha = 100;        this.onEnterFrame = null;    }};// Actions -----------------------------------------// these aren't necessary, just an example implementationthis.onKeyDown = function() {    if (Key.getCode() == Key.LEFT) {        this.changePhoto(-1);    } else if (Key.getCode() == Key.RIGHT) {        this.changePhoto(1);    }};Key.addListener(this);


and my text file has this:

myImages=image0.jpg,image1.jpg,image2.jpg,image3.j pg,image4.jpg,image5.jpg,image6.jpg,image7.jpg,ima ge8.jpg,image9.jpg,image10.jpg

hope you can help... i really need this badly and any advice would go a long way.

thanks in advance

PDF Can't Read From File
I have a PDF file whcih opens perfectly with a double click however if I use Get Url to open it into a browser it opens but will only show the first page if you try to go furthur it say "error reading document (14)" OR SIMILAR. This does not happen if I type the path of the file in to Internet Explorer it will display both pages fine only happens when using get url command! ANy help or suggestions would be welcomed.

thanks

Read From A File
I am trying to read information from a txt file, but I do not know how to declare the file of how to read from the file. I have not created the text file yet, so if i need to creat it with special spacing or characters i can. Anybody have any hints or suggestions.

Read From File
I want to make a "slideshow" where pictures come and go each 5th second with some describing text. I know this is possible but i also want to have a field with scrolling text on the bottom.
Is it possible to read this text from a file in realtime? In other words, the text in the file may change anytime. Is this at all possible or is there another way of doing it? If so I would like to know all alternatives, read from a database, html or whatever.

Any tips?

Thanks

/Per-Henrik

Can't Read From A File
Hello. I made this movie, what i`m trying to do is read a file, split it's contents and get the first element of the array. I just can't figure it out how to make this. Worked about an hour or so
File attached

Thanx in advance

Read File
Hey do you guys know of a way to read how many files are in a specific directory?

Read A Var In A Php File
how can i make a dynamic box display the content of a variable of a php file?

How To Read Pdf In Swf File
hii please help me.
i wanna make some e-book with flash that include pdf file..

but how to read pdf in swf?

i tried it but it just comes to movie clip...

How To Read A PDF File?
Hi,

I want to do something pretty basic: open a PDF file and
programmatically process its contents. Fundamentally, I would like to
just have something that can get the text and do readLine and return a
string for each line of text.

I searched everywhere for something that can do this. Just reading a
PDF in raw will not work b/c it contains a good deal of binary.

AlivePDF http://alivepdf.bytearray.org/ appears to only be able to
create new PDF files.

The Core AS3 libraries appear to only be able to display PDF content
in a browser:

http://livedocs.adobe.com/flex/3/html/help.html?content=PDF_1.html

Is there anything out there that can do this, or am I just going to
have to write my own?

Thanks in advance,
Davis

Read From File
how do you read in string variables from a txt file, and display this in a text box, so that the variables may be of use later.

Read From Txt File? Or Better?
hey i have a question

i have a file called soundList.txt with some text in it, for example
------------------
1.mp3
2.mp3
3.mp3
4.mp3
...
------------------

the text file changes in lenght from time to time (as new .mp3s are added or deleteed)
but it will be 1 thing per line ..
now i want to read this into an array called "soundList" in flash.. help

or if any of you have any better ideas im open for suggestions, but keep in mind i want it as simple as possible ( im getting to xml stuff but dont have time for it yet and i need this to work now)

Thanks

How To Read Xml File?
dsfsdsdfdfsdfdsfthe node's format as below:

<root>
<groups>
<group name= "abc">
<category name = "iphone">

<items
<item>
<title>New iPod</title>
<description>I got a new iPod</description>
<image>kresge.jpg</image>
</item>
</items>
</category>

<category name = "accessory">
<items>
<item>
<title>Mouse</title>
<description>Just like the one</description>
<image>medialab.jpg</image>
</item>
</items>
</category>

</group>
</groups>
</root>

im targeting to display the <title>,<description>and<image> only,can anyone please give me some guidance or provide me the link to similar tutorial?
thank you

Read From Txt File? Or Better?
hey i have a question

i have a file called soundList.txt with some text in it, for example
------------------
1.mp3
2.mp3
3.mp3
4.mp3
...
------------------

the text file changes in lenght from time to time (as new .mp3s are added or deleteed)
but it will be 1 thing per line ..
now i want to read this into an array called "soundList" in flash.. help

or if any of you have any better ideas im open for suggestions, but keep in mind i want it as simple as possible ( im getting to xml stuff but dont have time for it yet and i need this to work now)

Thanks

Text File Not Read?
I've made a scrolling text box. But for some reason, it won't read the .txt file I have specified it to read. Here is what my actionscript looks like:

onClipEvent (load){
this.loadVariables("news.txt");
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
needInit = false;
}
onClipEvent (enterFrame){ if( needInit ){
if(TextBox.maxscroll > 1){
//Text is loaded!
needInit = false;
}
}

if( frameCounter % speedFactor == 0){
if( scrolling == "up" && TextBox.scroll > 1){
TextBox.scroll--;
}
else if( scrolling == "down" && TextBox.scroll < TextBox.maxscroll){
TextBox.scroll++;
}
frameCounter = 0;
}
frameCounter++;

onClipEvent (data){
needInit = true;
}

}
on( press ){
scrolling = "up";
frameCounter = speedFactor;
}
on( release, releaseOutside ){
scrolling = 0;
}
on( press ){
scrolling = "down";
frameCounter = speedFactor;
}
on( release, releaseOutside ){
scrolling = 0;
}

I've followed the tutorials "Actionscript for Flash 5 dummies: Scrolling a text box" and "Actionscript for Flash 5 dummies: Scrolling a text box II". The only thing I didn't add from the second tutorial is the new scroll bar. I didn't want that. Anyway, could someone help me pleasssee? I need some help bad. I'm real confused on what to do. Thanks!

Read From A Text File (CSV)
I have a great free PERL script running on my server that reads from a flattext file which is very easy to use in HTML.

My question is how do I get my movie to read from the text file and pull into the frame..??? I have figured out how to write to the text file via a loadVariablesNum ("", 0); action, but I can't figure out how to read to the movie...

Please help..!!!


Thanks, and God Bless America for we are FREE...

How To Read Param Tag In Fla File?`
How to read param tage which we pass to swf file through HTML to load a certain movie??

Lets say the param name filename has value = movie_123.swf, now here I want to load a movie named "movie_123.swf" in another frame.

How can I do it???????????

Thanks for your help in advance.

Can't Read Variable In File With %
Does anyone know why I can't read a file called %Support% where a text file's variable is being read. It reads the text file if I call the folder Support but not %Support%. Using that character always puts the folder in front of all others, making it easy access for every workstation I use.

Is % a reserved character that can't be used in LoadVariable?

thanks

Al

Read And Write File
Hi,

I have a flash application runing localy to a PC, using the browser.
I want to read and write a text file on this PC in the same directory as the flash file one.
I don't want to use cookie as the text file.

I know how to read the file with "loadVariables()" but I don't know how to write.

How can I do it ?

Thank's
Michel

Read From Txt File With Html?
Hi

I wonder if there is a way to read from a txt, but to display the text in a certain layout.

if the txt file says:

&text=hello <Ita>Monster</Ita>

flash should display Monster as italic

is there a way to edit the text like the codes in html documents???

Thanx

Flash /PHP - Will Read .xml File But Not The .php
menuXML = newXML();
menuXML.load ("menu.xml");
menuXML.onLoad = buildMenu;
stop();
---------
menu.xml is the informatin I cut and pasted out of a getMenus.php file that generates XML
my flash menu loads perfect BUT when I use my php file that produces the xml output:

--------
menuXML = newXML();
menuXML.load ("getMenus.php");
menuXML.onLoad = buildMenu;
stop();
---------
the menu will not load...
getMenus.php querys a table and puts the results in XML format.. when I view source of getMenus.php all of my information is there. When i copy that informatin into a file and call it menu.xml it works just fine.. so can anyone tell me why flash will not recognize (or load) teh xml produced by the getMenus.php page?

Is There Any Way To Read From A Text File But
not loading it into a text field, but rather load it to a variable??????
i want to load what's in the text file on the server to a variable and not to a textField!
is it possible?
how?
thanks
PEleg

Read An External File
Hi,
I have a movie clip and I want to read a text file from that, it doesn't work. It works when I put in in main scene.
This is the command:
loadVariablesNum("vars.txt", 0);


Thank you so much, helping me always.

Read From Unspecified .xml File
Hi,
My problem: I know there will be only one .xml file in the same folder as my swf file. But I will not know the name before '.xml'
it could be anything.xml, or ajowej.xml etc.

So is there anyone who knows if there is a way to read from *.xml file where * represents a wildcard.

Any other solutions are welcome

Thanks!
/October

How To Read Data From A .txt File?
The data is arranged in the following way:

Alex
M
16
1989

How can I read the data?
I want to assign "Alex" to a variable called name[1]
and "M'" to sex[1]
and "16" to age[1]
and "1989" to year[1]

Please help me
thx

I am using flash 5

Pls Help (how To Read Data From The Txt File)
The data is arranged in the following way:

Alex
M
16
1989

How can I read the data?
I want to assign "Alex" to a variable called name[1]
and "M'" to sex[1]
and "16" to age[1]
and "1989" to year[1]

Please help me
thx

I am using flash 5

Pls Help (how To Read Data From The Txt File)
The data is arranged in the following way:

Alex
M
16
1989

How can I read the data?
I want to assign "Alex" to a variable called name[1]
and "M'" to sex[1]
and "16" to age[1]
and "1989" to year[1]

Please help me
thx

I am using flash 5

How To Read A WSDL File
Hi Im new to working with webservices. Im using the actionscript method to create a WebServiceConnector object e.g


Code:
import mx.data.components.WebServiceConnector;
var tipWSC:WebServiceConnector = new WebServiceConnector();

tipWSC.WSDLURL = "http://www.flash-mx.com/mm/tips/tips.cfc?wsdl";
tipWSC.operation = "getTipByProduct";
tipWSC.multipleSimultaneousAllowed = false;
tipWSC.suppressInvalidCalls = true;
tipWSC.params = ["Flash"];
tipWSC.trigger();



My question is as follows:

When i use the webservice connector component its very simple to see the available operations and the datatype of the parameters to be sent to the web service.

When not using a component what is the quickest way to tell what the operations are and which parameters are expected to be sent and their datatype?

for example when i view http://flash-db.com/services/ws/flashCDDB.wsdl in a browser i can see from the folowing block


Code:
<portType name="FlashCDDBPort">

<operation name="searchArtistList">
<input message="typens:searchArtistList"/>
<output message="typens:searchArtistListResponse"/>
</operation>

<operation name="getTrackListing">
<input message="typens:getTrackListing"/>
<output message="typens:getTrackListingResponse"/>
</operation>

<operation name="getAlbumInfo">
<input message="typens:getAlbumInfo"/>
<output message="typens:getAlbumInfoResponse"/>
</operation>
</portType>




what the available operations are. However how do i see exactly what parameters are required to be sent to the web service for each of the operations and the datatypeof the parameters?

Thanks in advance for your help

How Does SDK Read Your Flash File?
I have been testing my flash files with the Macromedia SDK tool to see how search engines will read my text and links. It worked fine with static text, but once I brought in a textarea and applied and XML file to populate the textarea with text, the SDK output was blank. It clearly states in the read me file for the SDK:

Text
By default, swf2html extracts the following text:

text on stage in the current movie (dynamic text, static text, or input text that has an initial value assigned)
text on stage in a movie that is called with movieClip.attachMovie()

Does anyone know if their is somthing specific I need to do either in the SDK protocall in DOS or in the FLA file itself to allow SDK to read my XML data. I know the XML works, as it appears fine in the actaul .SWF file.

Any help would be Greatly Appriciated!

Variable File Read
I hope someone can help me with this:

Depending on the date, I want to read text file contents into a variable.
text47=Text Here - this line will be read on Apr 7
text58=Text Here - this line will be read on May 8

So far I have come up empty.

Thanks

[MX04] As1 Read From Txt File
Hi Everybody,

I want to know how I can read text file to flash MX2004 and make the flash refresh when the text file has changed its variables

Thanks

Read A File From A Server
I'm stuck in reading a text/ASC file from a remote server.

1. I'm able to read the file if write the address as
http://www.somesite.com/file_abc.txt
2. The problem is I know the ftp address as '125.254.745.659'and have used also as
ftp://www.111.256.369.145.com/file_abc.txt
or
http://258.123.789.369/file_abc.txt

but doesn't work.

[F8] Read In An External File
How do I read in an external file into Flash 8?

Any Way To Read A File Directory?
I've written a script that loads slideshow images based on a provided "base" filename. For example, if I give it the name "photos/slideshowImage" it will look for photos/slideshowImage1.jpg, photos/slideshowImage2.jpg, etc. When it reaches a filename that does not exist, the script detects the failure to load and exits.

The one part I'm missing, though, is the ability to determine (BEFORE I start loading the files) how many qualifying files there are in the directory. I'd like to know this because it allows me to scale my preloader bar appropriately: if there are 5 images, then each image loading covers 1/5 of the total preloader bar width. If 3 images, then each image makes the bar move 1/3 of its width. And so on.

At present I'm manually feeding the class the number of images, but I would love to be able to test my way through a loop and find out dynamically how many images there are.

At present the only way I know to "test" is to try loading the image, which kind of defeats the purpose.

Is there any way to read a list of files in a directory, or otherwise determine which qualifying files exist, before actually trying to load them?


- Bob

How To Read Flashvars From As File
I have an as file with the following code in the constructor.

var obj:Object=LoaderInfo(root.loaderInfo).parameters;
var sLibraryId:String = String(obj["LibraryId"]);

I am getting a "term is undefined" error. Since this is not in my .fla but in an as file, am I doing something wrong in trying to read the flashvars this way? If not, what else might I be doing wrong here? Thanks.

Can Actionscript Read The .swf File Name?
Hi guys!

I have created this image gallery for a friend of mine. It reads the number of jpegs and the folders where thumbnails and enlarged images are stored from a txt file. The txt is actually named "number.txt":


Code:
loadInfo = new LoadVars();
loadInfo.load("number.txt");
loadInfo.onData = function(dat){
ArrayCoordinate = dat.split("
");

// WILL RETURN:
//ArrayCoordinate[0]=line 1 text; ----> number of jpegs
//ArrayCoordinate[1]=line 2 text; ----> folder for thumbnails
//ArrayCoordinate[2]=line 3 text; ----> folder for enlarged images
//ArrayCoordinate[3]=line 4 text; ----> row only for comment
//ArrayCoordinate[4]=line 5 text; ----> row only for comment
Everything works fine but my friend asked me if it's possible to make actionscript read the name of the .swf file and search for the parameters in a file with the same name (and extension .txt).

So lets say the file is named "nameofthefile.swf", the script should read the swf file name and "understand" that the parameters are stored in "nameofthefile.txt".


See attachment if you feel confused by my bad english!


Anyone has an idea if this is possible and eventually how?

Thank you in advance!!

Cannot Read Contents Of An XML File
I have a programming background, but I am fairly new at programming in actionscript.

Here is the contents of my xml file:

<?xml version="1.0" ?>
<pixel>
<pixel1 name="pixel1" file="pixel_01.swf"></pixel1>
<pixel2 name="pixel2" file="pixel_02.swf"></pixel2>
<pixel3 name="pixel3" file="pixel_03.swf"></pixel3>
<pixel4 name="pixel4" file="pixel_04.swf"></pixel4>
<pixel5 name="pixel5" file="pixel_05.swf"></pixel5>
<pixel6 name="pixel6" file="pixel_06.swf"></pixel6>
<pixel7 name="pixel7" file="pixel_07.swf"></pixel7>
<pixel8 name="pixel8" file="pixel_08.swf"></pixel8>
</pixel>

Here is my code:

var movieName
var fileName = "pixel.xml"
var xmlDoc

xmlDoc = new XML();
xmlDoc.ignoreWhite = true;

xmlDoc.onLoad = xmlLoad

function xmlLoad(success) {
if (success) {
trace('It successfully loaded.');
//trace('Contents are: '+this.toString());
trace('The first file name is ' + xmlDoc.firstChild.attributes("filename").value);
} else {
trace('It did not successfully load');
}
}
xmlDoc.load(fileName);

I am trying display the information, so later on, when I parse through, I can just parse through what I have already traced.

Any help would be greatly appreciated.

How To Read An Image From XML File
Hi everybody,

i've been trying to make this work for the last week, but still have no solution. I have an XML file and 1 of the nodes holds the binary data of an image. What i want to do is to display this image in my flash movie with the help of ActionScript. This image cannot be loaded with the classic methods (LoadMovie, ...) because it is dynamically generated by a running application.

Does anyone have any clue about this?

Thank you very much in advance!

How To Read A File From Server
I'm stuck in reading a text/ASC file from a remote server.

1. I'm able to read the file if write the address as
http://www.somesite.com/file_abc.txt
2. The problem is I know the ftp address as '125.254.745.659' and have used also as
ftp://www.111.256.369.145.com/file_abc.txt
or
http://258.123.789.369/file_abc.txt

but doesn't work.

Read File Directory?
Does Flash 9 have any capability of opening and reading from a directory?

Upload And Read File
Hello all!
I am writing a Flex application and users have to upload XML files on a server via a form.
Is it possible to read a file while downloading?
To be more specific, the application has to put some data in a MySQL table. I am curios if I can do this task without actually downloading the XML file on the server and then do a fread(). Instead..the file should be like a stream were bytes are read before full download.

Is it possible to implement this in ActionScript 3.0?

To Read XML File From Flash
i want to know how can i read a XML file from flash using actionscript. i have my data in the XML file and want to use that data and create a pie graph in flash.

thanks.

Read A File From Server
Stuck in read'n text/ASC file from remote serv.Need 2 read file from serv.(prov. ftp add say '101.11.910.44' & pwd as 'abc' )& disp. it'n the swf
works-http://www.site.com/file.txt
doesn't work-ftp://www.111.26.39.15.com/file.txt or http://258.123.789.369/file.txt?please help

Read File System
I would like to present a photo album. For this I want to load the thumbnails and previews. Instead of naming the photos something like prev001.jpg, prev002.jpg etc I want to use the original Photo names. Is there a way of reading all the file names in a directory and fill an array with these names? I don't know the way to read a directory content. The solution I need is for AS3. (the way via php is clear to me, i search a solution directly out of Flash)

Thanks for your help

Didi





























Edited: 12/24/2007 at 10:52:32 AM by didi.thinkpad

Read File Check
how do you check to see if a file has loaded, and to display an error message in a selected box, if an error has occured.
//////////////////////////////////////////
function fileRead() {
myFile = new LoadVars();
myFile.onData = function(rawDataFromMyFile){
//outFile = unescape(rawDataFromMyFile);
myText=unescape(rawDataFromMyFile);
};

temp=myFile.load(fileDisp);
if(!temp){
outFile="Error";
//display the error message.
}
else{
outFile=unescape(rawDataFromMyFile);
//display what is in a file.
}
}
/////////////////////////////////////////
because this doent work.

Read Node From XML File ?
Hi buddy,

I want to read attributues values from an XML file in an Array Object. How do I do that ?
For Example..i am loading XML file in which there is a node
<data a="123" b="456" c="789" />

Please note: Occurences of attributes is unpredictable...above its is just 3(a, b, c) but it can be more than that or less than that also...so...PLS HELP ME out with this....

Required Output would be:
dataValues=[123, 456, 789]

Thanx

Url From External Txt File Not Being Read
(anyone else have panic attacks trying to think of the most informative and concise title for a thread?)

Anyway...

I've inherited a menu bar (www.ensim.com). You can see that when you hover over the buttons (most of them, anyway) you get a drop down with subnav links.

The way they did it was to populate the movie clip with text from an external .txt file, so you could easily add sub links and change urls and stuff. Nifty idea.

The problem is a new url I'm trying to add apparently contains an escape character that it doesn't like. The new url is "/index.asp?page=solutions&sec=voip". When that goes in there, it won't write the link lable (<a href="borked url">This doesn't show up</a>)

Sort of weird, I kind of assumed that, being a plain old txt file, it would just spit it out and move along. Anyone know a way around this?

Thanks in advance.

Rick

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