ActionScript 2.0 :: Save / Load Variables In Games? No Cookies

Nov 30, 2004

Once, I wanted to make a large RPG-game. I wanted it to be like Zelda, Diablo2 style of RPG with much Hack-and-Slash but also a little quests and a big world to explore. (a BIG game). A game needs to be programmed, so I had to choose a programming language. I chose Flash, because its easy to make graphics in it, and its not that hard, I thought. The game was planned to be a stand-alone-application that you could have on your computer and play whenever you wanted to. Much like any other game. But, this was not something I thought of in the beginning, games you make in Flash usually is web-games, right? But this RPG I wanted to make was not an online-game, and I didn't want it to be either, because it would be to big to download everytime you wanted to play it.

A RPG-game needs a save game/load game function. But Flash cannot write to external files! This was terrible! Now, its a great safety protection to make flash files not write bad things into your computer. But I need it in order to save my games! There is this way, that flash can load variables from external text files. But is there some way that I dont know about to make it save there to? One way is to make the player manually copy a mass of code (variables) from a window in the game, into the textfile. Any way to write from flash to a textfile?

I know these other two ways of "saving".
1. Using cookies to save and load.
2. Using an online database of some sort to store/load variables.
But they're for online flash applications only... So I'd rather not use them.

View 5 Replies


Similar Posts:


Flash :: IDE - Empty Cache And Cookies Without Losing Every Save

Nov 17, 2011

there was that update that made it so you cleared flash saves out whenever you cleared your browser's... what was it, cookies or cache? I'm looking it up but Google is being shockingly unhelpful, only giving me advice from the Flash 8 days. The thing is, I would far prefer to manage my flash saves manually. I know that's not the universal preference, but it prevents me from losing saves when developing, and prevents me from losing game saves for that matter.

But I would really like to clear my browser cookies and cache! It's really getting gummed up in here. So my question is: is there a user-friendly way to manage flash saves directly? Is there a way to empty my cache and cookies without losing every flash save I have?

View 2 Replies

ActionScript 2.0 :: Save/Load Variables To .txt

Dec 21, 2006

I know Flash applications cannot store data locally for security reasons, however, Macromedia has addressed this issue:

[URL]

But I don't understand that at all...

So, probably using what that link says, what's the best (easiest on the user) way to store data to a consenting user's computer? I don't mind if it has a prompt for permission, but it should not rely on too much software that nobody has (java and shockwave seem ok). The goal would be to store data across sessions, so that it would remain available if one returned to the application after closing it and going offline.

This would be useful for saving a character's HP, experience, and location variables in a game for example... possibly ending up with a .txt file that looks like:

name: Aesir
level: 2
exp: 50
zone: Cave of the Poo
x coordinate: 10
y coordinate: 30
gold: 5

Or something simple like that.

View 3 Replies

Flash Won't Save Cookies + Global Settings Manager Broken

Aug 30, 2009

I've had a problem which has been persisting for a long time now - Flash won't save any cookies to my computer. Originally I thought that it was my security settings, and indeed when I went to the global settings manager I clicked the "unlimited" option for data saves and allowed this for all sites. But when I reloaded the page the changes hadn't been saved. No matter how many times I clicked on the options to allow cookies and give unlimited data storage, whenever I came back the settings had reverted to default, as I had found them originally.

And when I went to C:/Documents and Settings/[user name]/Application Data/Macromedia/Flash Player#SharedObjects/ I found that there were no folders there, for none of the sites that I had visited.

This problem persists on IE, Firefox and Google Chrome. I've shut off all adblockers, all firewalls, all anti-virus software, uninstalled and re-installed Flash twice and still nothing. I'm at my wits end. I'm running Windows on a PC.

View 1 Replies

ActionScript 3.0 :: Variables Kept In Memory / Cookies

Sep 1, 2009

I have a swf that connects to a server through an as file, which appears to be holding some variables in memory or something so that it works fine the first time it loads, but when I load the page again, either the browser or the player is not clearing out the previous values. I don't know if there is a way to make sure that the swf when it loads makes sure not to keep the values held in the cache.  It actually appears that the only way around my problem is to clear the cookies for my site and then reload.url...

View 3 Replies

ActionScript 2.0 :: Save And Load Data To And From Variables - Reading From And Writing To Textfiles

Nov 26, 2003

I need to save and load data to and from variables. I know how to read from text-files, but not how to write to them. The text-files should work as a "database" for the high-score in a game, I cant use php cause the computer running the game wont be online all the time.

View 6 Replies

Professional :: Save The Games Marks

Aug 8, 2011

'm currently develop a flash game but i don't know how to save the games marks so thatthe user can display it when the games was over.

View 5 Replies

Flash :: Save Games Progress Offline?

Dec 4, 2009

it does of course save the flash/game cookies to the macromedia folder but, what if i want to reformat? how would i, on reinstall of windows reload my game progress? theres gotta be a way?

View 11 Replies

Flash :: Save Peoples Progress On Games Onto A Site?

Oct 19, 2011

I know there are sites out there when you log on to their account they can play swf games or otherwise flash games on the site so whenever they go to another computer they can continue their progress without restarting just by logging onto their account.

View 1 Replies

Xml :: Flash Games - Prepare Swf Files Like An Image Gallery And Receive XML Commands To Load It?

Jan 13, 2010

I know Flash developers have done Kiosks and renovated arcade games. "Come on, we see Flash everywhere."Can I prepare my swf files like an image gallery and receive XML commands to load it? Where do I start? Flash/After Effects skills have got me through so far,

Criteria

TCP/IP socket connection
Flash package
XML commands load swf file in to a container

How do I prepare my Flash files and XML sheet to receive commands "any sample out there"?What about e.data,urlLoad ,xmlSocket Class, XMLCP/IP XML socket connection to load ?Is binary or XML method better for loading and reloading swf files?Do I need Red5 or a media server?

View 1 Replies

Php5 :: Stress And Load Test Flash Games Like Mafia Wars, Farmville?

Jan 5, 2012

We're devoloping a flash game which have a php and mongodb backend.. It's kinda like FarmVille and other zynga games.How can we make fully load test to cover possible performance issue earlier?

View 2 Replies

ActionScript 2.0 :: Save Some Variables In A *.txt Or *.xml?

May 15, 2002

I want to save some variables in a *.txt or *.xml. Is this possible with Flash 5??

for example:I have 2 vars:

varA en varB. They are placed in the root.When I hit a button I want them to be saved on (p.e.) C : gamessave.*

View 2 Replies

ActionScript 2.0 :: Defining Variables - Unique To Load SWFs Instead Of Declaring All The Variables

Mar 21, 2012

I have an empty SWF that's sole purpose is to call loadMovieNum and start the project. Each loaded movie has a few variables defined within them - unique to those loaded SWFs. Instead of declaring all the variables in each SWF can I declare all of them in one place, in the first frame of the empty loader it all starts from? I'm thinking I can then declare a variable which each loaded movie can increment as needed for me.

View 2 Replies

ActionScript 3.0 :: Save Variables To Be Used Out Of Events And Functions?

Feb 23, 2010

I'm working on a project for school which is requiring me to make a game using Flash and ActionScript 3.0. One of the tasks I have to do is load an external XML file that will be displaying questions and answers. I've looked at google to find simple scripts for loading XML, one example being below:

Code:
var myXML:XML;
var myLoader:URLLoader = new URLLoader();

[code].....

View 1 Replies

ActionScript 3.0 :: Load Data From Different Variables - The New Variables Come Back As Undefined?

Jun 15, 2010

I'm writing code that takes data from mysql that's processed by a PHP script. It's actually a bit bizarre, at least to me. Anyway, here's some basic AS3 code that's moving toward what I want to do:

var loader:URLLoader = new URLLoader();
var urlRequest:URLRequest=new URLRequest("receive.php");
urlRequest.method=URLRequestMethod.GET;[code]....

For some reason, the statement "trace(evt.target.data);" produces a whole pile of garbled text before the actual stuff that it's supposed to show Because of problem #1, I've had to include a throwaway variable at the beginning, otherwise the first variable I try to pass into AS3 comes back as undefined. This causes errors when I run my flash movie in the IDE, but when I run it from the browser it doesn't seem to have any effect.But this is the strangest thing of all whenever I make any changes to the database (and subsequently try to load data from different variables), the new variables come back as undefined. For example, let's say that I add another entry to the database, and decide to load students 2, 3, and 4 instead of 1, 2, and 3. When I do that, any new data I've added comes back as undefined, even though when I view the PHP output in my browser, it looks just fine.

And now for the REALLY bizarre part: I'll copy that output, paste it into my PHP script as an echo statement, comment everything else out, and my flash movie runs fine. Even though the output from the PHP script is exactly the same, it gives me errors.

View 9 Replies

Uses Php To Save Variables To Web Folder On Site In Text File

Dec 2, 2009

I have build a flash form that uses php to save variables to a web folder on my site in a text file. There is a .swf file with dynamic txt fields in the same folder it which pulls the data from the txt file. It doesnt seem to pull it as real time as I would like. sometime just once and not after that.When I update the form the text file saves to the web folder ok, but I have to refresh the link to pull the data in or empty browsing history etc.is there a way around anyone can think of so everytime I update the flash form the data come in straight away or after a few seconds.

View 5 Replies

ActionScript 3.0 :: Input Text: Save Pieces In Different Variables?

Jan 17, 2011

I have an input textfield where the user can enter a long string of numbers, seperated by spaces. Example of this is "2 4 10 20". I made the textbox and made sure it only numbers and spaces can be entered. However, I am looking all over google for a way to split these numbers and save them in a different var when a space is encountered. I don't really know how to even start doing this.

saving in vars does not have to happen in runtime, but only when a button is pressed.

is there also a way to prevent the user from entering a space right after another space?

View 4 Replies

ActionScript 3.0 :: Save/store Variables To Be Used Out Of Event Handlers?

Feb 23, 2010

create, save, or store variables in event handlers (or functions invoked in them), to be used outside in the main body of a program. I am working on a project that is requiring me to load an XML file and then manipulate certain children in the file. Basically I'm trying to make a question and answer post with the XML storing the actual question and answers, also I'm trying to read in the max number of questions the XML file holds, and any other information. My problem is is that data stored in variables during the event or the function invoked due to the event isn't saved afterward.Here's a simple code from a site on google dealing with loading XML below for reference:

var loadmyXML:XML;
var myLoader:URLLoader = new URLLoader();
myLoader.load(new URLRequest("test.xml"));
myLoader.addEventListener(Event.COMPLETE, processXML);

[code]....

After the event is processed loadmyXML is emptied, so using it in the main body is pointless since the object doesn't contain any data. In C/C++ you'd have to pass objects by reference in order to modify them for outside use, but I haven't seen ANY syntax to show how you'd do that in events here. Like I'd prefer to save loadmyXML, store loadmyXML.questions.length() in a variable also, etc.

It's been a long time since I've used global variables in C so I've forgotten how they really work, but couldn't you just address them / change them inside of a function without ever calling them and it would reflect outside in the main program?

View 8 Replies

ActionScript 2.0 :: Save Data From The Game(like Variables) To A File?

Mar 22, 2011

how can i save data from the game(like variables) to a file that is in my folder and read the variables from it when i open the game it will read the data from the file(save/load data to a helper file in the game's folder)is there a way to do it?(even with shared objects,as long as it use a file that is in the game's folder)

View 6 Replies

ActionScript 3.0 :: Grab Information From A Text File And Save Them In Variables?

Jan 4, 2012

I got a request today conserning .txt files.What I want to accomplish is to grab information from a text file and save them in variables (or an array, depends).Whats the best way to do this, and whats the do's and don'ts?I'm planning to use the LoadVars class to pass the variables through and i've got a working test, but isn't there a more efficient way to do this?

View 9 Replies

ActionScript 3.0 :: Load Variables, Remembering Variables

Nov 19, 2008

I am trying to load variables from a text file, and have them available from then onwards in the movie, globally so to speak.

While I can read the variable values in a loader function which executes when the text file is loaded, I don't seem to be able to keep those variables available afterwards.

View 10 Replies

.FLA Takes Forever To Save / Load?

Mar 30, 2010

I'm having a brutal time with a FLA. The wait time to open this thing is ridiculous, and alot of the time the program will just become nonresponsive. Its only this one specific file, as others open fine. It also has nothing to do with the hardware on my system, as we've tried the file on a variety of machines.The FLA itself contains very little bitmap art, most is vector. It's about 16mbs, but publishes down to a SWF thats about 300kb. There were some complex vector elements which were removed in a fruitless attempt to get this thing to move faster. Trying to "save as.." results in flash writing to a file extremely slowly. The resulting file will progress in size from 2 - 4 mb with about 10 minutes wait time in between. Its becoming nearly impossible for us to work in the file. how I could debug Flash itself to find out whats going wrong on load/save?

View 3 Replies

Actionscript 3.0 :: Load PDF And EDIT And SAVE?

Sep 2, 2011

I have a project that requires me develop an application that will load a PDF file, manipulate and edit it then save it as PDF file again.

View 4 Replies

ActionScript 2.0 :: Save/Load Using Php And MySQL?

Oct 27, 2004

save/loading with Php and MySQL. Every user should have hes own save under hes username and password.

View 1 Replies

ActionScript 3.0 :: Save And Load Function?

Nov 24, 2009

So lets say I have a online game where I will have everything that is going on in the game, assigned to variables. I want people to play the game from their own computers through the website and I want them to be able to save and load their place in the game.f this is the first time they have saved, it will ask them to make a login and a password.ll of the data should be stored on my server

View 3 Replies

ActionScript 2.0 :: Save / Load Using Php And MySQL?

Oct 27, 2004

Iw allready done the register and login thingy now save/loading with Php and MySQL. Every user should have hes own save under hes username and password.

View 1 Replies

ActionScript 2.0 :: Load A Big Load Of Variables Into Flash?

Oct 29, 2009

What is the best way to load a big load of variables into Flash? There must be a way to do this withLoadVars and a for-loop.my txt file:

Code:
&prijsvraag_titel=Title of the prijsvraag&
&aantal_vragen=3&[code].....

View 1 Replies

ActionScript 3.0 :: How To Load And Save Local SWF File

May 23, 2010

I know it's possible to load and save a local file using CS4 and Flash Player 10, but my question is if I can load a SWF local file without using 'browse' and 'load' methods and then save it. I really pretend to "copy" a specific SWF local file into another folder on my HD and I think this is possible loading first this file and then saving it. For this reason I don't want the dialog box appears (with browse method). ('maybe with 'Loader'?)

View 2 Replies

Actionscript 2.0 :: Save And Load Character Script

Jan 28, 2009

I'm almost retarded, but I understand the basics of ActionScript 2.0. I'm busy with a game. Now I'd like to save characters, and later on reload them again. The characters will be composed by drag&drop scripts. Where haircolor, face, eyes etc. can be chosen. Now my problem is: I really haven't got a clue what this is called, save and load? Or where to start at all

View 2 Replies

ActionScript 3.0 :: Load / Save Variable To Computer

Jun 11, 2010

I need to know how to save and load a very small amount of variables to a computer running my swf file. It is so that a person can keep their progress in a game if they decide to close the .swf and reload it later. It has nothing to do with a server. The most related thread I have found was [URL] but it has no solution.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved