Loading A Text File Into A Flash Movie
We've all seen Applet tickers that load text files and then scroll the text zontally or tically, how do I get a swf movie to load a .txt file?
Easy in HTML. I know how to tween, etc., but I don't know advanced stuff. I know how to paste in action script, obviously.
Any help would be great.
FlashKit > Flash Help > Flash Newbies
Posted on: 09-25-2001, 09:01 PM
View Complete Forum Thread with Replies
Sponsored Links:
Loading Txt File When Text Box Is In A Movie Or Movie Clip
Can you help me to do it when the textbox is in another movie or movie clip...?
I got some code to work for a basic load a file to a textbox... its just when there's a movie/movie clip I all the suddent have trouble...I use movies/movie clips because I like to break everything up and put together the parts and so if I change on part the rest of the site won't be affected.... In any case I could really use a Flash guru right about now...
I appreciate your help,
Chris
View Replies !
View Related
Loading Text File Into Loaded Movie?
Hi, I was wondering if it is possible to load a seperate .txt file into a .swf file thats being loaded into another .swf file. I have the load movie command, and in the movie that is bein loaded, there is a dynamic text box that loads a .txt file. The text shows up in the Control>TestMovie under FLASH 5, but when I upload the file, or even try to look at it in my harddrive starting fromt the beginning .swf file, everything will load except the text in the .txt file.
Any help is appreciated, thanks, LukeA
View Replies !
View Related
Loading A Text File From A Movie Symbol
I have a movie, which loads a movie symbol.. The movie symbol operates a address book (ie clicking on a letter to view the stored email addresses from a text file).. I have been unable to call the text file into the dynamic text box, although it will load if I put the text box and letter button straight into the scene.
Is it impossible, or is it possible and I just have no idea what I am doing? (probabley the latter of the two).
View Replies !
View Related
Loading Ext. Swf W/ Ext. Text File Into Main Movie?
I'm stuck. I hope someone can help.
I am trying to load into the stage of my main movie a swf file that has an external text link. The images appear, but the text does not.
everything is in one folder.
If I open that swf by it self, the text appears, but when loaded into my main movie, it wont appear.
Does anyone know how to get the text to show? help.
View Replies !
View Related
Loading Arrays From A Text File Into A Movie
I have created an mp3 player, in MX 2004, that uses arrays to dynamically populate the movie clip. What I would like to do now is place the 2 arrays, artist and title info into a text file, so I can use just one movie to play various cds. Unfortunately, I have not found a good tutorial on how to accomplish this.
It is a basic script that I will incorporate into the mp3 player once I get the script to work right. There are links in the main movie that will send the appropriate text file to the player.
Anybody have any suggestions?
THe following code is what I want placed in a text file:
-----------------------------------------------------
var titles = new Array("Track01","Track02","Track03","Track04","Tra ck05","Track06");
var songNames = new Array("Track01.mp3","Track02.mp3","Track03.mp3","T rack04.mp3","Track05.mp3","Track06.mp3");
var artist = "Jeffrey Smith";
var cd = "Let Me Worship You";
-----------------------------------------------------
The following code will be located in the movieclip:
----------------------------------------------------
artist_txt.text = artist;
cd_txt.text = cd;
var sectionCount = titles.length;
var menu = this.createEmptyMovieClip("menu_mc", 1);
menu._x = 25;
menu._y = 70;
for(var i=0; i < sectionCount; i++){
var depthCount = menu.getNextHighestDepth();
var item = menu.attachMovie("itemClip", "item_" + i, depthCount);
item.labelName = titles[i];
item.song = songNames[i];
item.targetClip = this;
item._y = i*45;
}
----------------------------------------------------
Attached is the test fla.
Any help would be greatly appreciated,
Rick
View Replies !
View Related
Loading The Variables From The Text File Into The Movie
Good day!
I'm trying to create quiz. My questions are in text file.
q1.txt
q2.txt
so on...
I used this code to load the variables
Code:
filename = "q1.txt"
loadVariablesNum (filename, 0);
My variables for q1.txt
question
a1
a2
a3
My problem is when i run my movie, variable question is only loaded.
Can anyone help me.
Thank you in advance.
View Replies !
View Related
Movie Not Loading Vars From Text File
Hello
I have a movie called "DATA.swf" that loads variables from a text file and displays them in dynamic fields, when i test the movie it works fine.
But when i load the "data.swf" movie into a blank movie clip using loadMovie(); it does not load the vars from the text file, i see the movie but the dynamic fields are blank.
Any Idea on how i could remedy this??
View Replies !
View Related
Loading A Text File Into A Child Movie
Hi, I've built a website which loads text from an external file with multiple variables defined using &var= .
in the flash file I have multiple dynamic text fields with matching variable names defined. Then I have a line of actionscript which populates the dynamic fields
loadVariables("video.txt",this);
This works perfectly if the text files are in the root level. As soon as I transferred the dynamic fields into a child movie the code failedtowork and no amount of targetting seems to help.
Any help would be fantastic :O)
View Replies !
View Related
Loading A Movie Within A Movie Using Text File.
I am currently using a text file to pull in variables for a Flash movie.
What I'd like to do is add a variable that equals the name of a separate SWF file. (example, VarX = secondmovie.swf)
I'm not sure how best to do this. When I try to call the variable in a function, it doesn't seem to want to recognize it, yet all my other variables load fine. Something about pulling a MC within the main timeline just isn't working.
Any ideas?
View Replies !
View Related
Dynamic Text File Not Loading Into Main Movie
Hi, I have a swf that automatically loads a dynamic text file. The problem is, I need to load this swf into my main movie and when I do that the text file doesn't load. I know there is something that I need to modify but I can't figure out what. This is the action I have on the first frame in the swf that loads the text file: loadVariablesNum("resume.txt",0);
I am loading that swf into a MC in my main movie called holder. I tried changing the code above to _root.holder.loadVariablesNum("resume.txt",0); but that didn't work either. Can anyone help? Please?
View Replies !
View Related
HELP - Loading A Text File Inside Of A Movie Within A Moive
Okay, I am not really any sort of action scripter, but I do have a
question that I believe applies to action script.
I have created a movie with buttons in it that is the main console
to my site. This is an ALL Flash site. When you click a button to go
to one of the backpages it will:
_root.profile.loadMovie("images/contact.swf");
stop();
After loading this movie.. the movie profile.swf needs to be able
to call up a dynamic text file.
loadVariablesNum("http://design.sevenpoint.net/bobby/images/contact.txt", 0);
It doesn't work. I am using Flash MX. If you play
just the contact.swf it will work.
Main Site: http://design.sevenpoint.net/bobby
Working Dynamic Text: http://design.sevenpoint.net/bobby/images/contact.swf
So, it works, but not inside of the current movie console.swf that it
is loading into. How can I make it work after it is loaded into my
main console.swf? ANY HELP would be much much much much greatly
appreciated!!!!!
View Replies !
View Related
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
View Replies !
View Related
Loading Text In Flash From A TXT File
I am trying to load text in flash from a txt file. Below is my code. I want the text to flash with the breaking points after each comma. Its not doing that. Can anybody help me? Id really appreciate it!
Angela
FLASH SOURCE CODE:
//create new instance of LoadVars object
myData = new LoadVars();
//define what to do with content once it has loaded
myData.onLoad = function() {
//the value of the "content" property is assigned to the text field
obeygoddess_txt.text = this.content;
};
//now load the external file into the myData object
myData.load("obeygoddess.txt");
stop();
HERE IS MY TEXT FILE:
content=Welcome to my world,Surrender your mind,And taste Intoxication, text,text,text LoadVars() object!
View Replies !
View Related
[F8] Flash Not Loading Text File
Hi Everyone,
I have a flash program which reads some data in from a text file and stores them in a list box. The problem im having is that on one of my computers it works fine, however on the second computer, there is no log entry in the windowssystem32logfilesw3svc1 file which indicates that the text file has been opened.
So from this i assume that there is something wrong with flash and IIS. Is there someway to turn off the IIS in flash so it wont load a "http://localhost/test.txt" file?
I think I may have accidentally switched off an option but i have no idea where this would have been. Any help would be great.
Thanks
View Replies !
View Related
Loading And Using The Text File Into Flash
Hi,
I created a countdown movie.. now I want to change the values dynamically inside the movie...
My requirements is to load 2 variables from text files and assign to the 2 variables inside the flash movie. The variables are loading to the text boxes placed inside the movie.. But I can't able to use the same vatrible inside the countdown script...
Please check this fla file and help if you can.
View Replies !
View Related
Loading And Using The Text File Into Flash
Hi,
I created a countdown movie.. now I want to change the values dynamically inside the movie...
My requirements is to load 2 variables from text files and assign to the 2 variables inside the flash movie. The variables are loading to the text boxes placed inside the movie.. But I can't able to use the same vatrible inside the countdown script...
Please check this fla file and help if you can.
View Replies !
View Related
Loading A .txt File Into A Flash Movie
Hi People!
I have heard that it is possible to load a text (.txt) file into a Flash movie.
Does anybody know how one would go about doing it.
The reason it would be handy is because, when I type text in Flash, and then view the .swf, the text seems to be anti-aliased, so the whole thing looks like an image, even if I turn 'anti-alias text' off in the 'view' menu.
I'm wondering if loading the text in from an external txt file would give me HTML (no anti-alias) text, for maximum legibility.
Can anybody help please!
Cheers!
View Replies !
View Related
Loading Movie In Flash File
I tried to create a swf which loads a movie. The result is that the loaded movie is off-centered. It moved "down to the left" for several pxs.
Another problem is the backgroundcolor. I want to have is white which is it in the fla-file but when running is in swf it is black!
What do i do wrong?
The result can be viewed here:
http://www.inboxwatch.nl/bone/loading2.html
View Replies !
View Related
Loading Text From .asp File Into Flash Object
Hello --
Thanks for taking the time to read this.
I want have a small flash object that is embedded on my .asp page. That flash object is going to contain text fields that call external .txt files to get their content (only a couple of sentences per text field -- very small).
Here's the catch -- I would rather have those sentences hidden somewhere on the same .asp file where my flash object is, rather than in separate .txt files. That way when a search engine searches the .asp file, it will read the content that is going to be loaded into my flash object. Otherwise, I don't think it will associate the content with my .asp page -- it will associate it with the .txt files. Does that make sense?
Anyway, thanks for your time and help. It is greatly appreciated.
-Brig.
View Replies !
View Related
Flash And Loading External Text File
hey,
I have a problem with external text-files. I use a lot of text files in my movie, but those files wich have a length greater than the textfield size (I have a working scrollbar) in the movieclip do not show properly... I noticed that my text file jumps up a few lines when loaded in mc. So, I can't see the text title, and the first text lines of my document. What could be wrong.
an example: www.studieburomouton.be/studieburomouton.html, click on "portfolio" and chose the second thumb from the left (the dark blue one), then click "close" in the right upper corner.. normally you will see now some text, notice you can see the title in a microsecond....
can anyone help me?
thanks in advance
dries mouton
View Replies !
View Related
Loading Text From File Flash MX 2004
Hi there.
In the first frame I use this code to load an external text file into Flash.
myVar = new LoadVars();
myVar.onLoad = function(success) {
if (success) {
myField.htmlText = this.myText;
trace("loaded");
} else {
trace("couldn't load variables");
}
};
myVar.load("textfile.txt");
Also on the the first frame I have a dynamic text field.
Instance name: myField
var: myVar
render text as HTML is checked
and a textfile called: textfile.txt
with content: myText=This is just some text.
the exported swf movie shows the following text: onLoad=%5Btype%20Function%5D
I have checked everything (i Hope) also tried different scripts but nothing works.
Is it MX 2004?? This was normally very simple in the older versions.
What am I doing wrong?
I hope someone can help me out.
thnx in advance!
View Replies !
View Related
Loading A Text File Into A Flash Screensaver....
Hi All:
Can anyone recommend a software app for converting Flash movies to screensavers that also supports the use of dynamic text fields pulled from Text files? I've used 123 Flash Screensaver and it works but doesn't pull the text files. Can anyone suggest a screensaver app that preserves text file links?
Thanks =0D
View Replies !
View Related
Loading Text Into Flash From A Dynamic PHP File
Hi everybody,
I'm a newbie in ActionScripting but not in PHP. I'm using PHP and Flash to create an SWF that dynamically loads text into a scrolling ticker...
How do I get a GET variable from the CURRENT URL into my Flash app?
Example... user visits the following URL: http://www.domain.com/mydirectory/tv.php?location_id=15
How can I pass the location_id into the Flash app?
PHP Code:
myData = new LoadVars();myData.load("http://www.domain.com/mydirectory/load.php?option=text&loc_id=2");myData.onLoad = function() { myText_txt.wordWrap = false; myText_txt.autoSize = true; myText_txt.text = this.myVariable; };stop();
View Replies !
View Related
Load Variables From Text Then Loading Image File With The Filename Given In Text File
The problem is, that i need flash to load variable from text file, eg: info.txt, with image=gt.jpg in it.
Then I want flash movie to load a gt.jpg into a blank movie.
The point is that after i change filename in txt file, i want movie to load that img.
I wrote AS:
loadVariablesNum("info.txt", 0);
loadMovieNum(image, 0);
but it's not working
After i traced variable image, debugger showed that this variable undefined, but if i put textbox with image as variable, it shows "gt.jpg".
Please help
View Replies !
View Related
Help With Loading Flash File On To A Movie Clip
Hey I'm having a little bit of trouble on getting the flash file to load into a movie clip.
I have been at this for about 2 days and I'm not having very much luck first I made a menu second I converted it to a movie clip third I created a blank movie clip to insert the action script forth I tested out and it give me a error which is this (**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 2: ')' or ',' expected
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
loadMovie("instructionalmovie.swf","theMenu"
and then finally I had to take the code out of the movie clip and then insert it into a layer 1, there was no error after that but when I preview the movie it gives me a error saying it can't find the .swf movie because it is looking on the hard drive itself and is not looking for it in the flash file is there anyway I can fix this problem ? here is the code that is functioning properly [loadMovie("instructionalmovie.swf","theMenu"]
thanks
MadMikeXP
also Cycle has been helping me along
with this project but I think she maybe
mad at me
View Replies !
View Related
Loading A Movie In A Separate Flash File
So we are making a menu system for a website and we want to update the links with flash. We have been given a template we have to conform to so we can make the buttons part of the main screen. So it will be to seperate flash files. Can I still have a button play a movie on the main screen file?
View Replies !
View Related
Dynamically Loading A Movie Outside Of The Flash File
Hey, been researching a solution to this problem for the past couple of days now.
What it is, we are trying to discover a way to dynamically load individual movies into a flash window display. I realise this is going to require the use of the "loadClip" function. But I guess I should explain the scenario.
Our company is looking to generate quite a few instructional videos that are approximately 1 minute in length if not longer. We've established that Flash would be the prefered method of presenting these videos as a majority of users out there have flash player plugin's and that they are easier to download as well... However.
I've run into the issue of getting some questions answered:
1) I know flash can have actionscript place in the file to bring in a .FLA Movieclip outside of the current flash file being loaded. I also know we can bring in outside non-progressive .jpg files. Now I've been tring to discover is if it is possible to bring in outside: WMV, MPEG, or MOV files without converting them to a Flash Movieclip?
a. continuation) If we can, does flash play these outside files by itself or do the users still require the media player being used to be loaded on their system in order to view it, or can it play the (wmv, mov, or mpeg) by flash itself?
2) tring to figure how we could do the code to dynamically pull these individual movies into Flash. Possibly by checking a parameter such as the current URL loaded. or a property that is update based on an outside link being clicked. (should note that our main site is majority coded in ASP.NET).
3) Would it be better if we just made individual Flash Splashes that showed the list of Videos needed for the particular product, rather then dynamically tring to itemize it thru a Flash ASP.NET cross over?
4) once setup, is this going to be easy to update? Adding new videos or updated instructional videos. Or removing outdated videos for that matter?
5) can we have our videos download to users progressively or would we need to invest in a streaming server to perform this.
6) Is this going to cost affective? Or should we turn back now and seek another method of doing this.
I realise this may seem alot to ask, but as I have said I have researched this for several days now. And for the last two I've tried repeatedly to get in contact with someone from Macromedia's advanced support people but keep getting nobody. My search for instructional sites, videos, or macromedia tutorial help brings up nothing involving something this complex in nature. I hope someone can provide an answer.
View Replies !
View Related
Loading A URL Variable From Text File And Calling It Within Flash ?
Hi, I'm building an mp3 player. I have no problem getting the variables to load into flash. Here is what that actionscript looks like:
Code:
var recvars=new LoadVars();
recvars.load("songlist.txt");
recvars.onLoad=function(success){
if(success){
trace(recvars.var1);
trace(recvars.song1);
trace(recvars.song1name);
trace(recvars.song1artist);
}else{
trace("file cannot be loaded...");
}
}
In the output I can see the values of my variables being traced. No problem. When I try to use the external variable in another action script it always comes back undefined. How is that i'm receiving the variables into flash fine, but can't use them? I think it has something to do with the way i'm calling it. I'm calling them the same way the trace is working :
Code:
recvars.song1
On the exernal text file, I'm bringing in the mp3 URL's, the name of the song, and the artist. Here is how I'm trying to use the variables that I brought in:
Code:
var tracknumber;
tracknumber=1;
var trackname;
mySound = new Sound();
mySound.setVolume(100);
if (tracknumber == 1) {
trackname = recvars.song1;
TrackNameText = recvars.song1name;
ArtistNameText = recvars.song1artist;
}
mySound.loadSound(trackname, true);
playing=true;
the trackname variable changes depending on what URL is put into it, in this case the variable song1 from the text file. TrackNameText and ArtistNameText are text boxes that are changed to be filled in with the song name and the song artist, in this case the variables song1name and song1arists, respectively. The text boxes are displaying "undefined" as well.
Any help or ideas?
Just for reference, here is my text file:
Code:
&var1=testing
&song1="http://www.beatznlyricz.com/fla/mp3/4thofjuly.mp3"
&song1name="4th Of July"
&song1artist="Mobb Deep"
View Replies !
View Related
Loading And Passing A Variable In Flash From A Text File
HI!
I'm trying to figure out how I can load a number value from a text file and then use that number as an expression in flash.
//lets say thats the content in the text file called 'value.txt' is 'myValue=1200'
In flash I want to set a variable to equal the number in what 'myValue' is in the text file, which would be 1200.
Does this make sense?
View Replies !
View Related
Is There A Problem Loading 2 Or More Dynamic Text Files In A Flash File?
Hello i got a confusing problem here...
I have my code which is...
var myData = new LoadVars();
myData.onLoad = function() {
my_Text.text = this.content;
};
myData.load("title3.txt");
it loads fine....if i have my variable name: content
and a text file with my information like this..
content=
Hello have a nice day
Now what do i do if i want 2 or more dynamic text boxes loading information from varius text files at the same time....?
It doesnt happen! Flash ignores the other text boxes loading just one...
Any ideas?>
View Replies !
View Related
Loading Var. From Ext. File Into A Flash Variable (not Into A Dynamic Text Field)
Hi!
I'm trying to load a simple variable &myVar from a php file into my flash movie, that's a blank movie with just actionscript in it.
I tried to load this &myVar into a dynamic Text field and it works fine, but I can't get this value into a flash variable to manipulate it with actionscript.. Must be simple.. My actionscript it
PHP file:
PHP Code:
$x = "abc";print "&myVar=$x";
ActionScript:
ActionScript Code:
loadVariables("http://www.sywebspace.co.uk/cleveland/new/analog.php", this, "GET");
How to get the myVar value into a FLASH VARIABLE?
not into a dynamic text field, please, because I did this already but it's not what I want.
Many thanks for any help!!!
View Replies !
View Related
Can't Get Numbers From Text File Into Flash Movie
I am trying to calculate numbers in a flash movie and am trying to get those numbers from a text file, and it's not working.
Here's what i have:
I have a text file (data.txt) and this is in it:
num1 = 2.20
then in my movie, i have this in frame1:
loadVariablesNum("data.txt", 0);
one = Number(num1);
two = .20;
total = one+two;
in frame 5 i have fields named one, two, and total
The results are
field one = 0
field two = .2
field total = .2
View Replies !
View Related
Loading Text From PHP/MySql Into Flash MX Movie
Hi,
I am trying to build a website in flash MX, where all the texts are stored in a mysql DB.
thus I access the Db form Flash thru PHP, using load variables.
Problem is this way some characters like ñ, or ó are unrecognized even if you use the render as HTML and write it & n tilde; or & o acute;.
And even if you want to write something simple as "Don't" flash gets mixed up by the ' .....
Does somebody know a way to have it work, please help me I am really starting to get mad
View Replies !
View Related
Loading External Text Into A Flash Movie
hi all,
i am wondering which would be the best way to accomplish the following task? i am designing a tour schedule for a singer and would like to be able to retrieve the tour info (from an external text file)into flash.
i heard this task should be fairly easy to accomplish with flash mx.
thanks in advance for your help!
michael
View Replies !
View Related
Problems Reloading With LoadVars From Text File Into Flash 8 Movie
I want to parse different variables to a flash movie header each time a different page is loaded... So I created a test movie that will loadvars from a text file which is created/modified by a php script on each page where the flash file resides.
it works ok for the first page but each time I navigate to the next ... the datafile is changed with approptiate variables but the flash movie does not update ... perhaps I am trying to do this wrong way ... is there some way to ensure that flash reloads with LoadVars correctly?
Heres the an example of my php script in each page
PHP Code:
//php script to pass php variable values to a text data file$var= "var1" ;$swf_file = "c1.swf"; $dataFile = "data4flash.txt";// name of data file//open/create a text file called "data4flash"$fh = fopen($dataFile , 'w') or die("can't open file");$pass2flash ="var=" . $var. "&" . "file=" .$swf_file;// data in URLEncoded, name-value pair formatfwrite($fh, $pass2flash); //write to data file - overwrite previous datafclose($fh);
On each page there is a flash movie that just contains a button and two dynamic text fields which I use to display the contents of the text file created by php above
Code:
mybtn.onRelease = function () {
varsfromtxt = new LoadVars();
varsfromtxt.load(http://localhost/TESTER/data4flash.txt);
varsfromtxt.onLoad = function() {
//LoadVars values into text boxes
_root.myVar= varsfromtxt.myVar;
_root.myfilename= varsfromtxt.myfilename;
}}
... I assumed that on each page load the flash would reload and retreive the updated data when called by my button event.
Appreciate any suggestions from the more knowledgable.
Cheers
Paul
View Replies !
View Related
Dynamic Loading Text File Not Loading Correctly
I am loading info from a text file (noticeBoard.txt) using the following code;
sourceTXT = "noticeBoard/noticeBoard.txt";
nodeSource = new LoadVars();
nodeSource.onload = gotoAndStop(printText);
nodeSource.load(sourceTXT);
Then writing it into a textfield when the timeline moves to the 'printText' frame.
The swf is working when I load my html page (notice.htm), with all my values being displayed. If I then navigate away from this page to one where I write more info to the text file and then return to notice.htm the latest info in the text file does not show in my swf. Even if I refresh the html page the new info does not appear until I shut my browser window then reopen it.
Does anyone have any suggestions to why this info is not coming in on the fly?
Thanks
View Replies !
View Related
|