Loading External Text Problem
Hi, Im trying to load some external text into a dynamic text box in a movie. I have created the text file, added the code but the text wont display and i get this error message: not loadedError opening URL "file:///C|/Documents%20and%20Setting...ct/History.txt"It looks like the problem is that the file cant be found or something, but it is in the same folder as the fla file. Here is the code that i have attached to my text box in flash: loadVarsText = new loadVars();loadVarsText.load("History.txt");//assign a function which fires when the data is loaded:loadVarsText.onLoad = function(success) { if (success) { trace("done loading"); //Now that we know the data is loaded, //set the text content of the Text Field //with the instance name "scroller" equal to the //contents of the variable hist.text = this.info; } else { trace("not loaded"); }}; I'm really frustrated as to whats wrong, if anyone has any ideas i'd be very grateful, Thanks.
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 04-23-2005, 03:19 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Combining External SWF Loading With Dynamically Loading Text Tutorial
I am trying to combine the external SWF loading tutorial with the dynamic text loading (via XML and CSS) tutorial.
Everything loads fine, except the stylesheet is not applied to the text. It must have something to do with the swf being externally loaded, correct?
Any ideas how to fix this?
Here is the code for Frame 1 of the externally loaded swf.
Code:
//init TextArea component
myText.html = true;
myText.wordWrap = true;
myText.multiline = true;
myText.label.condenseWhite=true;
//load css
kungFuStyle = new TextField.StyleSheet();
kungFuStyle.load("example.css");
myText.styleSheet = kungFuStyle;
//load in XML
kungFuContent = new XML();
kungFuContent.ignoreWhite = true;
kungFuContent.load("example.xml");
kungFuContent.onLoad = function(success)
{
if(success)
{
myText.text = kungFuContent;
}
}
midframe=10
All the files are in the same dir.
Help Problems Loading External Text And Loading The Movie Into The Explorer
Hola a todos!
I have some troubles with my movies. I'll explain.
(Sorry for my poor English - I'm Spanish!)
I'm developing a website for a Real State Agency in Spain. My idea is make it enterely with Flash, but It's the first time I face Flash. I've found in the tutorials of kirupa.com the greatest help! But, still that, I need more help!
My first problem comes when loading the .swf into the explorer. I made a simple .html file that calls the .swf file to be loaded. The explorer says it's loaded, but I have to press the "Reload" button to see the movie. Can you say me why?!!!!
My second problem... well. I'll need a few minuts to explain it!
I have created a main scene. Inside the main scene I load the movies of the different sections of the site. This new movies loaded onto the main movie contain texts from external .txt files. There's no problem with the texts that are just a few words, as in the section "Acerca de". But when I need a bar to show the whole text I find that the bar doesn't work in the first time that the movie is loaded, and you have to click again in the section to access the whole text, I mean, to make the bar work. Have I explain myself?
Well. I think you should visit the site to see my problems.
Is this: http://www.wk-inmobiliaria.com/FLASH
This website is, of course, incomplete. I'm still working on it.
Could someone help me????
---- Help me Obi Wan: You're my only hope!!!!
Thanks a Lot.
Raul.
Combining External SWF Loading With Dynamically Loading Text Tutorial
I am trying to combine the external SWF loading tutorial with the dynamic text loading (via XML and CSS) tutorial.
Everything loads fine, except the stylesheet is not applied to the text. It must have something to do with the swf being externally loaded, correct?
Any ideas how to fix this?
Here is the code for Frame 1 of the externally loaded swf.
Code:
//init TextArea component
myText.html = true;
myText.wordWrap = true;
myText.multiline = true;
myText.label.condenseWhite=true;
//load css
kungFuStyle = new TextField.StyleSheet();
kungFuStyle.load("example.css");
myText.styleSheet = kungFuStyle;
//load in XML
kungFuContent = new XML();
kungFuContent.ignoreWhite = true;
kungFuContent.load("example.xml");
kungFuContent.onLoad = function(success)
{
if(success)
{
myText.text = kungFuContent;
}
}
midframe=10
All the files are in the same dir.
External Text In External Swf Not Loading In Main Swf
Hi. I'm kind of new to Flash, and am trying to make external text load into an external swf which is loaded into my main swf.
What I have is a swf file where I have buttons that load external text. I then loaded this swf into another main.swf and now the external text will not load. The code i have in the external.swf to load external text is this
but4272005.onRelease=function(){
loadVariablesNum ("4272005.txt","0");
}
but4282005.onRelease=function(){
loadVariablesNum ("4282005.txt","0");
}
but532005.onRelease=function(){
loadVariablesNum ("532005.txt","0");
}
This swf works by itself, but when i load it into the main.swf it doesn't.
I'm sure it has something to do with the "0", but I'm not sure what to put there to make it load correctly in the main swf.
The dynamic textbox i'm trying to load into is named "index_txt". The name of the loader in the main.swf is named "content". Any help would be appreciated.
External Text In External Swf Not Loading In Main Swf
Hi. I'm kind of new to Flash, and am trying to make external text load into an external swf which is loaded into my main swf.
What I have is a swf file where I have buttons that load external text. I then loaded this swf into another main.swf and now the external text will not load. The code i have in the external.swf to load external text is this
but4272005.onRelease=function(){
loadVariablesNum ("4272005.txt","0");
}
but4282005.onRelease=function(){
loadVariablesNum ("4282005.txt","0");
}
but532005.onRelease=function(){
loadVariablesNum ("532005.txt","0");
}
This swf works by itself, but when i load it into the main.swf it doesn't.
I'm sure it has something to do with the "0", but I'm not sure what to put there to make it load correctly in the main swf.
The dynamic textbox i'm trying to load into is named "index_txt". The name of the loader in the main.swf is named "content". Any help would be appreciated.
Loading External Text File Into Flash Using Links From Dynamic Text Field Link?
I am using a dynamic text field to load in .txt files with html tags. I have a couple "click here" type links that I would like to use to load a different .txt document into the same dynamic text field instead of a url link like it does default. Is this possible? I'm sure I could put a button over the text since its not long enough to need a scrollbar but I would like a more dynamic and flexible way to do this if its possible.
Thanks
Loading External Text File Into Text Area (flashMX)
Hi,
I am trying to load text from an external text file into a textarea in FlashMX. I am able to set the contents of the textarea by using a string ("test thingy"), but I was wondering if anybody could point me in the right direction on hoe to include text from an external file.
Used to set string:
scroller.text="test thingy";
Thanks a bunch,
Niklas Wahlberg
Loading HTML/Text From External Simple Text File…
To all the Flash Gurus:
Basically how do you do the above? I've gotten very small snipets of text to load from an external text file, but there was probably at maximum 50 characters. This is even after a long load time and a very fast connection (T1/off of the HD).
I'm trying to get this to work so that I don't have to update the flash files to update the text - or rather so that someone else can update them w/o me acting as a middle man except for special occasions. The best example, I think, of what I'm trying to do is www.spartamusic.com
Thanks-
Davin
Problem With Loading External Text Into Text Ticker In Flash
hello everyone ...
So i've created a text ticker that loads text from an external text file ... when i test it as a scene it works fine ( it's embedded onto a movie symbol ) -but when i go to the main stage and place a copy of that movie onto the main stage and run the test of the main stage the thing does not work - loos like it gets stuck somewhere in toe first few frames of the ticker for some reason and does not show the text ... any ideas ?
I've tried placing the text file online and reffer to it as a http link , still same problem ...
thank u
s.
Loading Dynamic Text Thru External Text Files
Okay, i've looked at the dynamic text questions but am still having a little trouble. I can make dynamic text load if the dynamic text is on the main timeline, but what if it's embeded into a movieClip?
On my main timeline, i have a layer called actions. On a particular frame, i have the following:
loadVariablesNum("about.txt", 0);
A few frames down, i have a movie clip called "placeHolder" that slides in. This movie clip contains a dynamic textbox with both an instance and variable name of "aboutText".
The text file about.txt reads as follows:
aboutText=This is a test
When i test run my movie and it gets to the part where the variable should load, my placeHolder comes across the screen, but the dynamic text box reads:
_level0.instance18.aboutText
I changed something (don't remember what), and it made the actual text from the file show up in a new browser window!!!
How do i get my text to load into the movie clip?
if you need to see the fla and text file, post a request for the files with e-mail address..
Is there a way to attach files here?
Problem Loading External Text Into Text Field.
I've never ever had problems doing this before untill now.
Currently my home.fla has set up two scenes. ( preloader and second )
in the first frame of the second there is a dynamic text field with 'news' as the var. And in the first frame of actions layer
Code:
loadVariablesNum("news.txt", 0);
news.txt is
Code:
&news=Todays new is trying to get this thing to work!
I've also tried
Code:
news=Todays new is trying to get this thing to work!
Thanks in advance if anyone knows what is going on with this!
Loading External Text Without Variable Name In Text File
i need to be able to load text from a file and put it in a dynamic text box but i cannot modify the text file to put in a variable name
ie the text file cannot contain variablename=1234
but rather must simply contain 1234
Is it possible to load some text without a variable name indicated in the file using flash mx 2004 and, if so, how would one do this?
Loading Actions And Text From External Text File
how do i do this....
i would like to add links to my flash webpage via an external text file. i have 6500 links to admin.
if possable would i be able to tell a button to goto a different url from an external text file.
Loading Text Into Text Fields From An External File…
I have a file supplied to me with a couple of text boxes in it.
My friends would like to easily update the content of these boxes by using an external text file.
I have tryed tests with the "loadVariables" property, but can't seem to get any text to load at all. I have a text file called "Content.txt" and the dynamic text box has an instance name of text1 (original I know) and a variable name of myText.
The beginning of my text document starts of with "myText = "…
The line of code I was using was
loadVariables("Content.txt", text1);
this produced no result… does anyone have any suggestions for this problem?
Cheers.
Joel
Making Some Text In Color When Loading From External Text
i was wondering, is there a way to make it so like say i loaded external text file to display text on my page that said:
2/04/04
Today i became a god, tomarrow i will eat a twinkie.
Could i make the "2/04/04" part like red and the rest of the text black so like i can make:
2/05/04
Today i became a god, tomarrow i will eat a twinkie.
2/04/04
Today i became a god, tomarrow i will eat a twinkie.
and make the dates red and the reg text black?
Help: How To Change/hide Text While External Text Is Loading
Hi. I'm not an actionscript person and I got this from someone else on the forum a while back but I can't seem to find the original post. I was wondering what I would have to change in order to get rid of this text (_level0.scrolltext.filltext) that shows up while the external text file is loading. It looks really unprofessional.
Here is the code and I'm assuming its the last line of code that's doing it but again I really have no idea:
Code:
stop();
var loadtext:LoadVars = new LoadVars();
loadtext.load("home.txt");
scrolling = function ()
{
var scrollht:Number = scrolltrack._height;
var boxht:Number = scrollbox._height;
var scrollarea:Number = scrollht-boxht;
var ms:Number = filltext.maxscroll;
var scale:Number = (ms-1)/scrollarea;
var ypos:Number = scrolltrack._y;
var textpos:Number = filltext.scroll;
var left:Number = scrolltrack._x;
var top:Number = scrolltrack._y;
var right:Number = scrolltrack._x;
var bottom:Number = (scrolltrack._y+(scrollht-boxht));
var ymove:Number = 0;
var textmove:Number = 0;
scrollbox._y = ypos;
scrollbox.onPress = function()
{
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function()
{
ymove = (ypos-this._y);
textmove = (Math.round(ymove*scale));
filltext.scroll = textpos - textmove;
};
scrollbox.onMouseUp = function()
{
stopDrag();
delete this.onMouseMove;
ypos = this._y;
textpos = filltext.scroll;
};
};
if (ms==1)
{
scrollbox._visible = false;
scrolltrack._visible = false;
}
else
{
scrollbox._visible = true;
scrolltrack._visible = true;
}
};
loadtext.onLoad = function (success)
{
if (success)
{
filltext=loadtext.filltext;
scrolling();
}
else
{
trace ("not loaded");
}
};
Making Some Text In Color When Loading From External Text
i was wondering, is there a way to make it so like say i loaded external text file to display text on my page that said:
2/04/04
Today i became a god, tomarrow i will eat a twinkie.
Could i make the "2/04/04" part like red and the rest of the text black so like i can make:
2/05/04
Today i became a god, tomarrow i will eat a twinkie.
2/04/04
Today i became a god, tomarrow i will eat a twinkie.
and make the dates red and the reg text black?
Loading Dynamic Text Without External Text File...?
Hello,
I apologize if this has been asked before as i'm sure it has but for the past few days with all my searches on sitepoint, google, and flash kit but haven't been able to accomplish it.
What i'm trying to do is have text in my flash movie change based on a variable displayed on a WEBPAGE. I tried to accomplish this using FLASHVARS but i'm not even sure if I used flashvars correctly since not only did it not work but I couldn't find a tutorial that told me what i had to do inside the .fla file to make the flashvars function work.
I was wondering if someone here can point me into the correct direction or explain to me how exactly i would go about doing this...?
Again, all i'm trying to do is make a text in the .swf file change based on a variable in the web page, such as how FlashVars works...
Thank you in advance, and again i apologize if this was answered before.
Loading External Text Files Into A Text Scroller
hello,
i'm second guessing my methods of loading info. from a text file into a text scroller , i've created. what i have is a text scroller, but depending which button i press, i would like new content loaded into that textfield(scroller) I sorta have an idea, but not sure of the procedure ..can some help ...Cheers!
Loading External Text File Into Dynamic Text Box
I have a dynamic text box on my stage that has a set width and height i want to populate it with an external text file to make it easy to update the text with out having to touch the fla. I'm just beginning to learn AS3 and don't know were to begin, in AS2 i would give the text field a variable and in my text file start with the variable name= ,variable on text isn't supported by AS3. any help would be appreciated.
Jake
Loading External Text Into External SWF
I'm looking to somehow load an external .txt file into an external swf file for a website section.
I've attached a zip that contains the main SWF file and the external SWF file that should load as a subsection of the main SWF.
The problem is, the external text loads fine in the about.swf just fine, but as soon as the about.swf is loaded into main.swf the text and it's buttons do not appear.
Any help or tips would be greatly appreciated for a flash novice.
Again, the files are attached
Thanks!
Loading External Text. Problem With Text?
I have created a scrolling text box that loads an external text file. I am having two problems with this.
1) Even though the external text file that is being loaded is several lines long (220 or so) when I test the movie Flash only seems to load the first 20 lines of it.
2) The text within the text file that I am loading contains no spaces in between in each line. When I test the movie the text becomes double spaced.
Can anyone help me to correct this?
thanks,
nico
AS 3.0 Loading External Text From A Text File
OK, so things have changed, a lot. In AS 2.0, I could create a text or HTML file with variables and have dynamic text fields to display the text from the loadVariablesNum argument. AS 3.0 uses a totally different model. How can I simply grab text from an external document and display it in a dynamic text field?
Loading External Text, Text No Display
Hiya
I need a hand with some flash script. I have a file called main.swf which loads up section1.swf.
section1.swf loads in text from an external txt file called loadText.txt.
When I test section1.swf in the flash player, it works, and the text appears.
BUT When I test main.swf in the flash player, I can see the section1.swf that is loaded in, but the text is not there
This is the script I'm using on on the first frame on the main timeline of section1.swf
///////////////////////////////////////////////////
this.createTextField("myTitle", this.getNextHighestDepth(), 30, 30, 490, 27);
this.createTextField("myContent", this.getNextHighestDepth(), 30, 70, 250, 300);
loadVariablesNum("loadText.txt",0);
//
myTitle.multiline = true;
myTitle.wordWrap = true;
//
myContent.multiline = true;
myContent.wordWrap = true;
//
this.onData = function() {
//Insert text
myTitle.text = loadTITLE;
myContent.text = loadCONTENT;
};
stop();
///////////////////////////////////////////////////////
Any ideas?
I'm using FlashPro 8. And I'm testing with Flash player 8.
Loading Text From An External Text File
i wanna know if there's a way for me to load my txt file into flash? so that when i have to change something, i wont have to open up flash and publish it.
thanks
Loading Text From External Text File
Hi, i want to make a map editor for an Arkanoid style game. And i want to draw the stage in tiles. For this i want my flash to read from the external text file. I will write the characters in the text file where each character will represent a tile in the game and will be drawn at runtime. My question is that when i write something in text file lets say i write
A A A B C A A B
in the text file. where each character represents a tile in the game. How will i get this data from the text file. like if i load it through
loadvariables() command then where this data will go. How can i manipulate this data.
can anyone plz help me.
And sorry for the bad english.
Help With Loading In External Text With &
Hello,
So I know how to load in external text from a .txt file and
it works fine. the text file starts with ""es=" and the
flash text box looks for the variable quotes and the text loads in fine. It works well....
the problem is that the text contains an "&" within it.
so they text will load in up to that "&" point....
I think it is treating the text after this as another variable and therefore not displaying it under the variable quotes.....
any ideas on how to display all of the text.....???
thank you
Loading A External Text
Hello there,
Loading a external text seams to be easy, just in my example it doesent work!
Here´s what I did:
I have a external file called "articulo.txt" who starts with the variable "Var=Blabla.....
The Dynamic Textfield in Flash is placet into a Floating Window (MovieClip)with the Textoptions: "Dynamic Text/ Multiline/ Variable:Var/ Word wrap/ Selectable"
From a Button placed in the Scene I give the order:
on (release) {
loadVariables ("articulo.txt", "_root.bwindow.wtop");
}
I tried many different options but non of them are working,
the text doesen´t load into the Dinamic Textfield???
What do I do wrong???
Thanks for helping,
Fery
LOADING EXTERNAL TEXT
hey all -
i've been tryin to crack this for days (and losing much sleep and schoolwork time too)... i'm trying to load an external text file into a flash movie i'm making. i know how to do this "normally" -- i.e. create the dynamic text field w/ variable name "text", have the external text file begin with "text=...", and execute the loadvariablesnum("url",0); in the main timeline.
this is my problem, and i believe it has to do w/ targetting & levels and whatnot. what i have is movie clips embedded into movie clips. i'm trying to have the dynamic text field in one of the movie clips, which is called 3-4 times in difference instances. the thing is, i want the text to load into the movie clip ALL the time... like in ALL instances... so basically, the text is part of the symbol, but it's dynamic and loads into the movie clip externally. the text shows up beautifully when i test the movie if i just use plain static text, but it does nothing when i try things w/ dynamic text. i've tried the load variables function in the main timeline, in the actual movie clip, with all these different settings, and nothing is working.
PLEASE HELP ME. I NEED SLEEP AND I NEED TO DO MY SCHOOLWORK.
my IM name is "gin mei", ICQ "7882765", or yahoo! "ginnymin".
Loading External Text
Talk about annoying, I'm using this peice of code:
var sFile="textfiles/Ser_Enq_Handling.txt";
loadVariablesNum(sFile, 0);
to load some text, which works fine within the test movie option, but not from the browser, why?
How do I put it right?
Loading External Text
Hi all.
I created one Dynamic text field and one button,
when i click on button, in text field need to be load external text file (which iam saved saving by notepad .txt format).
thanks for help
regards
naushad
Loading External Text
I want to load text into swf which level is 1. But I can't do it. Somehow I can load jegs in same swf file. (even though I didn't specify swf level.)I used to did exactly same thing in Flash 5.
Loading External Text In Mx?
I am building a site in MX and the site contains quite a large ammount of text on each page. I want to make the text editable from an external file so the sites content can be edited easily so a copy of flash mx is not required.
Does Flash MX have a limited number of characters it can display ?
Does the external text file take a long time to load each time as it is in constant communication with the server?
If anyone has experience with external txt files could you please share your knowledge!!
Much appreciated
Speakerz
Loading External Text
Hi, I can load text in from an external source no problem, the thing is it contains HTML tags that have classes that are controlled through a style sheet to control colours, is it possible to render this within the movie. The text box is set up to as HTML.
Loading External Text
Ok, here's the dilema... i was asked to make a new website in flash for my high school, problem being, once i leave the school... no one else knows anything about flash! So i'm looking for a way to have flash take text from an external file, something someone with basic html knowledge can update with ease.
I don't want the viewer of the website to have to click a button to update, i want it done when the site loads, so if anyone can help me out, it be a big thanks.
Loading External Text
I am using three seperate files. I am loading one .swf (info) into another (main). The info .swf loads an external .txt file. The file works when I Test Movie. The info .swf also loads into the main .swf fine, but the text is lost. I am not sure why it looses the .txt file it is suppose to load and that loads fine when testing the movie. Is it targeting? More Iinfo;
my files;
main.swf (main)
info.swf (info)
text.txt
locations;
the main folder is called "site". Inside of this folder sits the main.swf and a folder named "sports". There are two files inside of the "sports" folder, info.swf and text.txt.
By irself the info.swf works as it should (loading the text.txt file into a dynamic text field), but then I open main.swf and click on the button that executes the loadMovie ("sports/info.swf", 10); something goes wrong. Info.swf loads into main.dwf fine, but the text.txt no longer loads into the dynamic text field. Any help?
Loading External Text
I am using three seperate files. I am loading one .swf (info) into another (main). The info .swf loads an external .txt file. The file works when I Test Movie. The info .swf also loads into the main .swf fine, but the text is lost. I am not sure why it looses the .txt file it is suppose to load and that loads fine when testing the movie. Is it targeting? More Iinfo;
my files;
main.swf (main)
info.swf (info)
text.txt
locations;
the main folder is called "site". Inside of this folder sits the main.swf and a folder named "sports". There are two files inside of the "sports" folder, info.swf and text.txt.
By irself the info.swf works as it should (loading the text.txt file into a dynamic text field), but then I open main.swf and click on the button that executes the loadMovie ("sports/info.swf", 10); something goes wrong. Info.swf loads into main.dwf fine, but the text.txt no longer loads into the dynamic text field. Any help?
Loading External Text
HI PLAEASE HELP
alright, here we go:
Firstly I want to load an external text file. I have this code:
this.myVars = new loadVars();
myVars.onLoad = function() {
_root.myTextBox.htmlText = this.textBoxVar;
};
myVars.load("test.html", 3, "post");
Its not working though. It was, but I forgot what I am supposed to put at the beginning of the text file. Secondly, when it was working, the text only showed if the text box was on the main stage, and not if it was further in the flash file.
Hope someone out there knows the answers
damosky
Loading External Text
i am loading a text from external text file. it works fine while loading, traces what i want, but when i try to display it in a text field it doesn't. same script runs correctly in another movie but not in this one. i have also checked instance names and everything. can anyone help.
P.S. i am using loadVarsText method.
Loading External Jpg's And Text ...
Once again another serious thing i do not get. I hope somebody is willing to
help me out. The problem is this:
I want to load external jpg's and text in one swf. I would like to get the images and text by calling one 'file' (paris.txt). This paris.txt contains 21 images a title
and a short text. One city gets loaded automaticly when entering the swf/mc.
All other cities will be loaded after clicking a button.
By trying to call the text file (paris.txt) it doesn't get the text and images into the swf. Also the images should be clickable to skip through and check the next image.
Please help me out with this!
Loading External Text...
Is there anyway i can load text from a doc file?
What i need is when loading an external text for example my band's news, view the date of the new in different color and font size. Is this generally achievable when loading from external file? I cannot do this with .txt files
Loading External Text
Hi everyone,
I read something about a new property or method that let me ignore the characters at the end of the rows (usually CHR(13) and CHR(10)).
It's not the ignoreWhite flag of the XML object, it's something about textfiled maybe...I don't remember.
Could any of you help me, please!!!!!!!
thanks,
Mariano
About Loading External Text..
Ok, i know there are alot of posts bout this already, but i need to know how to load external text into an MC, all the other ones don't seem to work for inside an mc. can anyone help me here? maybe a sample file will help too, thanks!
-rishi
Loading External Text
first... many thanks to all the people who assist us newbies figure these things out... you are all greatly appreciated!
k.. now to the situation:
Ive got two flas.. one is named master and the other is named dataBox..
the master loads dataBox, and within dataBox there is a call to load external text... I see the master loading the dataBox.swf, but I am not seeing it load the external text data...
Master.fla Actionscript frame 1
code:
// -------------------<MCL>----------------------- \
var myMCL:MovieClipLoader=new MovieClipLoader();
var myListener:Object=new Object();
myMCL.addListener(myListener);
// -------------------</MCL>----------------------- \
myMCL.loadClip("trigger.swf", 5);
// -------------------<LoadVars>----------------------- \
var myLV:LoadVars = new LoadVars();// broadcast events
myLV.onload = function(success){//onload(success) eventHandler var are loaded – create function of action
if(success){//to be taken after var have been loaded // conditional statement – if true (success) – do action
_level5.textfieldSM.htmlText = myLV.info;// path to main content (all content loading into level 5)path.instanceName.formatType=LoadVars Object id.nameVar
}else{
_level5.textfieldSM.text="An error has occured loading content.";
}
}
// -------------------</LoadVars>----------------------- \
Master.fla Actionscript frame 10
code:
stop();
myMCL.loadClip ("dataBox.swf",5);
data.fla Actionscript frame 1
code:
level0.myLV.load("vars/homeText.txt") //reference LoadVars script in the master.fla (_level0) to load the homeText file
----------------
the text file is located in a folder (vars) in the same directory that holds the fla and swfs...
I have the master file that loades the data swf, inside the data file, it calls the myLV(in the master) to load the text file:
level0.myLV.load("vars/homeText.txt")
... here is where I think the problem is, but once again not sure how to resolve... the text should be displayed inside the dataBox.swf in a movie clip named data_window -> that has a dynamic textblock named textfieldSM. And what Im missing is the correct pathdataBox.swf->data_window movie clip inside the textblock textfieldSM which is loaded into the master fla)to show this text... I'm not sure on how to tell the file to load this text inside the data_window movie clip or where this path info would be placed.
side note: I have additional text documents that I will be loading, in the same manner to the same data_window movie (inside the dataBox.swf -> inside the data_window movie clip with two different textblock fields: textfieldSM and textfieldLG
[inside the movie clip data_window- I have 2 associated frame labels:textBoxSM and textBoxLG which contain the small and large textfields).I have like the intro text loading into the textfieldSM and for other catagory buttons, I would like to be able to display the text info in either of these text fields depending on the text content sizes.
side note: text documents begin with the following:
info=bla bla bla bla bla bla
I guess I just get confussed on how to identify the path to facilitate these actions,and Im hoping that once I figure out how to get this text to show, I will be able to to do the same for the additional data.
Sorry for the long winded explaination... just trying to make it as clear as possible ... from a very confused flasher
Thanks for taking the time to check out my questions..
Kim
Loading External Text Within Mc's
hey guys, trying to load an external text file into a dynamic text box within an mc.
Im using the following as on the frame:
code:
loadVariablesNum("http://www.mywebserver.com/home.txt", 0);
and i get the following displayed in the text box:
_level0.instance28.text
rather than the contents of the text file.
Not sure what m doing wrong as all the above works when the content is on the main timeline.
Any ideas?
cheers
david
Loading External Text
Hello, I am using Flash Mx 2004 Professional, actionscript 2. I have two dynamic text fields that load text from two seperate external text files. Everything loads correctly and looks like it should. The text fields are side by side on my document. (text_field and text_field2)
Here is my question: In some cases that there is no data available to be loaded into text_field2. So, only the first text_field will load data.
How would I make the first text field (text_field) center in the document when there is nothing to load in the second text field (text_field2).
Can anyone help me with this or at least point me in the right direction?
Thanks, TJDUB
|