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


Similar Posts:


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

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

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

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

ActionScript 3.0 :: High Score Table Setup - If Statement With Variable

Feb 9, 2010

I am trying to get a high score table set up and I have it all working except for an if statement which decides whether to put a zero in the time or not.
ActionScript Code:
variable declared at the top
var gap:String;

This is getting data that is stored - it works fine except for the underlined "gap" - The "gap" is meant to be calling the variable which has the below if statement
ScoreInputScore.text=String(SpotTheDifferenceGame._minute)+gap+String(SpotTheDifferenceGame._second);
if (SpotTheDifferenceGame._second<10) {
gap=(":0");
} else {
gap=(":");
}

I thought by have the variable called in in the function and having the if statement with gap= it would do the specified text in the dynamic text box. When I put a trace on "gap" it traces with the correct text depending on what the number is but in my dynamic text box it displays as number null number.
// displays like this when trace put on it
:0
// displays like this in dynamic text box
2null02

View 1 Replies

ActionScript 3.0 :: Table With Points - Sort Dynamic Texts Based On The Variable

Feb 10, 2010

Updated question: Is there a way to sort dynamic texts based on the variable (or simple value) they represent? Old dribble: I'm looking for some pointers for a problem with making a table. It may be that I have started off in the wrong direction - anyways, I'm stuck now. The .png displays my objects, and how they are connected/grouped. The highlighted (red) shows the variable containing the points.

The pink with the most points should be displayed higher than the rest, and 2nd most points should ofc be 2nd highest. I have tried taking the red variable out of the pink, but I could not think of a way of moving the red variable based on its own value. I'm going to edit the red variables (as the world cup goes on), and there is no need for cookies and such. And if there is a simpler way of doing the setup, let me know. I'm using SwishMax3 (SM2 up till a few days ago, so I'm more used to as2..)

View 5 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 :: 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

IDE :: Make A Table In Flash And Enable The Column Headers On The Table To Sort Column On Click?

May 4, 2009

How to make a table in Flash and enable the column headers on the table to sort column on click?I have seen some tutorials with mySQL but I'd like to start with something basic. Is a sortable table possible using just Flash and AS 2.0?

View 1 Replies

ActionScript 2.0 :: Saving A MovieClip To A JPG?

Jul 11, 2007

Does anyone know how I can take a MovieClip in Flash and save it to a form as a JPG. I know you can print a MovieClip so I imagine you can save one to a server. I'll try and do my best on explaining what I currently have and what I am trying to do:

I currently have a Flash piece that is a type of configuration tool for a product. Lets say its a Hat Configuration tool. A customer that comes to purchase a hat can change the color, size, stitching, text, fonts, images, etc... and when the are finished the can print their hat, which has all the information and the final picture of the hat as the configured it, or they can send the product via e-mail. Currently the send via e-mail just sends the information as a text file via an ASP process page. What I need to do is send the movieclip as an Image (JPG) to the server.

View 7 Replies

ActionScript 2.0 :: Saving MovieClip To EPS Or SVG Online

Apr 26, 2007

I've got some vector design that the user can change color, form, etc.. I want to be able to convert the movieclip result to eps or svg so it still in vector format?

View 2 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

Flex :: Saving A MovieClip To Disk As Swf In Air, Then Reading It Again?

Aug 20, 2011

i have seen almost all relevant threads on almost whole internet. and i m still confused..i m working on a drawing app ( flex / air ), 1- where user loads image file,(bitmapdata > bitmap > movieclip base layer)2- add layer ( new sprite > movieclip "second object in display list")3- draw on this sprite ( graphics.draw circle / etc, lot of other details etc)4- usr can add more layers etc, name layers etc ... all sprites are of same size as bitmapQ1. now i wanted to save this main movieClip (part of UIComponent ) as swf file. so user can read again and continue work. almost like i do with photoshop.

comment: i know it sounds too generic, to ask such detailed thing. so please be patient..i have been fiddling around with byteArray. and Air File Object,flash.net.fileReference etc..Q2. (main question), i don't want to convert drawn sprites to bitmapdata and then do bytearray. ( in my mind) it will convert everything to pixels, which i don't want.Q3. is there some auto magical line which will do everything..(save drawn vectors / shapes) in sprites as is?? (less chances). if i can read swf as movieClip, i can check sprites for layers and everything else... problem is writing this to disk as swf file.

View 3 Replies

ActionScript 3.0 :: Saving Movieclip State In External File

Jun 14, 2011

I am developing iOS app in Adobe AIR and Adobe Flash CS5.5... It's basically a huge timeline of movie clips with entrance screen. What I want to do is somehow create an external AS or TXT file, in which I got few movie clips defined as visible/hidden. I want the movie itself to change those states of the movie clips in the external file when it reaches certain frames in the main timeline, so that the next time you open the app and its entrance screen, there are buttons (movie clips) made visible there which can link/bring you to the previously reached frame.

View 4 Replies

Actionscript 3 :: Dynamic Application Saving And Retrieving Data To XML Via MovieClip

May 1, 2011

I am creating an application in Flash CS4 that will load data from an XML file and add a movieClip for each item to the stage. Each movie clip contains a NumericStepper component and Input text field.

The user needs to be able to change the fields and update the XML file for the event.CHANGE event.

The XML file needs to be formed like this. I need to be able to navigate between sections and load the data for each one.

<sections>
<section>
<data>

[Code].....

I just need a push in the right direction. I using the Object Oriented Programming methods with a Document class and movieClip classes to control my application. I have been spinning my tires creating several crippled versions.

View 1 Replies

ActionScript 2.0 :: Flash8 Variable Set-up - 'if' Statement To Run From Variable When Playhead Encounters MovieClip

Aug 21, 2009

I want to declare a variable on the main timeline that can be called from anywhere in my movie. So, _global var should be the right approach. I want to declare a movie clip 'MC1' "open", or "closed" so that when it is revisited, my flash file knows the user has been there before and performs a different task from the one it does when 'MC1' was first encountered. So, i need a 'if' statement to run from the variable, when the playhead encounters the movieClip.

[Code]..

View 2 Replies

ActionScript 3.0 :: Change String Variable To A MovieClip Variable?

Oct 10, 2008

I have been banging my head against a brick wall regarding the following problem which must be very simple to fix, just can't see the answer.I have a class assigned to a movieclip called canvas. The class is called drawClass. I have called the instance of canvas on the stage 'drawingCanvas'.When I trace "drawingCanvas" I get object drawClass] which is fine. Tracing drawingCanvas.name gets me the instance name 'drawingCanvas'.This is a String variable.Basically what I am trying to do is pass the MovieClip name to another class. In my example the class 'toolBar', which can then interact with the MovieClip.

The problem is passing 'drawingCanvas.name' results in a String, so I get an error saying :TypeError: Error #1034: Type Coercion failed: cannot convert "canvasArea" to flash.display.MovieClip.I can't for love or money find a way to convert a String variable to a MovieClip variable! I have the name of the MovieClip, I just need to tell the toolbar class. But I can't find a way of doing this as the instance on stage is an object of drawingClass, not a MovieClip (unless MovieClips with attached classes are not treated as standard MovieClips?).

View 9 Replies

ActionScript 3.0 :: Show Captured Image In MovieClip Without Saving Image First?

Jan 31, 2009

How can I show an image that I have just captured with the webcam?I am able to save that image using PHP but before I save it, I want to show a preview. How can I do this? Here is a snippet of the code that I think can be used to do this:

ActionScript Code:
foo = new BitmapData(640,480);
foo.draw(myvideoobject, scaleMatrix);

[code].......

View 3 Replies

ActionScript 3.0 :: Movieclip Inside Movieclip Variable Not Defined

May 17, 2011

I am brand new to AS3 and just about muddled through with AS2. I have a problem which should have a simple solution but everything I try gives errors.I had a load of buttons on the main timline which worked fine. I have moved a load of them into another movieclip called flyoutMenu. Now none work and I get the error:Error #1065: Variable about is not defined.This is the code stripped down to one button:[code]

View 2 Replies

ActionScript 3.0 :: MovieClip Accessing A Variable That Is In A Function Outside Of The Movieclip

Dec 8, 2010

I am trying to access the variable myParentVariable within the function myParentFunction() from the MovieClip's myMovieClip_mc function myMovieClipFunction().
 
I know that It works if I declare the variable myParentVariable outside of the myParentFunction() but I don't really want to do that

main timeline
//-------------------------------------------------------------------- ---
myParentFunction();
function myParentFunction():void

[Code]....

View 1 Replies

Use A Variable And Then AddChild With A RemoveChild For The Old MovieClip After The New MovieClip Has Loaded

Mar 30, 2009

This is something I'm experimenting with, but haven't seemed to figure out... I have several MovieClips, basically the same, only different colors. As each one plays, I'd like it to "overlap" whichever one is already there. Right now I have each button linked to a gotoAndPlay function, but I don't think that will ever get me what I want. You can see how I have it now here: [URL]

Instead of having the content MovieClip go back to all white when a button is clicked, I'd like the preivious one to remain, and get "covered up" by the new one. You continue to see the old color, and the new color overlaps it. I have a feeling I need to use a variable and then addChild, with a removeChild for the old MovieClip after the new MovieClip has loaded, but I'm not getting any good results yet.

View 1 Replies

ActionScript 2.0 :: Send The Variable X To Each Movieclip So That It Can Be Called From Within Each Movieclip Instead?

Aug 1, 2005

I have a loop that creates movie clips where the movie clips are named mc_+ x for say x = 1 to 10 so the movieclips are called mc_1, mc_2.....mc_10.

What I need to do is the know which one of the movieclips is clicked on but more importantly the number i.e if movieclip mc_2 is clicked on then I need to use the value 2.

At the moment I am sending the value of x to be displayed in a text box within each movieclip:

_root.search.textfield.text = x;

Then I have a piece of actionscript that uses the value of x but I don't seem to be able to "re-read" the value of x back with:

var t = _root.search.textfield.text;

what I want is t = x is it to do with strings and number variables?is it possible to send the variable x to each movieclip so that it can be called from within each movieclip instead?

View 1 Replies







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