Php :: Flash - Saving Variable Imported From SQL Using PHP Into SharedObject?

Feb 14, 2010

I am creating a game which uses the sharedObject to save each players progress locally. It also connects to a central database to create an online scoreboard. When a user inserts a score for the first time a unique ID is sent out of the database to the swf and saved as part of the sharedObject data.Absolutely everything works and the ID is saved to the sharedObject, however when the swf is restarted the ID does not load (even though the other variables saved in the sharedObject do load).I think it may be to do with the way it is formatted, perhaps to do with the XML but I'm not sure.

FLASH CODE
function saveGame(currID:Number) {
gameInfo.data["playername"+currID] = playername;

[code].....

View 2 Replies


Similar Posts:


ActionScript 2.0 :: MovieClip Table - Saving Variable With SharedObject

Jun 24, 2011

I am using a movieclip "table" that is attached on the enter frame event at the main scene. I am trying to save variable "money" and I use this code inside the movieclip, when I test the movie it shows me money1 as undefined and I cant find why! I have used _root. and doesn't work.

PHP Code:
var svar = sharedobject.getLocal("MY VAR");
svar.data.moneynew = money;
svar.flush();
money1=svar.data.moneynew;

View 1 Replies

Flash :: Saving Bytecode Of A Class (to SharedObject Or Database)

Mar 11, 2011

NOTE: I want to save the actual bytecode for the AS3 class, NOT an instance of it! A class is being loaded in externally and extracted via a URLLoader and then Loader.loadBytes. A single Class is then extracted out of that Application Domain and used in the project. Now, rather than saving the entire Loader (either via SharedObject or other means of storage) is it possible to "extract out" the bytecode of the needed class and all dependencies, which can then be "injected" back into an empty shell or something to be reused when needed?

View 2 Replies

ActionScript 2.0 :: SharedObject Not Saving?

Jan 21, 2007

got my code working, and all information i enter in to my sharedObjects is working correctly as it should but isn't saving so when I close and then re-open the flash file the data isn't there? Admittedly I'm new to sharedObjects I'm using the [.data.] when entering info and then [.flush()] at the end of the function - is there anything I've missed?

View 5 Replies

ActionScript 3.0 :: SharedObject Not Saving Data?

Aug 29, 2009

I'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].....

View 1 Replies

ActionScript 3.0 :: SharedObject Not Saving Data

Aug 30, 2009

I'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 Replies

ActionScript 3.0 :: Stopping SharedObject From Saving?

May 25, 2010

Is there a way to stop SharedObject from saving automatically when closing the window?

I'd like to have it only save when clicking a button.

View 3 Replies

ActionScript 2.0 :: Saving A Numeric Array To A SharedObject?

Apr 8, 2010

I'm saving several arrays into a SharedObject and I'm able to read them back fine from the SharedObject when the movie loads. However, one of these arrays contains numbers instead of strings, and the contents of this numeric array show up as 'undefined' when read back from the SharedObject.

View 0 Replies

Flex :: Upload Image Then Share Without Saving The File Using SharedObject Or Anything?

Jun 10, 2011

I'm currently working on a chat with uploading an image and sharing it. The problem is I can upload and display the image but I can't share it to the other side. Here is some code:

[Code]...

View 1 Replies

ActionScript 2.0 :: Create A Variable SharedObject Identifier?

Mar 10, 2010

I have a question regarding the use of variable identifiers when using SharedObjects, I will explain. I want to have the identifiers of a SharedObject as variable names, so: I create a variable: var destinationLoc = ["destination"+mySharedObject.data.numRuns]; I write to SharedObject: mySharedObject.data.destinationLoc=destination;

Unfortunately the above script does not see the variable, destinationLoc as a variable and instead views destinationLoc as a "hard-coded" identifier Is there a way to create a variable sharedObject identifier?

View 2 Replies

Media Server :: SharedObject.NoAccess Error When Trying To SharedObject.getRemote?

Feb 18, 2012

I've installed developer version of Flash Media Server 4.5 and trying to get remote object, but no matter how I call my object all i get is this error .I've rad configuration guide and it told me that I should set StorageDir for shared objects, enable RPC (<RPC enabled="true">) and allow shared object (<Allow>users</Allow> in <RPC> - <SharedObject> tags)

View 1 Replies

ActionScript 2.0 :: Saving With Variable In Variable Name?

Jun 3, 2010

I am trying to save locally into the users computer with a Shared Object, but have multiple variables to change and save using a function. I cannot seem to get the syntax correct for it to work.

This is suppose to check the variable names _root.levelcompletestatus011 through _root.levelcompletestatus070 and if any of them equal 4, then change them to 0 and save to the local file.

Here is what I have so far:

function templockopen() {
for (i=11; i<71; i++) {
if (eval("_root.levelcompletestatus0"+i) == 4) {
this["levelcompletestatus0"+String(i)] = 0;

[code]...

View 0 Replies

ActionScript 2.0 :: Use Global Variable In Imported MC?

Oct 21, 2004

I want to load an external .swf into my main .swf, it will contain a textfield. However, in order for it to know what to put in that text field, it must pick up on a variable main.swf_global.USERENTRY now in order for my mc user_output to display _global.USERENTRY, what must I do?

View 1 Replies

ActionScript 2.0 :: Using Global Variable In Imported MC?

Oct 21, 2004

I want to load an external .swf into my main .swf, it will contain a textfield. However, in order for it to know what to put in that text field, it must pick up on a variable. main.swf_global.USERENTRY now in order for my mc user_output to display _global.USERENTRY, what must I do?

View 1 Replies

ActionScript 2.0 :: Making An Imported Variable ( From Php ) Into A Number

Nov 2, 2004

im importing a few variables with this [code]but now how do i make a variable say root.cash into a a number which can be used in equations or used for logical compariosons such as < > ==

View 2 Replies

ActionScript 2.0 :: Making A Imported Variable ( From Php ) Into A Number?

Nov 2, 2004

im importing a few variables with this

Code:
myVars = new LoadVars();
myVars.load("getinfo.php?user1="+userN+"&pass45="+passN+"&random="+refresh1,"0");

[code]......

View 2 Replies

ActionScript 2.0 :: Easy Saving Of Variable?

Oct 29, 2010

I try to save some variable in a game with local Shared Object, that basically should go like this: after every completed level it sets the variable to that number of level (if not higher already); then i have a MC that reacts to that variable (set its frame number to the number in the variable) so you can select already completet levels.

Now i thought, this would be easier, and tried [not allowed link to some tech note from Adobe on local SO], but didn't worked so far.

View 3 Replies

ActionScript 2.0 :: Saving XML With Variable Filename In Php?

Jan 26, 2006

I'm trying to save an XML file on a remote server via an php file, and so far this works fine by following the tutorial on this site - exept one thing...I would like to define the filename of my XML file to be saved via php in flash dynamically, eg. so I can create several XML's from flash. But how is this possible ?- can an entry in the passed XML file be read in an easy way in PHP4 - or can I send a variable along with the XML object with some wrapping (maybee an advanced object).

View 1 Replies

ActionScript 3.0 :: SharedObject Error: Error #2134: Cannot Create SharedObject?

May 9, 2011

Gives me this error:

Error: Error #2134: Cannot create SharedObject.
at flash.net::SharedObject$/getLocal()
at as3_shared_objects/showVar()

[code]....

View 2 Replies

ActionScript 2.0 :: Dynamic Text Field - Movieclip "numbers" To GotoAndStop To The Frame Number Imported Via The Variable Daysleft

Sep 11, 2005

I have a movie where a variable named daysleft will be loaded from an external text file into a dynamic text box, this bit works fine. But I then need the movieclip "numbers" to gotoAndStop to the frame number imported via the variable daysleft. Although daysleft displays on the screen a trace(daysleft); says the variable is undefined.

View 4 Replies

Flash - Use SharedObject From An External Swf?

Feb 4, 2011

I have a slideshow that everytime you press a button show a new slide. Every slide is an external swf's that is being loaded in to the main swf. Inside every external swf there is a button that redirects you to another web page.What i would like to do is use SharedObject (or something like it) to remember wich external swf that was last shown when the user pressed the button redirecting them to an other page.How do i set the SharedObject in the external swf and then read it from the main swf?

View 1 Replies

Flash :: Set SharedObject Maximum Size?

Mar 8, 2011

Is there a way to set a (large) maximum size for SharedObject on my domain so that I can ask the user to allocate a size greater than 100k one time and not need to ask again, even if data is added?

View 1 Replies

Flash :: Sharedobject Don't Remember Data?

Sep 27, 2011

I have this code for sharedobject:

var mySharedObject = SharedObject.getLocal("republicofcode");
mySharedObject.data.clientID = my_vars.clientID;
mySharedObject.data.question = my_vars.question;

[code].....

View 1 Replies

Flash :: Persistent MP3 Player Using SharedObject?

Jul 2, 2009

I'm trying to create a persistent MP3 player using SharedObject. Initially I tried using frames and while it worked, frames suck so I continued looking into it.I came to find out about Flash's SharedObject. It seems easy enough but I can't nail down the logic correctly. I've attached a sample .fla for anyone interested to look at. I need the song progress to be stored and retrieved when necessary to keep the same song playing whenever links are clicked within the HTML page.

View 3 Replies

Flash - Creating Persistent MP3 Player Using SharedObject

Oct 8, 2010

I'm trying to create a persistent MP3 player using SharedObject. Initially I tried using frames and while it worked, frames suck so I continued looking into it. I came to find out about Flash's SharedObject. It seems easy enough but I can't nail down the logic correctly. I've attached a sample .fla for anyone interested to look at. I need the song progress to be stored and retrieved when necessary to keep the same song playing whenever links are clicked within the HTML page.
Here's a link to the .FLA - [URL]

View 1 Replies

Flash :: Setting Initial Position Using SharedObject?

Aug 8, 2011

I have created a simple audio player to play continuously even if the page is refresh it will play continuously.This is my code to store audio position in flash Temp memory

MySharedObject.data.audioPos = mySndChannel.position;
MySharedObject.flush();

MyProblem,When the player starts the sndPosition is null, so it was not playing. If I set some value, when I am refreshing it will not continue from the last position. How can I set the initial position to play from the start?

View 1 Replies

ActionScript 3.0 :: Flash Getting ObjectEncoding Of SharedObject (SOL File)?

Aug 12, 2010

Is there a possibility to find out which objectEncoding was used for a loaded SOL file? (The properity is always defaultObjectEncoding when not manualy set)

View 3 Replies

ActionScript 3.0 :: Flash - Use Sharedobject Into The Document Class Of The .fla?

Apr 10, 2011

Can i use sharedobject into the document class of the .fla?

View 1 Replies

Sharedobject - Creating A Pacman-style Game Using Flash ?

Sep 22, 2010

Creating a pacman-style game using Flash (AS3). There are 3 players competing to eat the most dots. Right now when one player eats a dot, on that player's screen the dot goes away (but only for a second) and appears again in the screen. The other player playing, doesn't see that the dot went away and reappeared.Using hitTestObject, when a player touches a dot, the dot should no longer be seen on the stage. I'm using shared object to create this multi-player game environment. I'm new in using SharedObject and also AS3.

public function PlayerSelect()
{
nc = new NetConnection();[code]....

View 1 Replies

Flash :: Flex 4.5 IOS Mobile Project: SharedObject Doesn't Seem To Work

Oct 27, 2011

I'm trying to use a SharedObject in a Flex 4.5 mobile project. The SDK I'm using is 4.5.1, and the AIR version is 2.6.0. I'm trying to locally store user credentials for my application using this piece of code:

[Code]...

View 2 Replies







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