• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Saving textfield input

Guest
Apr 08, 2012 Apr 08, 2012

Copy link to clipboard

Copied

Hey,all.

I posted this question in a different form yesterday but as it's changed I've reposted it with all the info.


I'll explain a little before asking my question ... I've created numerous games which load and unload off a main menu.


The player enters their name on the main menu before playing any games and when the player completes a game I want to save their time (taken to complete the game) and unload this time back into the main menu.


Is there any way of saving the times using AS3 to a word document or something like this? I can't send the times to my website with php because the games will be used within a competition and it all needs to work with the internet.


Any ideas guys?

TOPICS
ActionScript

Views

664

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 08, 2012 Apr 08, 2012

Copy link to clipboard

Copied

you can use a sharedobject to save data to the user's computer:

var so:SharedObject=SharedObject.getLocal("antb90");

so.data.game1time=whatever;  // to set data.  use an if-statement to check is alredy defined.

so.flush();

.

.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 08, 2012 Apr 08, 2012

Copy link to clipboard

Copied

Hey,

Is the antb90 something to do with the name of my computer?

Say my main menu is called MainMenu.swf and the first time is called GameOne.swf.

Would the code look like this?

var so:SharedObject=SharedObject.getLocal("Ant");

so.data.GameOne.swf=whatever;  // to set data.  use an if-statement to check is alredy defined.

so.flush();

Also what does the text whatever need to be replaced with?

Thanks for the reply.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 08, 2012 Apr 08, 2012

Copy link to clipboard

Copied

LATEST

check the flash help files, as3 classes, SharedObject. 

there's sample code and more.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines