ActionScript 3.0 :: Saving Data For Custom Objects

Jul 22, 2009

I have a class called LevelHandler. Inside each LevelHandler object is a bunch of arrays, various numbers, etc. Instead of saving the data for all these things separately, I've decided to save my LevelHandler object.

Here's what I've tried:

[code]...

You all expected this to work, right? Just kidding, it didn't. The problem is, when I try to set levelHandler equal to myLocalData.data.levelHandler, there is a type coercion failure (converting an Object to a LevelHandler). I know why this was happening, so I tried to make use of the "as" keyword. Still, apparently saved data can only be stored and understood as an Object.So, how can I save this LevelHandler object such that it can be accessed in the future (like when I need to trace how many levels there are)?

View 5 Replies


Similar Posts:


Data Integration :: Saving Data To A Local XML File?

Aug 22, 2006

I am seeing repeated comments on this discussion forum that it's not possible to save data from Flash into a locally stored XML file . . . but there must be a way to do this. Why is you can read data from a locally stored XML file but not update or add data to it. how absurd a design would that be, it simply wouldn't be logical!

View 8 Replies

ActionScript 2.0 :: Saving Data And Loading Data From A .txt File?

Sep 24, 2006

I have read through Shared Objects but i couldn't get it work...

I just have to save my data, maybe array into .txt file and later on
retrieve from the same .txt file...

Anyone here have an example or some source code so i can have reference on it?

View 6 Replies

Flex :: Converting Array Of ObjectProxy Objects To Custom Objects?

Jun 10, 2011

I have a service which returns an Array of ObjectProxy objects. I would like to cast this to a custom object (a value object) and create an ArrayCollection. How can I do this?ited:I am using Django and PyAMF for the backend. I had to write a custom SQL query and I am wrapping the resulting records in ObjectProxy and sending the whole result as an ArrayCollection.Here is my client side code:

[ArrayElementType("SessionVO")]
[Bindable]
private var _list:ArrayCollection;

[code]....

View 2 Replies

Data Integration :: Creating And Saving Data

Aug 20, 2011

I'd like to know if there's a way to take data entered into a field in flash, save it, and call it later via an object.I don't want anyone to walk me through it if there is, that's not what I'm asking. I'm just asking what I need to know in order to do this. I'd like to build a certain flash app that takes information (such as a name, paragraph, and/or sentence) saves it, and can then be recalled when a user clicks a button... even if the user has closed out the application.I'm still relatively new to flash, I know enough to get by on basic projects, but I want to expand my knowledge so I don't end up stuck in a beginners rut.Would this require using PHP and Flash? Or can it be done entirely in flash via exporting data to a designated external file?

View 2 Replies

ActionScript 3.0 :: Passing 2 Objects When Saving XML?

Mar 23, 2009

I am using PHP to save an AS3-generated XML document to my server. This works absolutely fine. Now, I'd like to be able top pass a filename along with my URLRequest under which the file would be saved.

When doing this in HTML it would be pretty easy and I would simply POST 2 seperate values, but how to do this in AS3?

View 2 Replies

ActionScript 3.0 :: Flash - Saving Objects In A Shared Object?

May 15, 2011

I'm trying to save an object to a shared object, the thing is that while i run it the first time it works perfectly, but as soon as the swf is closed and re-opened my object just disappears.If I'm not wrong this is because it's a custom class instance and the .data saves a reference to the object instead of the object which is deleted as soon as the program closes.My question is:I've tried saving each var in a different data.[something], having to save five variables might not be bad but what about twenty or more.

View 2 Replies

Flash8 :: Saving And Loading Attached Object With Shared Objects?

Sep 7, 2010

I know the basics of shared objects but I never really got into it I was wondering if there is a way that I could save and load movieclips that I attach to the stage(Each has its own name such as clip_1,clip_2,etc) including the location(_x,_y,rot) and have it duplicate them all over again and move them to the same location as before (I'm using Actionscript 2, by the way)

View 1 Replies

ActionScript 2.0 :: CS3 Saving And Loading Attached Object With Shared Objects?

Sep 17, 2010

I know the basics of shared objects but I never really got into it I was wondering if there is a way that I could save and load movieclips that I attach to the stage(Each has its own name such as clip_1,clip_2,etc) including the location(_x,_y,rot) and have it duplicate them all over again and move them to the same location as before

View 1 Replies

ActionScript 3.0 :: Saving An Array Of Objects To MYSQL Database, And Retrieving It

Nov 26, 2009

How do i save an array of objects, like this: [{n:1,bb:4},{n:2,bb:4,r:1},{n:6,bb:7},...] to a database? I was thinking i would have to convert it to string, but if i do that, when i retrieve it from the database, how am i going to use it?

EDIT: forgot to mention that the objects can contain an array of objects as well, but there won't be any more arrays beyond that point.

[{n:1,bb:4},{n:2,bb:4,r:1},{n:6,bb:7},{arr:[{a:11,b:2},{a:11,b:2},...],r:1},...]

View 2 Replies

Actionscript 3 :: Iterating Through Array Of Objects, Populating BarChart, And Saving Each As Image?

Jan 9, 2012

I am creating an option in my application to create a PDF report based on the results from the application.The results are represented as an ArrayCollection of XMLList objects, which I am using to populate a BarChart.To create a screenshot of each result (as a PNG), I am loading the Results Window (a Title Window) and hiding it (visible = false). I am using AlivePDF to add the capture to a PDF report.

I have been using a Timer to iterate through the results, load each result to the chart, create a delay, and then capture the image and add it to the report.

UPDATE.Currently, I am able to iterate through the results (using the Timer), but the chart does not refresh properly before capturing the screenshot and saving as PNG.Essentially,I am trying to see if there is any other possible solutions for iterating through the results and creating a delay so that I may be able to load a result to the chart, capture the screenshot, and add it to a PDF.Is there any other way to do this in Flex?Initially, I was thinking of iterating through the results array using a for loop,but this was not working due to the fact that the results were not loading in time before capturing the screenshot of the chart.

View 1 Replies

Xml :: SAVING Flash Data To XML?

Jun 25, 2011

I've been all over the interwebs, including Stack Overflow, for hours, trying to identify a solid, workable example of saving information in Flash into an XML file.

I want to take the positions of two different types of objects and export the lists of each to XML. We'll call the objects ball and bat.

[Code]...

View 2 Replies

ActionScript 2.0 :: CS3 Saving Data To Array?

Mar 18, 2009

I made this simple drawing game. I would like to make it so the user can save their drawings. What would be the best approach to doing this? I know it will require arrays.

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

Professional :: Saving And Loading Data To/from SWF?

Jul 23, 2010

I have created a simple flash animation for my employer. I basically have a square that changes color depending on which of three buttons are clicked. This is replicated about 30 times on the page. There is also about 15 circles that have a toggle button created so that when you click on the circle, they change between two colors. As I said, a very simple application.

Now, I need to save the data so that whenever someone new opens the swf, the current color combination is displayed. My way of thinking, with my limited AS3 experience, is that each button click, in addition to changing the color of a movie clip, should also send the data to a server. Then when someone opens the application fresh, I can use the URLLoader to load the most current data.

Am I on the right track, or am I missing it completely? I think I can figure out the URLLoader, but what code would I use to create the text file or xml file?Here is a snippet of my code:

var rtmColor:ColorTransform = f13335.transform.colorTransform;
var okColor:ColorTransform = f13335.transform.colorTransform;
var usColor:ColorTransform = f13335.transform.colorTransform;

[code].....

By clicking on either the rtm_13335, ok_13335, or us_13335 buttons, they will change the f13335 movie clip to the appropriate color (blue, green, or red). The default color is green.

What I would like to do is make the movie clip red, for example, then another person opens the swf, and the movie clip is red as opposed to the default green because I saved the current state to a text or xml file.

View 3 Replies

Professional :: Saving Data To Server Via SWF?

Jul 26, 2010

I have in mind a very basic swf file that allows someone to enter data (via dynamic text box), submit this data (via php), which in turns saves it as a file on the Server. This file (.txt) would be used to populate text on the main site. Most of this seems quite straight forward, and standard practice, apart from actually saving the data as a particular file and on the server (or overriding an existing file), which I'm sure comes up against problems such as FTP access and everything else, but I was wondering if someone might have an insight on how this could be done?

View 3 Replies

Actionscript 3 :: Saving Data To XML File?

Apr 12, 2012

I have a serious of games swf's loading externally from a main menu swf.What I'm trying to do is take name of the player which they input into textfield and sent it to the XML file. After this at the end of each game I want to send the time it took to complete also to the XML file.The problem I have is I don't know to to create a new user inside the XML file and then replace the default time of 00:00:00 with the time that the player has set.NameTextField is the name of the textfield.Hourtext, Minutetext and Secondtext are the names of the timer. (They are ordered like Hourtext ':' Minutetext ':' Secondtext.

AS3 code inside Flash MainMenu.swf
var XMLLoader:URLLoader = new URLLoader();
var Bytes:ByteArray = new ByteArray();

[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 :: Saving Xml Data To A File?

Oct 29, 2009

to save to an xml file that has been imported into an xml variable stored in a loader and modified. What I'm trying to do is import an xml list, add a new node with a key stroke, then save the newly modified xml list back into its file. I've seen quite a few threads about people saying you have to download third party software but is there a way to do it from within as3?

View 0 Replies

ActionScript 3.0 :: Saving Drawing Data In Xml?

Apr 19, 2010

i am working in action script 3 , is there any way that we can save mouse drawing data with color and stroke size in XML and retrieve back that data and present that in the same format and same position and edit again.?

View 2 Replies

Actionscript 3.0 :: Saving And Re-loading Data?

May 9, 2009

I've made a small application in Flash CS4 that I use when I'm teaching. Part of the application allows me to 'write' on draggable 'post-it' notes (using a draw function) and another part allows me to type text onto similar 'post-it' notes. how I could save the data that is written or typed in and then re-load it on another occasion? Am I out of my depth?My AS3 is probably intermediate level, I have some experience with SWF Studio and I'm beginner level with php/mySQL.

View 3 Replies

ActionScript 2.0 :: Saving And Loading Data

Jun 14, 2004

I've searched load of threads for info on this because for what I'm doing I need to save data to the local disk and then load it back up again as required. I'm using a local shared object to save data to and this works fine. Getting it back out again seems less straightforward.[code]Nothing appears to happen at all. The program continues with no traced output at all.

View 3 Replies

ActionScript 2.0 :: Saving Data Across Frames?

Dec 5, 2007

Ok here is my situation. I've developed a quiz application. Their is 30 frames. 2-29 is the presentation that contains the answers. Frame 30 has the quiz on it. When the user hits submit (once theyre all answered) and if their are wrong answers, it does not continue and it highlights the wrong questions and sets some _visible = false buttons to true. The buttons say "Review answer" which is going to take them back to the frame that has the answer and once that review is over it goes back to frame 30.

My problem is that when the user returns to the quiz frame, everything is reset. How can I store what the user has already selected so when they come back to frame 30 everything they filled out is still their?

View 2 Replies

ActionScript 2.0 :: Saving Data Locally?

Jan 16, 2008

I have an offline presentation for a client that needs to have a form submitted data saved local on the machine (kiosk) to be gathered later.I researched on google and found fscommand to write to a txt file but this no longer works and is sorta sloppy.

View 5 Replies

ActionScript 2.0 :: GuestBook Data Saving?

Aug 4, 2003

what i want to do is make a kind of guestbook thing.. and what i need to do is just store the data of each post into a data file on the website..I was thinking that i could do it with SharedObjects.. as i know how to use them and that was what i was goin to try first.. but.. is this the best way to do it?? will it work on the web or will it only work locally on a computer..Should i be using php or xml or somtin like that?? If so.. how would i do that cause i dont have a clue at all..

View 4 Replies

ActionScript 3.0 :: Saving And Re-loading Data

May 9, 2009

I've made a small application in Flash CS4 that I use when I'm teaching. Part of the application allows me to 'write' on draggable �post-it� notes (using a draw function) and another part allows me to type text onto similar �post-it� notes. Does anyone know how I could save the data that is written or typed in and then re-load it on another occasion? Am I out of my depth? My AS3 is probably intermediate level, I have some experience with SWF Studio and I�m beginner level with php/mySQL.

View 3 Replies

ActionScript 3.0 :: Saving Data To Droid With Air?

Nov 7, 2010

I am trying to create a text document and save it with air. The code works on when I test it on my computer though it does not work on the actual phone or emulator. This is the code im using:

Code:
private function saveData() : void
{

[code]......

View 1 Replies

ActionScript 2.0 :: FMX - Can't Get LoadVars For Saving Data

Feb 10, 2005

I'm using Flash MX (2002) and I need to get my variable values saved to a server each time my test subjects run and finish my swf/fla (PHP scripts and a .txt file on the server are being worked on, but that's a different nightmare!). I'm pretty sure I should use LoadVars, NOT SharedObject for this data capture right?. The data must not be overwritten each time over the course of a few months of data collection. The 3 variables are: username (name of the user), counter (this keeps track of which version the user chooses from the start menu), numcorrect (keeps track of the number of times the <right> arrow key is pressed).

2 main problems: I don't know where to put in the LoadVars obj (in the AS code of "finaldisplay" frame?) AND I don't know how to build/format the LoadVars object to capture the data in the 3 variables I listed above. I've got several Flash books and have done online tutorials, so for something so simple (3 lousy variables!)...why is my life so miserable? Here's my zipped .fla.

View 2 Replies

ActionScript 2.0 :: Flash8 : Saving The Numerical Data?

Jun 3, 2011

I am using Flash 8, and are building a game. It is an RPG-style game, and many people have been asking for a save game feature.I've been sifting through tons of tutorials and none work for me. I want to save a 'level' variable so that players can come back to it later on and pick up where they left off.[URL]

View 2 Replies

Data Integration :: Saving User Input To Xml

May 22, 2007

I'm sorry this is a question from a server ignoramus, I've previously captured user input using a combination of cfml and text files. That was way back in 2002 and using AS 1.0. I'm now working in an environment where the server guy won't put any scripts on, and I mean none, no PHP, no ASP, no CFML, nothing. Would anyone know if there is a way of capturing user input without using a script, please? This prolly shows a really basic lack of understanding of how servers work but I'm a bit desperate. I know the Flash Learning Interactions can work with SCORM and pop results into LMSs that use SCORM and our LMS does use SCORM, but it seems to only be within the learning interactions and I don't know where to start to tailor this for the input I need to capture.

View 2 Replies







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