ActionScript 2.0 :: Saving Data To A Text File?
May 12, 2004saving data to a text file for example this tutorial shows how to load it but how would you save the data?[URL]
View 3 Repliessaving data to a text file for example this tutorial shows how to load it but how would you save the data?[URL]
View 3 RepliesHow can I save data to a text file and also append a record to data in an existing text file? I've used Authowrware previously and it was quite easy to create a large string of data (a comma separated list) and export that to a text file (and create the text file if it didn't already exist). I could then easily append additional rows of data (records) to the text file. We want to build a questionnaire that will store the data locally on the computer in a text file. Each record may have a few hundred data points in a comma separated list.
View 8 RepliesI am seeing repeated comments on this discussion forum that it's not possible to save data from Flash into a locally stored XML file . . . but there must be a way to do this. Why is you can read data from a locally stored XML file but not update or add data to it. how absurd a design would that be, it simply wouldn't be logical!
View 8 RepliesI have read through Shared Objects but i couldn't get it work...
I just have to save my data, maybe array into .txt file and later on
retrieve from the same .txt file...
Anyone here have an example or some source code so i can have reference on it?
I have a serious of games swf's loading externally from a main menu swf.What I'm trying to do is take name of the player which they input into textfield and sent it to the XML file. After this at the end of each game I want to send the time it took to complete also to the XML file.The problem I have is I don't know to to create a new user inside the XML file and then replace the default time of 00:00:00 with the time that the player has set.NameTextField is the name of the textfield.Hourtext, Minutetext and Secondtext are the names of the timer. (They are ordered like Hourtext ':' Minutetext ':' Secondtext.
AS3 code inside Flash MainMenu.swf
var XMLLoader:URLLoader = new URLLoader();
var Bytes:ByteArray = new ByteArray();
[code].....
to save to an xml file that has been imported into an xml variable stored in a loader and modified. What I'm trying to do is import an xml list, add a new node with a key stroke, then save the newly modified xml list back into its file. I've seen quite a few threads about people saying you have to download third party software but is there a way to do it from within as3?
View 0 Repliesdisplaying an error after saving data to an external file:
var variables:URLVariables;
var fLoader:URLLoader;
var fData:URLRequest;
[Code]....
Where can I post a message to display if the file has been saved or not?
I use .txt files a lot with flash to load external news and updates. Although you can use the loadVariablesNum() command to load the .txt files is there anyway to edit and save the external files in flash? e.g. say I have a text box and a submit button in flash is there some way where I can add the text boxes content to a .txt file?
View 1 RepliesI have a variable that is in a text file, which contains HTML that i load into my project and it displays it as html in a textbox..Im trying to have a MC in there that I can change the html text and save it over the file thats already there...and then next time i load it up, it will load the html text that i just created and saved to the file.ight just be a simple like php scripting or osmething that saves it to a txt file? i tried looking through the forum.
View 3 RepliesI want AS3 to write to a text file with PHP.
View 3 Repliessave and load to and from a text file. However, doing any tutorials found online currently (I've tried at least 10), I cannot seem to get it to work!
Flash Code:
Code:
myData = new LoadVars();
submit.onRelease = function() {
myData.Name = Name.text;
[code]....
I have a datagrid and would like to be able to save it's content to a text file and reload it.. I've used dataProvider and saved it to a text file but all I get in the text file is [object],[object].
View 2 Replieshow to save the content of an array in an csv file that already has a content. its like overwriting the content of the csv file. the array is like this (Array [1][1]). i've search and googled it but every answer i got is still wrong.
View 1 RepliesI'm simply trying to get Flash to display the first ten characters in a trace, but the results always come back undefined. Here is my code:
var lin = "";
var testfile = new File("test.txt");
testfile.open("text","read");
lin = testfile.read(10);
trace(lin);
The flash file is in the same directory as the text file.
I am trying to save information that I have displaying in my output panel to a .txt fille. I have tried this tutorial here: [URL] but it is not working for me.
I have the output panel displaying information such as:
PHP Code:
[URL]
I need to somehow save this information to a text file so I can forward it onto my email. Or if anyone knows a way to forward information from the output panel to your email
I will be creating a program to use for data entry. I'll be studying zebras in kenya and I won't have the internet there as I'm recording the data. I'd like to be able to send the data I generate in flash to an external text file. I understand I need some sort of script to do that, but is this something I can run just on my machine? (I'll probably make the data into xml format).
View 1 RepliesI am trying to load a variable from data in a text file.I can read the text file fine but the variable data seemsonly to be available with in the function that reads it. I need to use the variable data outside of the function.This is the actionscript code i'm using.
var pathVars= new LoadVars();
pathVars.onLoad=function(ok) {
if(ok)
[code].....
I am trying to load a variable from data in a text file.I can read the text file fine but the variable data seems only to be available with in the function that reads it. I need to use the variable data outside of the function.
This is the actionscript code i'm using.
var pathVars= new LoadVars();
pathVars.onLoad=function(ok) {
if(ok)
{
[code]....
This is where the path_var becomes undefined
trace("This is outside the function... "+path_var);
pathVar1="This is outside the function... "+path_var;
I'd like to know if there's a way to take data entered into a field in flash, save it, and call it later via an object.I don't want anyone to walk me through it if there is, that's not what I'm asking. I'm just asking what I need to know in order to do this. I'd like to build a certain flash app that takes information (such as a name, paragraph, and/or sentence) saves it, and can then be recalled when a user clicks a button... even if the user has closed out the application.I'm still relatively new to flash, I know enough to get by on basic projects, but I want to expand my knowledge so I don't end up stuck in a beginners rut.Would this require using PHP and Flash? Or can it be done entirely in flash via exporting data to a designated external file?
View 2 RepliesI've been all over the interwebs, including Stack Overflow, for hours, trying to identify a solid, workable example of saving information in Flash into an XML file.
I want to take the positions of two different types of objects and export the lists of each to XML. We'll call the objects ball and bat.
[Code]...
I made this simple drawing game. I would like to make it so the user can save their drawings. What would be the best approach to doing this? I know it will require arrays.
View 4 RepliesI'm working with AS3 with timeline code. I would like to save date and time a user took a quiz. This information will help check when a user took a quiz. I can see the date and time as I want, but it isn't saved. SharedObject is not saving date and time. Here is my code. How can I do this?
var mySharedObject:SharedObject = SharedObject.getLocal("sampleCode", "/");
var today_date:Date = new Date();var thismonth:uint = today_date.getMonth();var thishour:uint = today_date.getHours();var thisminute:uint =
[Code].....
I have created a simple flash animation for my employer. I basically have a square that changes color depending on which of three buttons are clicked. This is replicated about 30 times on the page. There is also about 15 circles that have a toggle button created so that when you click on the circle, they change between two colors. As I said, a very simple application.
Now, I need to save the data so that whenever someone new opens the swf, the current color combination is displayed. My way of thinking, with my limited AS3 experience, is that each button click, in addition to changing the color of a movie clip, should also send the data to a server. Then when someone opens the application fresh, I can use the URLLoader to load the most current data.
Am I on the right track, or am I missing it completely? I think I can figure out the URLLoader, but what code would I use to create the text file or xml file?Here is a snippet of my code:
var rtmColor:ColorTransform = f13335.transform.colorTransform;
var okColor:ColorTransform = f13335.transform.colorTransform;
var usColor:ColorTransform = f13335.transform.colorTransform;
[code].....
By clicking on either the rtm_13335, ok_13335, or us_13335 buttons, they will change the f13335 movie clip to the appropriate color (blue, green, or red). The default color is green.
What I would like to do is make the movie clip red, for example, then another person opens the swf, and the movie clip is red as opposed to the default green because I saved the current state to a text or xml file.
I have in mind a very basic swf file that allows someone to enter data (via dynamic text box), submit this data (via php), which in turns saves it as a file on the Server. This file (.txt) would be used to populate text on the main site. Most of this seems quite straight forward, and standard practice, apart from actually saving the data as a particular file and on the server (or overriding an existing file), which I'm sure comes up against problems such as FTP access and everything else, but I was wondering if someone might have an insight on how this could be done?
View 3 RepliesI'm working with AS3 with timeline code. I would like to save date and time a user took a quiz. This information will help check when a user took a quiz. I can see the date and time as I want, but it isn't saved.[code]...
View 1 Repliesi am working in action script 3 , is there any way that we can save mouse drawing data with color and stroke size in XML and retrieve back that data and present that in the same format and same position and edit again.?
View 2 RepliesI've made a small application in Flash CS4 that I use when I'm teaching. Part of the application allows me to 'write' on draggable 'post-it' notes (using a draw function) and another part allows me to type text onto similar 'post-it' notes. how I could save the data that is written or typed in and then re-load it on another occasion? Am I out of my depth?My AS3 is probably intermediate level, I have some experience with SWF Studio and I'm beginner level with php/mySQL.
View 3 RepliesI've searched load of threads for info on this because for what I'm doing I need to save data to the local disk and then load it back up again as required. I'm using a local shared object to save data to and this works fine. Getting it back out again seems less straightforward.[code]Nothing appears to happen at all. The program continues with no traced output at all.
View 3 RepliesOk here is my situation. I've developed a quiz application. Their is 30 frames. 2-29 is the presentation that contains the answers. Frame 30 has the quiz on it. When the user hits submit (once theyre all answered) and if their are wrong answers, it does not continue and it highlights the wrong questions and sets some _visible = false buttons to true. The buttons say "Review answer" which is going to take them back to the frame that has the answer and once that review is over it goes back to frame 30.
My problem is that when the user returns to the quiz frame, everything is reset. How can I store what the user has already selected so when they come back to frame 30 everything they filled out is still their?
I have an offline presentation for a client that needs to have a form submitted data saved local on the machine (kiosk) to be gathered later.I researched on google and found fscommand to write to a txt file but this no longer works and is sorta sloppy.
View 5 Replies