Flex :: Tell If An Object Has Been Modified Since Save?
Dec 11, 2009
I'm creating an air application that allows the user to create, edit and save Objects in files. I'm trying to implement a "Save on Close" prompt if the user hasn't saved her changes to the object before closing.Let's say I have a Class called MyClass marked as Bindable that is composed of fields, each exposing a getter and setter. Some of these fields are ArrayCollections of custom Classes. I want to consider a change a change to any of the fields, or any of the fields in any of the objects in any of the array collections the parent object is made up of.
I could manually dispatch an event anytime a setter is called on the MyClass object and manage this all manually, but I'd also have to do it in a bunch of places in the application logic, for instance when the user changes one of the custom objects in one of the array collections that comprises it. This is a fine solution, but a little dirty and hard to maintain. I could also check the current object against a copy I made at the time of start up or last save, but I don't like the idea of doubling my memory footprint just for this.
there was some event, perhaps an event that the binding broadcasts, that I could listen for in one place and manage my "Saved" variable. Does such a thing exist? I tried listening for the dataChange event that binding apparently dispatches, but I either did it wrong, or it doesn't do what I think it should.
View 2 Replies
Similar Posts:
Oct 29, 2010
If an AS3 method returns a reference to a complex type, is there any way to make that 'readonly', like how you can have const member functions in C++? An architecture I want to use calls for a class building itself from a passed template object... and really the template object should not be modifiable. I'm currently forced to add call-back enumerators and/or lots of extra accessor methods.
View 4 Replies
Aug 12, 2008
I have a movieclip created:
ActionScript Code:
var mc:MovieClip = new MovieClip();
later on I load a SWF into this movieclip
ActionScript Code:
mc = MovieClip(e.currentTarget.content);
I then want to name the mc:
[Code]...
Error: Error #2078: The name property of a Timeline-placed object cannot be modified.at flash.display:isplayObject/set name()at thumbDesign2_fla::MainTimeline/setup()at MethodInfo-872()
View 9 Replies
Oct 6, 2009
i can able to create StyleSheet object , i need to save that StyleSheet object to css file(in the css format).
how can i do in flex3 Air application , is there any build in library ? Or links available to save as *.css file
View 1 Replies
Jan 24, 2012
I have a NavigatorContent which is displayed when the user selects an item in a DataGrid. This NavigatorContent contains a form and an accordion displaying the related objects.
When the user presses the Save button in the NavigatorContent the form and the children should be saved to the database by calling the server through BlazeDS:
saveObjectToDB()
{
//Map the form values to the object
object.field1 = object_field1.text;
[Code]....
The object that i pass to the accordion children is public and [Bindable] in the NavigatorContent and in the accordion children and is initially passed from the main DataGrid. May this be a problem relating to this issue?
View 1 Replies
Jul 6, 2011
Can we Bypass the save dialog box of FileRefernce.save()? If not, then Is there any workaround to save a file from web application in Flex without asking user where to save file?
View 1 Replies
Jan 22, 2011
I'm using a loader for people to use to upload their own images for a background, and I want it to remember the image the next time they come to the page, so is there any way to save the loader data in a shared object? I haven't tried just using something like
Code:
sharedObject.data.dataName=loader
because I assume it doesn't work that way.
View 9 Replies
Aug 31, 2010
I'm using Flash CS4 and have a couple of FLAs (but not all my FLAs) that always get flagged as being modified when I publish. The issue is that my source control keeps wanting to have me check-in those files.
View 1 Replies
Sep 24, 2009
Is it possible to tell when a SWF was published (date modified) via ActionScript?
View 3 Replies
May 19, 2009
This seems like it should be something pretty obvious but I haven't been able to figure out how to get the time stamp (date modified) for the swf that I am in. I want to be able to get the date the swf was published for debugging purposes.
View 3 Replies
Apr 9, 2011
Wondering if I'm allowed to modify and save the flash ami "adobe-flashmediaserver-useast/fms-4.0.1.8011-centos"?It'd be nice to not have to reinstall and configure everything every time I run an instance.
View 4 Replies
Dec 20, 2009
I need to know which part of the text is been modified by the user inside a Flex TextArea. I'm listening to TextArea's Event.CHANGE and my code run on everychange but i don't know what the user have done to the text and it's too long to process it again at every keypress or paste
We are still with Flex 3.5 but i may consider Flex 4 if the solution is easier.
View 1 Replies
Feb 20, 2009
I modified a mouseDown event to use
mouseListener.onMouseMove = function() {
moveGlow();
};
But the glow animation restarts everytime the mouse moves. Can someone point me towards a tutorial or a tip on using a conditional to detect the mouseMove so it doesn't start over?
View 3 Replies
Feb 8, 2012
On my website people enter, watch a live stream from a remote server (not my server) and when they click on a button it report it to me and what I want to add is the ability for me to take a screenshot of this stream at the very moment when they click that button and save it on the server. They question is how to implement so? Now I just have that stream in an Iframe that shows it as a .swf object Possible solutions I thought of but don't know whether will work are:
Embedding this Iframe inside a flash object that I will create. That means that on the website the users will see a flash object I created that all it does is to show the stream from an url I give it and when the user clicks on a button inside the html it will send the flash the command to save the screenshot now and then save it on my server (don't know how to implement it, so the second question is, if you think it will work, how to do so?).Second solution is to have an open browser on my server that when the user clicks the button, I send an ajax request to the server that will then order the browser to take a screenshot and save it locally on the server. (again, if you think this solution will work, tell me how to implement so).
View 1 Replies
Apr 10, 2010
Is there a way in which xml can be saved as shared object?
View 1 Replies
Nov 19, 2008
mc1 is placed on the stage. There are several key framesinside of it. On the first key frame is mc2. The subsequent keyframes have copies of mc2 which have been tweaked individually byway of transform tool etc. Run the play head manually and you sell the frames like you meant.But when the movie is tested only the original mc2 (as on keyframe 1) shows up on all the frames. And it is evident that thescript is moving the playhead as images placed in key frames onanother layer in mc1 appear correctly. I have heard its called 'puppeting' but my question remains:
View 3 Replies
Jun 7, 2010
when I place a MovieClip element on both key frame1 and key frame2 from the content library, and let the instance on frame1 has no instance name, then the instance name which I give to the instance on frame2 has no effect at all——namely I can't refrence it by action script code on frame2 of the main timeline.I checked the content of the binary-file outputed by flash cs4, and got that after the first ShowFrame Tag, the instance was modified by the PlaceObject2 Tag, but the PlaceFlagHasName was not set, is this a bug of flash cs4?
View 5 Replies
Oct 24, 2008
I've followed this nice howto talking about building a photo gallery using XML and Flash, and i've tried to use it as a kind of swf diaporama, now i do not have 2 buttons like in the example, but only one which i use as next, an when i arrive at the last swf of my xml list, i would like to make a loop and go to the first swf of my list.
View 6 Replies
Jan 31, 2009
Im working on a project where files are being loaded using the URLloader in flash as3. I need to be able to find the last modified date of the file that is being loaded, unfortunately the files may not always be on the same server as the flash app, so it may not always be possible for me to add a line to the file that has the last modified date, that could be read easily in flash. I was wondering if anyone knew of a way to retreive this information, I know in air you can use URLLoader.httpResponseStatus which allows you to get the http headers and find it that way but it doesnt appear to work in flash.Id like to try to do this with out having to call on javascript or php to find it, since it would then require 2 connections per file i believe to be able to do everything I need 1 to get contents in flash, and one for either javascript or php to find the last modified date, but if I have to that seems to be the only option I can come up with.
View 2 Replies
Apr 27, 2011
Here is what I want to do: Take an object that has a bunch of properties set and possibly holds other objects in it, and serialize it or somehow save it to a file using the File class. Reversing the process is also necessary. I know about SharedObject, but I do not get the ability to dynamically change the save/load location as in the File class. Is this possible with FMS, and if so, what is the procedure? If it is not possible, then what options do I have to achieve the same goals? I have read the SSLR and searched for a solution but do not seem to see any means to do this.
View 2 Replies
Jun 6, 2011
i`m going to attach movie from library i need when i click save button and close swf and run again the movieClip are loaded
View 3 Replies
Sep 2, 2005
I was trying to do an animation where people can move object around and save. then other people, with different computers, can see the last modifications.I was thinking using the sharingObject remote, but does it work with all servers?I read I need a special one, flash development server or something.So, I had the idea to make a script that save the position of the objects to a file and realoading the animation it loads the variables from that file
View 1 Replies
Mar 4, 2009
Is there a possibility - instead of attaching a camera [via ns.attachcamera()] to a netstream - to "attach" e.g. BitmapData to netstream. The reason is, that I use BitmapData's .draw method to get the webcam video in order to change it, such as with the .treshold method. And I want to record and save these altered bitmaps (as a video) on the FMS instead the original webcam video.
[URL]
Two videos are shown, the left one is the original from the webcam, the right one the "modified" video. Only the modified video shall be recorded via the netstream .publish method.
View 1 Replies
Dec 20, 2010
I have a perfectly working text based button positioned inside a movie clip and being called from the main time line.Then I decided to add a color changing effect on the up state of the button. Originally button had a static text for the Up, Dow, Over, Hit frames. As soon as I modified the text into a mc I am getting an error code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at acolyte24A_fla::mainsite_mc_2/frame30()[acolyte24A_fla.mainsite_mc_2: :frame30:4]
Here is line 4 from frame 30:
[code]....
View 14 Replies
Jan 31, 2010
Is there a way with AS3 and flash player 10+ to check the modified date / time of a file? I'd like the swf to see if the local file has changed since it last checked. If it has, load the new data and go from there. An outside source is writing that new xml file and it could be a few seconds to days or weeks before it's updated again.
View 6 Replies
Jul 26, 2011
I trying to modified a existing xml picture gallery in flash cs5. What I trying to do is edit the gallery's menu button name. The gallery is divided into two section. My menu option are " EN | N" each buttons. The controls work perfect, I click on "EN" or "N" and they take the right process. But I want to replace the "EN" for the word Design and the "N" for the word Print. My ultimate goal was to add more sections to the gallery, but I'm having trouble as is with just with changing the names of the menu buttons. Here the A3 code:
[Code]...
View 6 Replies
Mar 4, 2004
I am trying to use the shared object to save the _x and _y positions of several attached MC's. The attached MC's have all been given a variable name and attached to a dynamically created MC called "world".I need to loop through all of the MC's in _root.world to save their postions to the shared object. Here is what I have tried,.... when I trace so.flush.. it traces to true but the object postions are not saved.......
Code:
_global.initSo = function() {
_global.so = SharedObject.getLocal("marinaSave");
// if the SharedObject object created a new shared object
[code]....
Am I using the for... in method correctly to loop through the MC's in _root.world and save their values?
View 4 Replies
May 3, 2011
I'm planning to program a small piano in flash that have an x number of notes to play through a SoundChannel.
What I have not found is a way to record what is playing through SoundChannel and send it as byteArray to a server side script that will save it as WAV (or mp3).
I know Flash Player 10.1 allows you to record sound, but everything I have found is about recording sound using the microphone class. It seems the way to go is to send the sound data to the microphone. That doesn't seem very right or possible though..
View 2 Replies
Sep 14, 2010
I'd like to get the input text in the SWF to save on exiting the SWF without pushing a button. Here's what I have so far that incorporates pushing a button
Code:
var savedstuff:SharedObject = SharedObject.getLocal("Cookie");
btnSave.addEventListener(MouseEvent.CLICK, SaveData);
function SaveData(MouseEvent) {
[Code]....
View 1 Replies
Feb 9, 2011
I wanna to make some flash for save and load color...
Click button to change button color and click again return to old color and
Save lase color
When run project to show last save color
View 7 Replies