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








Saving Data To A File


i've been loading my variables (using LoadVars) from a .txt file and am now faced with the problem of saving the variables back to the .txt file (on the server). I have 2 questions:

1: when converting my arrays back to strings, I have just used the .join(",") command, is this correct or do I need to then define it as a string?

2: what is the easiest way of saving the file? I have a .php script that I could utilise but im not familiar with the language.




FlashKit > Flash Help > Flash ActionScript
Posted on: 06-17-2004, 11:06 AM


View Complete Forum Thread with Replies

Sponsored Links:

Saving Data And Loading Data From A .txt File...
Hi,
I know there's a way to do it but i just couldn't get the right tutorial around..
I 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?

Thanks for the help provided....

Regards,
Lacus

View Replies !    View Related
Saving Data To XML File
I can read data from an XML file and show the data in Flash but I don't know how to save the dave to an XML file.

Actually I have two input box in Flash called:

"Name" and "Email"

and I want if users fill their name and Email id and press on the Submit button, their name and email id save in an XML file.

Is their any tutorial for this.

Please let me know.

Thanks in Advance

View Replies !    View Related
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.

View Replies !    View Related
Question About Saving Data On External File
Hey Everybody :-)


I'm looking for a way to save information from a flash movie
in an external file.

some kind of a database or something.

View Replies !    View Related
Making A Survey And Saving The Data To A File?
hello,

i'm quite new to flash and especially flash cs3,
i've made a simple survey and i've figured out how to load data from a text file, but what i need now is a way for the results of the survey to be stored...*for instance to a text file* and then i want it to use the data and somehow display it, with a simple bar graph and percentages for instance...

but i have no idea how to do all that...can someone please help?
is it too hard to do? because my project is urgent, if its WAY too difficult then i'll have to drop the survey all together...

*thanks in advance everyone*

View Replies !    View Related
Loading And Saving Data From External File
http://www.kirupa.com/developer/mx/externaldata.htmi saw this tutorial in this website. But i am just wondering what if i have more than 1 records, how do i load it from the text file, and how do i save multiple records into the text file ? can anyone provide a simple guide to teach me how to do it ?? thanks a lot ~~

View Replies !    View Related
Outputting/saving Data To A Text File
Hi all

i've done a quick search but not had much luck

Is it possible for a CD based flash appplication to create a text file on the users hard drive in which to store session data of sorts, which it can later retrieve/modify? Would PHP, despite being a server side language, have any use here? Can anyone point me to some tutorials?

cheers

View Replies !    View Related
Loading And Saving Data From External File
http://www.kirupa.com/developer/mx/externaldata.htmi saw this tutorial in this website. But i am just wondering what if i have more than 1 records, how do i load it from the text file, and how do i save multiple records into the text file ? can anyone provide a simple guide to teach me how to do it ?? thanks a lot ~~

View Replies !    View Related
Saving Data Into A Text File (client Side)
Hi,
is possible to save data contained into a DataGrid into a text file on the client machine?

Thanks

View Replies !    View Related
Saving Data Within The Exe
I am hoping to be able to store data that was entered by the user within the executable flash file. I am planning on distributing the file on a CD and would like for the user to be able to answer questions and then forward the exe to another user with his/her answers still visible.

Is this possible?

Thanks

View Replies !    View Related
Saving Data
Hi,

I'm using Flash 5.

Is it possible to create an array inside Flash, and then be able to save the data in the array to a text file, so you can use loadvariables to load it back in??

thanks for any help

phil.

View Replies !    View Related
Saving Data
hi.
i would like to know how can i save data from flash into a file
e.i.
i have a dynaminc txtfield and a button submit. i want when submit is pressed save whatever characters r in the txtfield into www.mywebsite.com/txtfiles/file.txt
I know i need external scripts but i don't know witch one or how to do it...any help? a tutorial would be awsome.
thnx

View Replies !    View Related
Saving Data Into A Mdb
hi every body i am having some problems with an asp code trying to save some data into an access db. any help would be appreciated thanx.

this is my asp code and some AS code too

<%
Dim oConn,strSQL

Set oConn = Server.CreateObject("ADODB.Connection")

oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("search.mdb"))

Path = Request("Path")
Title = Request("Title")
IndexDate = Request("IndexDate")
Content = Request("Content")
wFileType = Request("wFileType")

strSQL = "insert into SearchTable (Path, Title, IndexDate, Content, wFileType) values ('" & Path & "','" & Title & "','" & IndexDate & "','" & Content & "','" & wFileType & "')"


oConn.Execute(strSQL)
oConn.Close
set oConn = nothing

%>

and this is my AS code for the button send is
on (release) {
loadvariables("http://localhost/tano/engine/into.asp", 0, "POST");
ok._visible = true;
}

View Replies !    View Related
[F8] Saving Data Into XML?
Hi,
I am working in a Quiz application in which i am creating a save user data/profile module. I need some suggestions here before i start on it. I need to know should i use XML to SAVE and LOAD data? or just simple text into a text file?

Data which i want to be saved for future reference will be the Score, Average Score, Student Name, etc...
This app is intend to run on PC and not on WEB.

Any ideas and suggestions??

Regards,
Aamir

View Replies !    View Related
Saving Data.
I want to make a movie that has a form to be filled and I want to Save data in server or PC after submitted from that movie .

Please List the possible ways of doing this.

View Replies !    View Related
Saving Data
I would like to make a counter to look how many times someone visited my game.

This is my Code:

var counter:Number
var myLocalData:SharedObject = SharedObject.getLocal("mygamedata");

myLocalData.data.gameinfo = counter
myLocalData.flush()

if (myLocalData.data.gameinfo != undefined) {
counter += 1
} else {
counter = 1
}

trace("This is your "+myLocalData.data.gameinfo + ". visit.");

Now. it always says: "This is your NaN visit."
Why is that? Is there any way to make a counter like that?

macco

View Replies !    View Related
Saving Data Into Xml
i'm creating a input field with var name "input" and i want to append and save the input data into an xml, so it's like

[Xml code(how do i use tags?)]

...
<input>clientInput</input>

[/xml code]

what's the actionscript code that can accomplish this?

View Replies !    View Related
Saving Data?
Hi ! i've been trying to find a way to save information from the text fields of flash into a txt file, doing the reverse is easy, loading them into flash, but I was searching a tutorial explaining how to save the data to a txt file using PHP. Can someone explain me how to do it ?? ??

View Replies !    View Related
[CS3 AS2] Saving Data
Hello All,
I have a desktop app build in AS2

It kind of functions like a shopping cart / product calculator.

I want to be able to physically save a file with text data (to be reloaded later) in a directory on the computer. the app is running form a projector on windows.

is this at all possible?
how can i go about doing something like this?

View Replies !    View Related
AS 2 Saving XML Data Using PHP
http://www.kirupa.com/web/xml/examples/simpleeditor.htm
http://www.kirupa.com/web/xml/examples/newseditor.htm

By following the tutorials above, i thought i am able to alter the XML on server. In fact, the XML file retains the original contents, i found this when i click "open XML" to view it. Anyone can give me a simple guide to write the XML file?

View Replies !    View Related
Saving Data From A .swf For Reloading
from flash.project(3D_rpg)

we have created an 3d rpg engine and plot - but with large loading times and big files we want people to be able to save their progress. has anyone come accross any method of saving all the information stored in the .swf at that time for another day.

one solution we thought about was creating passwords for different stages but we would need several thousand so it was not a practical solution.

http://www.surfsure.co.uk/rpg thats where our demo files are if you want a look.

maybe the way to solve this is though a code similar to a macro in ms office 2000 that you can create?

if there is no way of doing it - it is not a serious worry, it is just that players will have to restart each time, which would perhaps be a put off.

kind regards,
dr_funfrock, _letser, behp and binaryhit
the enchantment team.

View Replies !    View Related
Trouble Saving Data
I'm using FScommand to save variables from Input Text files to an external text file. The code (which I'll put at the bottom of this) works with the standalone Projector file, but not with the SWF in an HTML page. Any ideas why?

[NOTE:CharacterName is the variable of an Input Text box]

on (release) {
var SaveFile=CharacterName+".txt";
fscommand ("save", SaveFile);
}

View Replies !    View Related
Saving Flash Data
I have a program made in flash that duplicates objects then you can change all the properities of the object and print them out. Basicly what I'm tring to figure out is how the user could save all the information to a database so it could be recalled. Do I have to create varibles for everything then just send it to a ASP page.

View Replies !    View Related
Saving Files.... Data
is there anyway to save a file with flash? can you create a .dat file from inside of flash with the given infromation from an input text box?

View Replies !    View Related
Saving Data From An 2-D Array
I'm making tennis a video game in flash where the computer gets better by learning from its mistakes. The mistake data is stored in a 2-d array. But every time I close the projector the computer has to learn all over again (and that takes too much time). Is there a way that I can save the data from the array in a file and then read that data every time I open the projector? Also why does my game slow down after it has been running for a while, is there a way to clear the memory or something?

View Replies !    View Related
Saving Data From A 2-D Array
I'm making tennis a video game in flash where the computer gets better by learning from its mistakes. The mistake data is stored in a 2-d array. But every time I close the projector the computer has to learn all over again (and that takes too much time). Is there a way that I can save the data from the array in a file and then read that data every time I open the projector? Also why does my game slow down after it has been running for a while, is there a way to clear the memory or something?

View Replies !    View Related
Saving User Data
Hi Flash gurus,

I posted this in a different area a few weeks ago, but wasn't able to get the help I'm looking for so here it is again...

I'm making a stand alone, interactive .fla. (MX2002) for young children.

Students will:
1. enter their name
2. choose one of four options
3. progress through a game by choosing "yes" or "no" options (with the use of r and l arrow keys). Hitting the r arrow key increases a counter by one each time. Movie ALWAYS goes forward, regardless of which arrow key is pressed.

I've got simple variables that capture this data currently, and then display it at the finish, but that data is lost once I run the .fla a second time.

I need a way to store data for each of the points above (likely in a .txt file that I can later import into Excel or a graphing program to display their results over a period of time). Maybe I have .txt on the brain and SharedObject is the way to go?

Someone sent me some info about SharedObject (Thnx, btw), but how can I use the info that SharedObject captures to keep the user's results (for each time they use the .fla) and then use it later?

How do I initialize a .txt file in Flash and send the final data to write to the .txt file after they use it each time? *The .fla can't re-write over previous data, but instead collect data over a long period of time*. Also, is there a function in Flash that can give a time/date identity, rather than have the user enter the time/date themselves?
I've attached my file in case it helps.

Any help is greatly appreciated!

View Replies !    View Related
Loadvars Obj For Saving Data
So I need to get my variable values saved to a server each time my test subjects run and finish my swf/fla (PHP scripts are being worked on, but that's a different nightmare!). I'm pretty sure I should use LoadVars, NOT SharedObject for this data capture right?. The data must not be overwritten each time over the course of a few months of data collection.

The 3 variables are: username (name of the user), counter (this keeps track of which version the user chooses from the start menu), numcorrect (keeps track of the number of times the <right> arrow key is pressed).

BUT, I don't know where to put in the LoadVars obj (in the AS code of "finaldisplay" frame?) AND I don't know how to build/format the LoadVars object to capture the data in the 3 variables I listed above.

I've got several Flash books and have done online tutorials, so for something so simple (3 lousy variables!)...why is my life so miserable?

Here's my zipped .fla. Will greatly appreciate any help.

pepperman

View Replies !    View Related
[F8] Saving Data To A Website
I am wondering how I would save data to a website, like a counter. If someone could help me by explaining how to append data to a .php or .txt file online that would be of great help. Thank you.

View Replies !    View Related
Saving User Data
Hello everyone,

I'm relatively new to Flash and AS3, but I am in the process of developing a game that I would like to eventually publish to the web. My question is, could someone point me in the right direction for saving and retrieving user-specific game data?

Should I store data in XML files?

Should I store data in a database?

Locally vs On the server?

etc...

The kind of data will be user's characters information, level, skills etc. Resource data both monetary and non etc.

Are there any real good tutorials on this subject, books or articles?

Thanks in advance for your help.

~Mullhavoc

View Replies !    View Related
[CS3] Saving Data From A Questionnaire
Hey folks, I heard that this was a good place to look for flash advice. Let me tell you about my project and perhaps someone can point me in the right direction.

I am trying to gather opinions from students at my university. I need to make a questionnaire about 20 questions long for use with a touch screen computer (should work the same way as mouse input but the buttons will be big). All of the questions will be either multiple choice or number input (via a number pad in the flash program). I will also need to be able to input audio files of someone reading the question and answers out loud.

All of this I have some vague idea of how to do, what I really need advice on is how to store the information in a text file that will be continuously added to as more people take the survey.

If anyone knows of tutorials or other resources that might be helpful to me, please share. I should be able to figure it out if it is advanced, my biggest worry is selecting a resource without much knowledge and later finding out that it wasn't what I needed.

Thanks so much in advance!

View Replies !    View Related
[F8]Saving Data(from A Game)
I need the code for saving data(Cookies).

View Replies !    View Related
Saving Data To The Server
I'm trying to make a poll that will add one to a variable according to your selection then save that same variable into a text file on the server

...So basically How do I save variables to a text file on the server

Thanks in advance,
-Dezmond

View Replies !    View Related
Advice On Saving Data
Hi everyone,

I'm pretty new to ActionScript (I'm a .NET developer but know a bit of AS),

I've been tasked with something I think is currently a little bit out of my depth; I need to build an app that allows items to be dragged around and resized etc, I'm pretty confident I can do that, BUT the problem is that this data needs to be saved somewhere so that the scenes can be recreated. I'm thinking store the properties (x, y, width, clip etc) of the items in an array, but has anyone any advice on how you would then store that data permanently so that it can be read in at another time?

Any hints would be great!

Thank,

Nick

View Replies !    View Related
Saving An Objects X & Y Data...
Hi!

I have a drag and drop file. After that I have draged and droped my object I would like to make a post and save that data so that the object always stays where I´ve put it with my post on it.

So my question is, does any one know how I save this data, or does anyone know a tutorial that might help me?

help help!
please please!


/c

View Replies !    View Related
Saving Data To Server? XML?
Hi all,

Just trying to follow up on an idea, and I have a question.

The final solution will likely turn out quite more complicated than the intitial question to help me on my way but here's what I'm trying to work out how to do.

If I create an area within the site where a user can manually create something from a list of objects, if I, say, wanted to save this data as a number of variables to the server ie- a new row containing all the data unique to that saved item, does anyone know the best method of doing this, I'd figure it'd be XML but resource seems a bit sparse in this area.

For a rundown of what I'd like to ultimately do is:

The user creates something that can be stored as variables and numbers and then saved to the server.

This data can then be loaded back into flash (randomly-- so not every user creation is shown together) which then helps to populate the space with user creations.

This, I'm guessing would mean saving the data into XML, then randomly drawing out different generated XML back into flash.

Anybody got any pointers of where to begin on this?

View Replies !    View Related
Saving Data Locally
Hello,

I have been asked to write a program using flash in which the user will input data. I need to save and store this data locally to the computer, as well as retrieve it later.

This all has to be done locally example (C:/Program Files/Misc/Database), no online database is too be used. I was just wondering if this is possible and if so, if any body can help me out answering this. This project needs to be a self-contained software app that will be burned on cd then installed on the users computer. The user will be using the software and updating information that will need to be saved (this part I do not need help with).

Is the part about storing and retrieving data locally on the users computer possible.

Thanks

View Replies !    View Related
Saving Data To Server? XML?
Hi all,

Just trying to follow up on an idea, and I have a question.

The final solution will likely turn out quite more complicated than the intitial question to help me on my way but here's what I'm trying to work out how to do.

If I create an area within the site where a user can manually create something from a list of objects, if I, say, wanted to save this data as a number of variables to the server ie- a new row containing all the data unique to that saved item, does anyone know the best method of doing this, I'd figure it'd be XML but resource seems a bit sparse in this area.

For a rundown of what I'd like to ultimately do is:

The user creates something that can be stored as variables and numbers and then saved to the server.

This data can then be loaded back into flash (randomly-- so not every user creation is shown together) which then helps to populate the space with user creations.

This, I'm guessing would mean saving the data into XML, then randomly drawing out different generated XML back into flash.

The main problem after working out how to save the data is how to make it not confilict with other saved files, a sort of list thats created adding up for each submission.

A complicated example would be the data that is saved from redbull's flugtag game: http://www.redbull.com/flightlab/
Anybody got any pointers of where to begin on this?

View Replies !    View Related
Saving And Loading Data. How?
I'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. This is the code I'm using:

//Saving
myLocal_so = sharedobject.getLocal("flashcookie","/");
datastring = "anyoldstuff";//sample data to save
myLocal_so.data.savegame = datastring;
myLocal_so.flush();
//Loading
myLoadVars = new LoadVars();
myLoadVars = myLocal_so.data.savegame;
myLoadVars.onLoad = function(success) {
if (success) {loadgame = myLocal_so.data.savegame;
trace (myLocal_so.data.savegame);}
else {trace ("Error!");}
}

Nothing appears to happen at all. The program continues with no traced output at all.
Can anyone tell me where I am going wrong with this?

Thanks

View Replies !    View Related
Saving Data To Components Or Other.
data xml / or textfiels
saving.

someone with good tuturials..
Without:


Code:
"NetServices.as"
"NetDebug.as"
Any possibillity for that?

Greetz://

View Replies !    View Related
Saving Input Data
Perhaps someone can help me. I'm a bit of a AS-beginner, but for a project some (advanced) AS is required.

Users can write a text, modify it (in type, color and size) and choose a picture (which is loaded through a XML-file) for an e-card, then send it to whomever they want. But when they have made the modifications, how do I save the card, and then store it in a database?

Is it possible to save a single movieclip (the e-card) as a SWF-file?

Would really appreciate some help, suggestions or examples!

View Replies !    View Related
Saving And Using User Data,
ok, what i want to do is make a flash site that allows people to add a movie clip to the screen by clickiing, very easy,
but then i want them to beable to enter in there name and whatever.

but also i want them to see all other peoples movieclips they left behind, and see what information they typed.

does anyone know how i might go about this? i know there are a million ways to do this, but how would i
1) keep the clips on the stage after someone leaves, and

2) retain there info , i assume through xml or somehting but i need a little direction , i am fairly fluent wiht actionscripting, but dont know any other code really



thanks for any help possible

View Replies !    View Related
Saving Data Across Frames
Ok 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?

View Replies !    View Related
Saving Data Locally
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. I don't have the expertise to run a local db and write to it.

Can anyone recommend a solution for this? 3rd party app?

Id be insanely greatfull.

View Replies !    View Related
Saving A Shape's Data?
Hi everyone,

I was wondering if anyone has come across a class/library that can convert a shape (movieclip) to textual data (hence can be saved as a shared object).

Anyone?

View Replies !    View Related
Saving Data To Server
I have used shared objects to have the user save local data, but now i need to save many different users data to the server. What would be the best approach? I have tried looking into MySQL, and though the great tuts on this site makes great sence on how to retrieve data from a database, i can not find any info on saving user data from flash into the databases.

My idea right now is to make a login that uses the MySQL database like in the tutorial on this site. But i need to save data from within flash, (just like I've done untill now with shared objects) but now on the server side.


Hope any one can help me
Thank you
Karsten

View Replies !    View Related
Saving And Loading Data. How?
I'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. This is the code I'm using:

//Saving
myLocal_so = sharedobject.getLocal("flashcookie","/");
datastring = "anyoldstuff";//sample data to save
myLocal_so.data.savegame = datastring;
myLocal_so.flush();
//Loading
myLoadVars = new LoadVars();
myLoadVars = myLocal_so.data.savegame;
myLoadVars.onLoad = function(success) {
if (success) {loadgame = myLocal_so.data.savegame;
trace (myLocal_so.data.savegame);}
else {trace ("Error!");}
}

Nothing appears to happen at all. The program continues with no traced output at all.
Can anyone tell me where I am going wrong with this?

Thanks

View Replies !    View Related
Saving Data To Components Or Other.
data xml / or textfiels
saving.

someone with good tuturials..
Without:


Code:
"NetServices.as"
"NetDebug.as"
Any possibillity for that?

Greetz://

View Replies !    View Related
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.

View Replies !    View Related
Saving Data On Desktop...
Hi,

I'm planning to make a desktop application in flash, in this application there will be a todo-list, contact list, calendar, ...

I want to use this application always and everywhere (with my laptop) so I can't use internet for storing my data and my laptop is no personal server so MySQL is also no solution, so now is my question: how (and with what language) can I store data on a pc and export it to XML for reading into flash?!


Thanks in advance,
mykingdom*

View Replies !    View Related
[as] [xml] Saving Data Without Server
OK I know we can get data from a txt file on the local machine but we cannot create a txt file without server side work, is it possible to create an xml document and save it to the local machine...

The probs is I'm in a college and cannot use server side technology, each student has a n:mywork directory which i would like to save data on.. I'm just running out of options...any ideas??


Zen

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved