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




*Save Game*



How can i make the game save? I want hp and happyness stages save. On a server not on a persons pc. That way everyone can load it not just one...

what im trying to do is make a feedable online pet. they feed it and play with it. then they click the pet to save what they have done.

and to go back into it they have to click the pet to load it. *no pass*

How can i do that? please explain step by step.

Thank you.



FlashKit > Flash Help > Flash MX
Posted on: 08-20-2007, 11:20 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Needs EXPERT Help: 1. Save Game For Replay, 2. Reset Game
I'm rather new to Action Script, but doing not bad. I have searched the Board, found a link to a tutorial on ActionScript[Org], titled: "save a local copy of file". But that was yet not clear enough for me.

2 Questions at the moment (files attached):

1. Save Game for Replay: How can I save the set to a file in the Same Folder so it could reload for further play from that point on?

2. Reset Game: How can I Reset the Game for a NEW Attemp? I need to remove all Actors at once, to start a new game, without closing this SWF and reopenning it.

If you'd be so kind as to explain very clearly, and add Action Script, taking into consideration that I still get confused by trying to deal with Arrays and so. I promise to study your lesson carefully - this GameTest attached is the fruit of this week studies.

THANKS A LOT
Nit Kalish

Save Game/load Game
How do you get the browser to remember all the variables and what point you're in on the timeline when you press "Save Game," and how do you get it to reload those variables when you press "Load Game." Is this some extremely complicated process?

How To Save A Game And Load A Game?
I don't know the codes that can make a game can be saved and be loaded. I have been trying out some codes but they doesn't work. So, can anyone help me please? Im using Flash MX 2004 and Im doing a standalone game.
So, how to make it? Can teach me step by step? Please??

Save Game?
how can i get a save game button? i need to make the game to where it has ONE save file and nothing more... then i need it to where when they click a "button" it loads the file with no pass or anything... help?

Save Game
ok, i want this to happen when you press a button:


Code:
on (press) {

displays mc1,
Saves game
gets rid of mc1,
end.
and:

Code:
on (press) {
quits game
}
i need some help on how to do that, please, tys!

Save Game
I have been reading many tutorials on how to save scores using sharedObjects but I need to know if it is possible to save a game to a particular frame. I am creating a game that has three levels (complete level and move to next, no scores) and I want the user to have the choice to save at the end of each level and come back later when they sign in. Any suggestions?

*Save Game*
ok i want to save like hit point and happiness points to a file on my server. to where they login and they start from where they were at.

What im doing is making an online feedable pet. but i need it to where the click the pet to login *no pass* and then feed the pet, play with the pet, click the pet to save what they did then come back later to find they need to feed it again. i dont have knowlege in php to do that but i figured i could make a save file for flash... how do i do that? i know it can be done... i just dont know how.

Please explain step by step.

Thank you.

Save And Load? For Car Game?
can you help me on how to have a save and load for my game (yes i know there is a games board but i need actionscript)

is there a way to do it only useing txt files with no external files(php pl asp)

Please Help - Save As Jpg In A Colouring Game
I have a colouring game, is there any script that can let u save the current pic as jpg when u finish playing and colouring the object?

Please help ><

How Could I Make A Game Where U Can Save?
Im thinking of making a game (Maybe an RPG) and i want to know if it is possible to make save points.

PS. Go to http://www.sfdt.com to see some really funny flash animations of stick figures doing loads of funny stuff.

PPS PPPPLLLLLLLEEEAAAASSSSSSEEEEEE help me

Save Game Files
I want to allow users of my game to save their game onto their hard drive.
How do you create a file on their drive and also can it not be stored in the way flash reads variables:
var1=1&var2=2 etc.......
we cannot have that it is too easy to cheat and change things around...
any help, suggestions, or example code is greatly appreciated!

Save Game Progress?
How can I make my game have multiple save slots so that people can save their game, exit and leave, then come back and resume where they were? Note: I would like it to remember when saved which frame the SWF was on, and which frame a movie clip was on. Thanks for looking!

[F8] SharedObject, Save Game
Yeah anyone got a good tutorial on how to use SharedObjects. What I'm aiming to do is make it so like you load a flash file from a webpage with _global.blah = 0; so you press a but which changes _global.blah = 0 to 1 and this is then saved so the next time you load up the file that _global.blah will still = 1.

Catch my drift?

Save Game Problem
I have made a game .I want to include a save game option in my game.
When finish one level ,player can save the game.The player play the game any
time after last.

Save And Load Game Variables
Alright im making a game you can check it out here www.samari.co.uk/zed/fighter2/

and i have about 20+ global variables that keep track of everything. How can i make it that users can SAVE all the variables to a cookie, and when they come back, LOAD all those variables again to play the game.
Lets just say the variables im working with are like this

Code:
_global.name = john;
Can anyone help me?

How Can I Do SAVE/LOAD Buttons To My Game?
HI!
I need help to make Save/load buttons to my
game.
Please can some one help me?

How To Save Game In Flash Games
Hey, everyone!
I'm new in action scripting so can anyone please explain how to use this code/tutorial (i got off the internet):

Ever wanted to know how to save your game on a local PC? It can be done using shared ob's.

Object.prototype.setCookie = function(c, n, v) {
var so = SharedObject.getLocal(c);
so.data[n] = v;
so.flush();
};
Object.prototype.getCookie = function(c, n) {
var so = SharedObject.getLocal(c);
return so.data[n];
};

Just let this code run once, and it will do the job (please don't ask me how it works, I don't know, it just works)

Now we can use two functions:
getCookie("name","itemname")
setCookie("name","itemname", var_to_save)

of course name stands for how to call the file, itemname is the subject in the file (you can have as many as you want) and when saving a variabele, it needs to know what to save.

As you can see, you save 1 variabele at a time. In a game, many variabeles influence the progress and need to be saved. I'm working on a game too and didn't want to save each variabele at a time.

This is where arrays come in handy.
Just think of an array as a database, it contains as many variabeles as you want.

You can declare an array in 3 ways, I use only one, because it give's the array's subjects ogical names.

_root.database = new Array(name, age, sex);

Now you have a database Array wich contains 3 variabeles.
You can acces these variabeles using _root.database.name.

After asigning vars to it, you can export it using

this.setCookie("database","item1",_root.database)

and reload it using:

_root.database = this.getCookie("database","item1")


So can anyone please explain this to me?
Thanks!

*Save Game* (Remake/rethought/redone)
OK earlier i wanted to make it save data to a file on a website. Now all i want it to do is save to cache... Local file object share. Thanks For the upcoming help.

How Can I Make My Flash Game Save Data?
I want to make this game, but I need it to be able to save your progress. How can I do this?

[Help] Serialize Class Into ByteArray For Save Game
Hi guys

Got an interesting one for you here.
I'm working on a game which is going to need a save game feature. I know how easy it is to write save game data to a cookie but at the same time I've heard how easy it is to edit the cookie and cheat!

All the main data and variables for my game is held inside a class. I've heard its possible to serialize a class into XML, encrypt it and save the encrypted string to a cookie. Then when you load the game you just decrypt the string, and reload everything back into your game variables class. Can anyone give me a few pointers on how to do that cos I'm not too familiar with byte arrays, and serializing, etc.

I was checking out this tutorial on how to convert a swf into a string, and I'm assuming its a similar procedure.

http://board.flashkit.com/board/showthread.php?t=731822

But I honestly haven't got a clue where to start. If someone could help me out here or give me a few pointers, I'd really appreciate it. Or if you know of better ways to solve the problem then I'd love to hear any suggestions you have. Thanks!

Making Save Game Function With Action Script
I have a problem. Please help! I`ve just made a game. I want the game to have the `save game` function. But I don`t know how to use Action Script to write information to a txt file to somewhere in c:. So I wrote a Pascal program to write the txt file. And then I use `fscommand` to `exec` the Pascal program. This method is very tedious, right?

So, would you please tell me if there are any simplier methods to write a txt file to the secondary storage by Action Script? Can `fscommand` do that?

Making A Play, Save Or Load Button In Game
How can I make a save game and load game buton?

FMX: Save User-drawn Objects And Save/load DXF/DWG?
Hey everyone. Sorry to seem like a leech, but I could really use the guidance. Usually I'm pretty good for finding the solution on my own without having to trouble people, but this time I seem to be coming up short. So thanks in advance for taking the time to read this.

I'm developing an auto-cad esque flash application (going good so far too). I have no problem storing object information in a database (xy coordinates, rotation, scale etc), but now my problem is converting that data to another format; specifically DXF or DWG. Now I know the flash environment itself can import/export DXF's, but I don't know how to load the user-made data into the environment. Is it possible to have the environment run actionscripts to build these user-made objects and then manually save that to a DXF? (or even better would be a save/load DXF from the flash player)

Essentially I'd need to know if it's possible for the flash environment to read from my database (probably from reading a PHP built XML file), execute actionscript to reconstruct any objects created, and then let me go and manually (or automatically!) export a DXF of that.

Any comments or help would be greatly appreciated =]


EDIT:

The other very viable alternative is if you guys know of an XML to/from DXF/DWG converter.

[F8] Im Going Gray By The Secound Save Me Somone, Save Me :(
Thanks for taking the time to have a look
This problem is driving me mad so i hope you can help, i will try and ex plane to problem as best i can.
programme :flash 8
i'm trying to load a external swf in a main motive use a movie clip holder, useing
loadMovie("name.swf", "_root.Mc_holder"); the move loads but the coding don't work( i.e. animation) the effect within the swf was made in action script 1 using Absolute and the motive is 2 using relative also the player setting on the swf are for player 6 unlike the movie which is 8
it does work if i use levels but overlaps on to the main movie which does'nt look great
and not what i need.
this is very hard to ex plane so any help would be great.
i will post some links if it helps please let me know
thanks

AS 2 Save Image With Open / Save Dialogue
I am wanting to use fileReference to open an OS save dialogue so my users can save jpgs to their hard disks.

I been trying to get this working but I can't can any one please give me some code or some idea how to get this working.

I just want to be able to click a button and the save dialogue appear asking where to save the file.

Thanks

Save Image With Open / Save Dialogue
Hi

I currently have a button that when click opens a new browser window so a user can right click on an image and save it to their PC using getURL.

Is it possible to have a button open the save dialogue box of the users operating system?

So as soon as the button is click the OS save dialogue box appears.

I'm using Flash CS3 but with AS2.

Thanks

Richard

E-card Save Capture And Save
I have created a drawing palette, now when the end user draws there picture I want them to beable to email it as an ecard.

any ideas


thanks

How To Save X-y Coords In One Array And Save'n'such
Hello evryone.

just fighting with those array functions in flash.

well, i have a mouserecorder "Paintthingy" which records the mouse coordinates into 2 array's, after that the arraydata will be saved over a php script into 2 textfiles.

works fine, but i have to open 2 url's for that and 2 seperate phpscripts to write x and y seperated in 2 files.

is there a way to save both x and y over 2 own identifiers in an array ? that would help alot, because i have to load that textfile after that, to put the textfiledata in the array again.

easily said it's a very simple paintprogram with save function so that after a refresh the last painting won't get lost.

check the attached file!

Save Button To Save Dynamic Mc's?
If anyone could help, I would really appreciate it.

Problem in short :
Working on interactive kiosk - have button that creates dynamic copies of my parent movieclip (picture of lion) The user would click on button to create copies and using "drag" move the lion to where she saw it on the map.

Once the lion "sightings" have been visally logged on the map, and need to be able to give them a "save" button to save what you see on screen.

Because this is created dynamically by the user, I need a way for the user to save it at runtime.

How would one go about this?
p.s I need to be able to show the new saved file from a remote pc.

Any help - you are my hero

Can't Save File And Can't Save As Either
Sometimes, usually after I've been working with Flash for a while, it won't let me save my work. I get an error dialog saying the file is opened read-only, or another user has the file open. What is most disturbing is that I can't even do a "Save As"--I get the same message. What's even worse, if I quit without saving, it deletes the file on disk! This happens with XP x64 as well as XP Pro.

Any suggestions?

Save File In Server And Save File In Clients Hd
i dont know how to do that using actionscript 5
i need 2 codes
one to write to the server a txt file
and other to write to clients hd
someone told me that you can do that, but i cant find it


if anyone can help, thank you!!

Was This Game Made From Flash ? (Zadarider) Download The Game
Was this game made using flash 8 because it seems to run very well even when i have made up to 10000 lines.

Flash Game Help The Game Runs Too Slow In A Browser
lo there!
I'am so frustrated!

I have made a plattformgame in flash, and after I had published it I tested it (local) when it was embedded in a browser, and it hacks and laggs! But when I play it in the flash player it works just fine.
What should I do?

I removed all the heavy graphics, lowerd the fps to 30fps and removed all the code so now its just the bassis left (gravity, collision, key checking etc. and yes u should bounce on the walls giving a wall jump effect).

Anyone please! I am in big need of help!
Is it my code? Did I publish it wrong?

here are the links:

http://smh03.lbs.se/smh03niklas/prof...ofilbollen.swf
http://smh03.lbs.se/smh03niklas/prof...ofilbollen.fla
http://smh03.lbs.se/smh03niklas/prof...filbollen.html


//Qui

How To Disply Time In Game And How To Stop After The Game..
Hi all,

i need help on drag and drop game...

i have done the drag and drop function, for this game timer has to be shown, after user finishes the drag & match, it should give finish alert and time taken for this game (please tell me also how to stop time after he finish the game) is to be sent to some external file or some database...

can it be done?
i have attached the .fla file also..

[F8] Game Studio Needs Flash Game Programmer
Hi -

I've been working on cartoon Flash interfaces for awhile. Now my clients want games, so I'm looking for one or two Flash game actionscripters who can help out and maybe start a studio. Since it's a startup, I'm looking for someone who's good, but not yet making millions - hoping we can do that ourselves eventually. Someone dependable, easy-going and easy to get along with. Would be great to find someone relatively local, but not absolutely necessary.

We'll be creating custom Flash games for an existing client.

Hoping to check out people's games first.

J.

[F8] How Can I Make A Game With Levels And A Game That Restarts?
I know this sounds stupid, but I just can't figure it out. I need to make a platform game. I'm fine with making a points system and a scrolling background and it functions but I don't know how to get the player to touch an object, or reach a goal and then transport to another level...I don't want to make the user have to click something to go to a new level.

Also, when the character hits an enemy, I can make it die, but I don't know how to make a button or something appear saying 'Game Over - Try again', so they can pretty much restart the level.

Hopefully someone can help me.
Regards,
Andrea

Help With A Game.. Game Is Running Slow In Browser..
I am working on this game for work and for now all i have is placeholder art for the most part and nothing very heavy on the graphics end yet my game is running very slow.. i bumped the FPS to 60 since at 30 i was getting image tearing or a double vision effect.. the upped FPS fixed that but the game is still running very slow. To give you an idea of what's going on i have different intervals running so different things can happen at different times.. there are 2 constant onEnterframes for the 2 enemies flying around the screen.. there is 1 for the main loop, 1 for the character, 1 for whenever tickets generate which removes itself and deletes the enterframe when they disappear, 1 for the wrecks that occur on level 2 which also remove themselves and delete enterframes for themselves, and 1 for a holder that handles all the money flying in which removes themselves as they collide with the player or leave the screen. All enterframes that run during gameplay delete themselves at the end of each level and re-initialize at the beginning of the next.

I can't figure it out.. please take a look at the fla and html files attached. Could it be just the sheer size of the game screen.. should i make it about half the size?? I appreciate any help and thank you.

Also the game's scripted animations seem to be running a little choppy if you watch their movement closely like there is a little glitchy jump every second or so.. is this fixable?

AS Help Needed In Game(i Will Give Credit In Game If You Help)
ok so basicly this is my game so far
23.swf

my probelm is that i want to make my charcter a flame and the tips of his head will move depending on the direction you are going.
So here is basicly this what its like

Moving left-Flames bend to right
Moving left and down-Flames bend at an angle between the left and down
Moving Down-Shorter Flames
Moving Up-Stretched Flames
etc...

ill put borders on after i get the flames down

Updating Game Stats During Game
B"H

hi - happy new year

i have a small problem - i run a college sports website - i want to update game stats during the game and ppl would go my website and access the stats as i type them - they are in microsoft database and i have php cgi flash mysql on my server (just not asp) and i want it to be that as i type the scores and then switch cells w/o uploading the new file - flash could still access the files from my computer and update the page auto - (it could load the files from my i.p. addy)

what is the best way to do this - do you have any examples?

thanks

yechi

[CS3] Snake Game, Game Size
I'm using this snake game code from the old Nokia phones. The game takes place in a 150X150 square, i want this to be 384X512 but ideally it would be in a var so it can be changed easily. Can anyone help?


PHP Code:



var unit = 15;//size of snake partsvar uwh = 20;//?var canMove = false;var dir = 2;var score = 0;aPieceList = new Array();mouseListener = new Object();mouseListener.onMouseDown = function(){    if (!canMove)    {        canMove = true;        startGame();    }};Mouse.addListener(mouseListener);k = new Object();k.onKeyDown = function(){    var k = Key.getCode();    if (k == Key.UP && dir != 2 && canMove)    {        dir = 0;        canMove = false;    }    else if (k == Key.LEFT && dir != 3 && canMove)    {        dir = 1;        canMove = false;    }    else if (k == Key.DOWN && dir != 0 && canMove)    {        dir = 2;        canMove = false;    }    else if (k == Key.RIGHT && dir != 1 && canMove)    {        dir = 3;        canMove = false;    }};Key.addListener(k);function addPiece(){    var p = this.attachMovie("piece", "piece" + aPieceList.length, aPieceList.length);    p._x = aPieceList[aPieceList.length - 1]._x;    p._y = aPieceList[aPieceList.length - 1]._y;    aPieceList.push(p);}function moveFood(){    var moveIt = true;    while (moveIt)    {        food._x = Math.floor(Math.random() * uwh) * unit;        food._y = Math.floor(Math.random() * uwh) * unit;        moveIt = false;        for (var i = 0; i < aPieceList.length; i++)        {            if (aPieceList[i]._x == food._x && aPieceList[i]._y == food._y)            {                moveIt = true;            }        }    }}function gameOver(){    delete this.onEnterFrame;    tScore.text = "You Lose.  Score: " + score;    canMove = false;}function startGame(){    for (var i = aPieceList.length - 1; i >= 0; i--)    {        aPieceList[i].removeMovieClip();        aPieceList.pop();    }    score = 0;    var p = this.attachMovie("piece", "piece" + aPieceList.length, aPieceList.length);    aPieceList.push(p);    p._x = 10 * unit;    p._y = 10 * unit;    var food = this.attachMovie("food", "food", -1);    var c = 0;    moveFood();    var startingLength = 3;    for (var i = 1; i < startingLength; i++)    {        addPiece();    }    this.onEnterFrame = function()    {        canMove = true;        tScore.text = score;        for (var i = aPieceList.length - 1; i > 0; i--)        {            aPieceList[i]._x = aPieceList[i - 1]._x;            aPieceList[i]._y = aPieceList[i - 1]._y;        }        if (dir == 0)        {            aPieceList[0]._y -= unit;        }        else if (dir == 1)        {            aPieceList[0]._x -= unit;        }        else if (dir == 2)        {            aPieceList[0]._y += unit;        }        else if (dir == 3)        {            aPieceList[0]._x += unit;        }        if (aPieceList[0]._y / unit == 20)        {            aPieceList[0]._y = 0;        }        else if (aPieceList[0]._y / unit == -1)        {            aPieceList[0]._y = 19 * unit;        }        else if (aPieceList[0]._x / unit == -1)        {            aPieceList[0]._x = 19 * unit;        }        else if (aPieceList[0]._x / unit == 20)        {            aPieceList[0]._x = 0;        }        if (aPieceList[0]._x == food._x && aPieceList[0]._y == food._y)        {            score += 10 * aPieceList.length / 2;            moveFood();            addPiece();        }        for (var i = 1; i < aPieceList.length; i++)        {            if (aPieceList[0]._x == aPieceList[i]._x && aPieceList[0]._y == aPieceList[i]._y)            {                gameOver();            }        }    };}

Card Game (turn-based) - Lobby Room And Game Room, Maintain State
Hi all, I´m new in this forum, since now i appreciate for any help.

I´m developing a turn-based card game in Flash 8 (multiplayer), using the concepts of lobby and room. In this case when the user login de game, he always see the lobby, where he can choice the games, then the user selects a game in a dataGrid and enter the game.

Inside the game (that resides in another frame in my .fla), there is a button that when clicked brings de users to the main lobby ( gotoAndStop(“lobby”) ) so that the user can visualize the lobby with the game running in background with the others users.
The problem is when the user return to the game ( gotoAndStop(“game”) ), the images, cards, players name and chat history text disappear, all the game object disappear, remaining only the original graphics (movie clips) to the game room.
In fact, I need a solution to maintain the state of the game when the user decide to visualize the lobby (with the game running) and after return to the game.

Thanks for any help.

Regards,

Luiz Filipe (CURURU)

Os: Sorry for my bad english -

Game Control Panel --> How2make Object Appear In Control Once Discovered In Game
Hey all you flashies,
here's a problem to scramble the flash nerves. I'm creating a game for my Major project and I want to have a control panel at the bottom. The aim of the game in brief, is to collect 6 pieces of fruit (just an example). These 6 pieces of fruit will be found in different order depending on which route the player takes in the game. What I want to happen is each time the player finds a fruit, I want it to appear in the control panel. How do I go about doing this? Can anyone help? Much appreciated! If anyone has an example to something similar to this it would be much appreciated if I could see it! thanks!

My Game....matching Game.
this my example for my game that i have create,can anyone help me and what really wrong with my game,coz the picture not appear went i execute this file.......really need help on this

[F8] Tips On This Game?(my First Game)
I'm making this here game where you walk around a shop, check out the games and movies etc... in the aisles and if you want to buy one, a form gets sent to me. Also there's a TV room with some videos and arcade room with flash games. I did this cause i'm selling my games and movies etc... and i thought this would be useful.

So any tips about how to improve it? what more to add?

Game Help(project Game)
Ok I make a simple game but I need more people in my game project take me contact in e-mail.Now I show what people I need.First I need good actionscripts people.I need only good actionscripts people ty and goodbye.

Save
Imagine...

A drawing tool created with the help of Flash5 and ActionScript. The user clicks a tool to draw a square. He then clicks and drags on the drawing area and creates his first square online.

Being the possessive and egomaniac freak he is, he now wants to save that square, so that whenever he visits that drawing tool, he can login and then open and gloat over his previous creations.

Can anyone help me with the "Save" part.

This is my first time on any kinda discussion board. That explains the length of my post.

Save An SWF
Is it possible to create an SWF that is capable of allowing the user to change the appearance of the background, for example, in the browser using the SWF and send back the changed file.

SAVE ME I NEED YOUR HELP
first off how do u rename a .exe to a .zip ??
second how do u make lightning with flash 5??
third how do u make a screen that requires a password in flash 5??
please help!
ShockA X

Copyright © 2005-08 www.BigResource.com, All rights reserved