Saving To External Textfile
Can anyone help me that how can i dynamically save my text or variables from swf to external textfile.
FlashKit > Flash Help > Flash ActionScript
Posted on: 10-01-2006, 08:43 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Saving A Textfile In A New Folder
hi...
can anyone tell me can u save a text file to a specific folder which does not exist (a new folder has to be created)
i m using:
fscommand ("save", "c:/Program Files/name.txt");
but i want a folder of Energy to be 1st created in program files which saves the name.txt file.
everything is through a projector...
thanks
Saving Data To A Textfile?
I've seen this done before but I'm not sure how it is done. I would like to be able to write data from the swf to a locally stored txt file (The data could be anything, eg a single variable). Obviously, I know how to load data from the txt file into the swf but is it possible (I'm sure it is, because I have seen it done) to go the other way and save data to it?
Any help would be greatly appreciated.
Saving Variables In Textfile On Server?
I want to save variables in a textfile on my server and then reload them from this textfile at a later time...how can I do this? I am VERY new to actionscripting.
Thx
John
Saving Flash Variables To A Textfile (not A Flash Cookie)
I am creating a game (.exe) using flash. I have all the necessary tools except that I don't have any idea on how I can save user data without using SharedObjects because the user might want to play on another computer using his saved game so there has to be a way for flash to save variables to a textfile (at least) in a specific location, relative to the location of the projector(.exe).
Or is there any of you who can point out cheap (or better free) alternatives (3rd party tools) for me to do this?
Thanks guys!
External Textfile
Hi,
i have a textfile with the following content / variables:
year=2003
&a=1
&b=0
&c=1
Now I want to read the variables into flash.
e.g.
_____________________
loadVariablesNum ("text.txt", 0);
if (a == 1) {
ax = "Hello";
}
_____________________
ax is here a textfield.
I have tried it with a=="1", but it is not working.
What is wrong?
Thx in advance
Riven
External Textfile And Pop-up
Hi,
I have a textbox with an external txt file with html. The thing that i want, is a link that will open a popup with a different width and height. I putted this code for the link
PHP Code:
<A HREF="#" onClick="window.open('lithomatic.html','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=527, height=291');return(false)">LithoMatic</A>
But flash loads the external file good, but the link is not working, its just restarting the flash player when I click on it. Maybe my code is not good.. Is there a way to make a html link (pop-up with a diffenrent width and height) in a txt file so it can work with flash ?
thx
Note : Maybe its the ( ' that are making it crash...?
Netscape - External Textfile
hi!
i load variables from a external textfile in my flashfile. in ie all is fine, but in netscape 4.7 (with newst flashplugin) it doesnt works.
in the textfile the lines begin and end with &, so that could´nt the reason. the flashfile is embedded in a html file. got somebody a answer?
regards
dex
----------------------
http://www.photocase.de
http://www.dexteressentials.com
Scrollwindow With External Textfile
when i move the frames to a sub movie clip.. it doesnt work anymore..
what should i ad to the actionscript????
following the tutorial of patrick jansen.
tnx
Loading Url From External Textfile
Hi. I tried asking this a few days ago but did not get any responce but I need to find out this.
I have a button in a movie that opens a page in a new window on click. I want to be able to find a way of making the link from this button change on a daily basis by editing an external text fille. (not the movie)
I have searched the forums and movie tutorials to find out how to do this but turned a blank.
Can anybody help me or direct me to a link or sample of what I am trying to do
Thanks
Get Links From An External Textfile?
Hi!
I hope someone can help me with this.
In my flashfile I have a textfield and a button. I want to add information for these from a textfile.
I have managed to get the flash to link in the text from the textfile, but now I'm stuck.
I want the button to pick up the url that it should lead to from the same textfile. Unfortunately I'm more of a designer than a programmer so I am have a problem with this.
This is how you link an URL from the button:
on (release) (
getURL("");
)
Now I want to pick up the url from the textfile (info.txt).
This is what I guess that the textfile must contain, but I'm not sure:
&link=gohere.htm
Now what do I have to do to make this work?
Thanks for your help!
More Variables In A External Textfile
Hey
I'm trying to make some kind of logfile of my work in flash MX. The layout is: left some buttons and right a dynamic textbox. The buttons refer to week 1, week 2 etc. and when you click on one of the buttons, the log of that week is showed in the dynamic textbox. Every week has it's own textfile (week1.txt, week2.txt) so I was wondering if I could put them in one textfile. Just marking the text with week1= and week2= in one textfile won't do the job.
any help would be thankful!
Tipsko
External Textfile Problems
I've been trying to load a *.txt file into my flashmovie using loadVariables.
It works fine as long as I am not using special characters. But special characters are totally messed up.
Is there a workaround to get this problem solved.
fla's would be great since I've tried everything else without luck
Read External Textfile
Is it possible to read text from an external textfile (with AS). If so, how to do this?
Loading External Textfile - Question
Hi yall,
I read a complete tutorial on vfx about loading an external textfile in a textfield. Now, I have been trying and trying [by renaming textfield etc] to have multiple textfields which load different ex. textfiles .... but never succeeded. Is there something I don't know ? [ like that it is not possible ]
See ya,
Flash Bee
Adding A GOTO Into An External Textfile
I browsed the messageboard on this but I haven't found an answer yet.
I am loading the text passages of my flash clip from external files. Working fine. Addding external links is also working without probs. But what I simply can't figure out is, whether you can actually link one of the words in the external textfile to a certrain frame in your flash movie with some kind of action script code embedded in your external file.
For example the term "contact us" on my start page should link to the part of my movie where the contact page is.
I know that I probably could link to the movie externally with a variable like ...href="my.movie.swf&page=contact"... and set up some routine in frame 1 which jumps to a certain area according to the value of this parameter but I reckon that opening the whole movie again will be quite jerky since it's size exceeds already 300k.
Any suggestions?
Read Plain External Textfile
Hello,
I want to read an external textfile into an array. The problem I have is that the textfile that I want to read doesn't start with variable= orso. My question is now how I can still read in that text file to one variable or an array orso...
Thanks....
External Textfile Variable Problem
im loading some variables from a text files from a text file but am having problems getting a variable from it.
im loading using.....
loaded = "";
loadVariables ("coords.txt", this);
and ive got
gotoAndPlay (1);
if (loaded == "ok") {
gotoAndStop (3);
}
so that it it only carries on if the file has been loaded
the text file consists of some code like this
&start1=31/01/2002&end1=23/11/2002&loaded=ok&
but for some reason it seems to continue regardless of what loaded is equal to
does anybody know what im doign wrong?
many thanks for your help
Load A Random External Textfile
hi guys
I have about 55 different text files ( named 1.txt-55.txt)
Now I want it to be loaded randomly
i made this:
getal==random(6);
if (getal == 1) {
loadVariables("Text\1.txt", "");
} else if (getal == 2) {
loadVariables("Text\2.txt", "");
} else if (getal == 3) {
loadVariables("Text\3.txt", "");
} else if (getal == 4) {
loadVariables("Text\4.txt", "");
} else if (getal == 5) {
loadVariables("Text\5.txt", "");
}
But I am pretty sure there is an easier way
I was thinking of :
loadVariables("Text\getal.txt","");
or
loadVariables("Text\(random(6)).txt", "");
doesn't really work, can somebody help me out?
thnx
Link From External Textfile To Flashlabel
hi there
I have a very urgent problem and hope, that someone here knows a way to solve it!
I load an external textfile into a flashmovie. from that textfile I want to link to a flashlabel.
I know how to do that from a HTML-file but it wan't work with the textfile (even if the textfile executes other HTML-commands).
I attached all my testfile and would be very glad, if someone has the time to look at them!
Tanks in advance!
Katja
Ankerlinks From External Textfile To Flashtextfield
hello
here comes an other very urgent problem......
I have two external textfiles which I load in to different textfields a flashmovie.
The first textfile includes some links. This links point to textfiles which should be opened in the second flash textfield.
For a better understanding, I attached my testfiles.
would be great if someone could help!
thanks in advance
Katja
Show / Hide Mc By External Textfile
Hi can please someone help me out here:
I want to tell to a movieclip that he must be invisable or visable by a external textfile ( like actionsonof.txt ) But i can't figure it out... what i have is:
the MC name is actie
textfile: result=false ( or true )
code: ( on the first frame of the stage )
acties.onEnterFrame = function() {
loadVariablesNum ("actieonoff.txt","")
acties._visible = result;
}
thanks for your suggestions !!
ASCII-Codes For External Textfile Import?
Hi,
I want use external Textfiles in my page. How do i have to convert Chars like "=" <Return>s... Is there a way to mark words in the textfile to display them bold or italic in the swf?
maybe someone can give me a list of the codes??
Please help me fast!
crazybYte
CHALLENGE Special Character, External Textfile
Hi,
I have posted about this problem, people have tried to help, nothing has worked. I load a textfile into a movie, all works fine but I can not get this è character to appear.
I have tried putting it in the embed dialog
I have tried embedding the entire font as well
I have tried %E8 in my text file
I have tried u 00E8 in my text file
incidentally if I just set a var in my movie by actionscript u 00E8 displays the correct character.
So I am stumped, I am posting a zip file, it contains an fla with 2 textboxes. One shows that a variable defined in the movie works, the other displays the external textfile. The zip also contains the basic textfile and the TrueType pixel font used.
I know that loadVariables("font_test.txt", this); is old fashioned actionscript but this site is several years old and contains a huge amount of complex actionscript that I have no desire to update just because one character in an updated textfile will not display.
Please help
My client is happy with the Site but this one little bug remains, and they keep asking about it
Mark
Link To Library Sounds From External Textfile?
Hi everyone, this is my first post.
I have an external text file that has a list of the names of songs that are called into a dynamic textfield called txtSongs.
All the song names in the ext-textfile are in hyperlink format but don't link to anything, I want to do that in flash using AS2.
I want to add an event listener that says "when a link in txtSongs is hovered over, play some sound in library".
Then the second part is extracting the text of the hyperlink to tell flash which sound in the library to play.
Does anybody know how to do this?
Problems With Making External Textfile Scroll
im ok with all the basics of flash becuase i have been doing it for a while but i have never tried anything to do with action scripting so bear with me ...
i am trying to load a external text file into a dynamic text field
i have a frame with the action in it loadVariablesNum("news.txt", 0);
and then on the dynamic text file i have it load the var newstext
this all works fine but the problem is that i want the text to be in a fixed size box that scrolls
i then dragged the scrolll bar component to the dynamic text and it sort of stuck to the side
when i run it you cant scroll using the scroll bar even know the text needs to be scrolled but if i put text in normally by hand and have it not linked to an external file it works fine
any help?
Variable From Textfile To Load Other Textfile's Variables
Hello! This might puzzle your minds because it's looong but I need help!!
I've worked with flash for a couple of months but I'm still a newbie at scripting. I have this problem, I'm working on a very simple newsreader for a website.
My idea goes like this:
I have two textfields, one named "top", and the other one named "news". And then there are textfiles named "newsxxx.txt" beginning with "news000.txt". In news000.txt I have made the variables:
&top=The subject of the news&
&news=News posted here&
&newnews=news001.txt&
&oldnews=news000.txt&
As you see I have also added some variables for opening newer or older news with two buttons in the movie, one for newer and one for older. And in for example in "news001.txt" the &newnews=news002txt& and &oldnews=news000.txt&.
But there is this tricky thing with this newsreader. I want it to load the latest news when the newsframe is loaded. So I made a textfile called "latest.txt" containing &latest=news002.txt&. Since the newest news-textfile is "news002.txt" it says like that. Everytime news are posted this file has to be updated too. Next time: &latest=news003.txt& and so on.
In the newsframe in the movie I made and action:
loadVariablesNum("latest.txt", 0);
And the variable &latest=news002.txt& is loaded.
But now I just can't figure out how, after this script, load the contents of "news002.txt" using this variable "latest", because the news change dynamically when updated and this should read the latest file (news002.txt) from the latest.txt, and it's variable.
The contents of "news002.txt" is as I said, the &top=*& and the &news=*& variables which are loaded to the textfields. I got that working, but I have to make the flashmovie to determine the latest news-txt file automatically and load it.
This might be very simple but I want to use the variable from a textfile to load another textfile's variables into textfields.
Also I'm wondering how you could assing the two buttons to open a newer newspost or older using the variables:
&newnews=news001.txt&
&oldnews=news000.txt&
in each textfile.
So that's it.. ask if you want me to explain better if you didn't get it. Thanks a lot!
[Flash8]Hide Scrollbar When Not Needed, With External Textfile
Ok, here's the situation.
I've got this navigation system set-up (http://sandervanrijen.com/shenchi/shenchi.html), where external text files are loaded each time a different buttons is clicked.
Now, I want to add a scrollbar for when there is a overflow.
But I only want it to appear when it is needed.
I did some google searches on this problem. And found it it can be done with the maxscoll property.
I've tried different codes using maxscroll, but it doens't seem to work.
I've tried this (where my scrollbar has an instancename of scroller and my textfield is called inhoud_txt):
scroller._visible = (inhoud_txt.maxscroll > 1);
But it doesn't work
Also when i try something with the if - else command, it also fails.
When i change my code to maxscroll >= 1 my scroller is always visible.
I've got no clue what I'm doing wrong here, hope someone can help me
External Textfile - Use Codepage=true - Characters Missing
ok- solved it by myself - www.unicode.org - look up the hexcode in the chart you need - +Sign e.g. is %2B.
thanx again...
Joc.
***************
OK, I have to use the statement
Code:
System.useCodepage = true
for displaying special characters (german äüöß...)
The external files I use are ANSI-coded (an have to be so, because my client is supposed to edit and save them, so I cannot expect him to save them in UTF-8).
The special characters display well in my Flash Movie BUT the "+"-Character does not. Probably because it is a control character.
Does anybody know which code to use to get Flash to display a "+"-Character? (BTW: The + does not display for UTF-coded external text files either...)
Thanks!
Jochen
How To Make A Variable That Points To An External Textfile? (supernoob)
Hello.
A quick question here!
I have several external text files that load on click of their respective links into a text field .
I need to fade out the textfield onClick to then fade it in for the new coming text file. For that I need to make a variable that stores the current page. But the current page is a text file which cannot be tweened so I would need to tween the text field for a specific text file that has been loaded. Can this be done?
I'm puzzled, probably my question is puzzling too, but hope it makes some sense.
Thank you for your help.
Links From One Textfile To Another Textfile?
I have some text in a .txt file that is loaded into a html-textfield in a swf.
What I would like to do is to have links in this .txt-file that links to other .txtfiles and loads those other textfiles into the same html-texfield in the swf.
I have managed to make it load... but it opens a browser instead. This is the code is use the the .txt-file:
<a href="textfile.txt" target="_level1.myTextField">Load the textfile! </a>
Is it even posible do this?
Thanks for all your help
Loading A Textfile Name From A Textfile
Hi#I am trying to use a textflile to store a name of another textfile which Flash then calls in the detail to a dynamic text field my idea wa this:
// Load name of textfile2 from textfile 1
loadVariablesNum("id.txt",0);
//The text file contains the line : &name11=map1
//Use this variable to load in detail from textfile 2 which is called map1.txt
loadVariablesNum(name11 + ".txt",0);
//Text file map1.txt contains the line &contenttxt=Text to go in text field
textresult = contenttxt
When I run this however it returnes UNDEFINED & although it does return name11 as "map1" it does not then turn this into the filename map1.txt
Any ideas???
Thanks
External Saving ?
I am just wondering if theres any way to save into an external .swf or .txt file other than saving onto the web, or is it possible to save into a .html file driectly on the computer?
thanks in advance
Reading In An External Textfile "slowly"
Suppose I have a textfile of 0's and 1's. The numbers control the behavior of a character instance. For exampoe, 0 is stay still and 1 is jump.
Usually, the entire file is imported at once. This would mean the character jumps and stays still at the same time (at least visible to the user). Is there a way to "slow" the import so that the "read" between each number is delayed by at least one second?
Please help. Thanks.
Saving To An External .txt File
hi,
I wish to save some variables to a relative .txt, .ini (or anything else someone might care to recommend) file, so that the variable can be called into use the next time the file is opened (user name/ highscores etc...).
The project is for distribution over cd-rom, to be either installed on the host computer or run from CD with the variables stored on the host machine. I therefore can't use serverside solutions such as perl or cgi.
thanx,
geepers.
Saving To An EXTERNAL FILE
How can we make a script that saves what is on a group or just one text field in a flash movie to an external text file.
Thanks !
Saving To External File
Is there a way to save an array or a variable to a txt or xml or i dont know what kind of file without using a server ?
I think that d be fun !
Regards
Me
Saving To External File
Is there a way to save an array or a variable to a txt or xml or i dont know what kind of file without using a server ?
I think that d be fun !
Regards
Me
Saving To An External File. PLEASE HELP
Ok, I want an application that the user inputs data into a text field and when they push the "save" button, it saves it to an external file maybe in the "my documents" folder on their harddrive. Does any one know any good tutorials for that kind of thing? To save information to a file?
For Flash 5 or Flash MX.
Thanks in advance.
Saving To An External File
I was wondering if there was a way to save something as an external file. To give more insight, here is my situation:
I have a flash document which a user inputs text(Dynamic text box) to create a type of document for themselves so that they can save it by clicking on a drop down menu and selecting Save. I know how to do everything there, except the "Save" part(pretty much the whole thing ). Is there a way to directly save a file as a certain name, and type, but, when clicking on "Save" it will open another window inside my flash document which will have a Dynamic text box that will ask the file name and extention, and when you finally click OK in that box it will save to a file? Or is there another way? Or is there any way at all?
I'm using Flash MX.
Thanks a lot.
Saving To External TXTs
i need the EXACT code of how to save to a TXT using flashmx (of course)
i'm getting frustrated since I've been trying mysql, mdb and tons of other databasing programs but ive seen it done with flash and im sure its easy to save from within flash to an external file
its basically a guest book :/
Saving Changes To A Swf In An External Txt File
I've created a swf that you can change the text and it's colour and the colour of the background. it uses an external txt file. what i want to do next is create a button that saves the changes that the user has made. Can anyone give me a clue as how to do this please.
Saving External Text?
I have created a web page with a flash movie that gets its data (text only) from an external text document.
I have two questions:
1 in doing my load var I used absolute linking becuase I couldn't get relative links to work. Is there a way to get relative links?
2. I want to create an admin page for the client that allows him to add to the text doc via a dynamic text movie. Can I
a) get the content of the text doc
b) store that in a variable,
c) take his input and put it in a second variable
d) add the second variable to the first--thus adding it to the list
e) then save all the info as the text doc, overwriting it?
If yes, what would the action script look like? I am out of my depth.
Saving MC Or External SWF To A PDF File
Hi guys,
I have tried looking into this but haven't found much. I need to get an external swf or an internal movieclip saved to the users hard drive as a pdf.
Ideally, the user would get a prompt screen asking them where to save the pdf, but I need to know if it is possible to get the mc or external swf saved as something else for them to look at later. I thought about having it saved as a GIF of JPEG, but the client prefers PDF.
Also, this is going to be a cd rom application, which will not have web access, so php or server side stuff is not an option.
If there is any code I overlooked on this, could someone please let me know about it?
Loading External Variables & Saving
I am trying to make a thing where you can go to a site and type in your stuff and the next time you visit it will still be there. And i also want to lock the varible the second time so it can't be changed.
i_w_a_c_k_o_8_____________________
help needed
Saving Data In External File
I have been able to upload data from a .txt file to flash exe but can i save the data from exe to an external file (preferably .txt file). I am using Flash4 is it possible in Flash4 or Flash5?. Please Help and thanks for your sugesstions.
Saving Information To An External File? How?
Lets say that I have the first FRAME load the variable "users" from an external text file called "users.txt". Then I want to save information to "users.txt", but how would I go about doing this? Do I have to use the Fscommand? Please help.
|