Loading/Saving/Modifying XML Via Shared Objects
I'm trying to create a flash application which will let me load in an XML file, allow me to modify the contents of it, then save the modified data into a shared object to be loaded in later.
So far i'm able to load the XML, into a tree component. I can save the dataProvider bound to my XML tree into a shared object. I can't seem to load the saved data back into the tree though.
Does anyone have a sample application they can send me which performs the functions of saving loading and modifying data within flash using sharedobjects.
Thanks
-VinnyC
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 02-12-2004, 05:50 PM
View Complete Forum Thread with Replies
Sponsored Links:
Loading/Saving/Modifying XML Via Shared Objects
I'm trying to create a flash application which will let me load in an XML file, allow me to modify the contents of it, then save the modified data into a shared object to be loaded in later.
So far i'm able to load the XML, into a tree component. I can save the dataProvider bound to my XML tree into a shared object. I can't seem to load the saved data back into the tree though.
Does anyone have a sample application they can send me which performs the functions of saving loading and modifying data within flash using sharedobjects.
Thanks
-VinnyC
View Replies !
View Related
Saving To Shared Objects
Let me try and build the scenario. I have a SO entitled "TDS_Log" that I set up like this:
ActionScript Code:
activity1 = SharedObject.getLocal("TDS_Log");
I add values to the SO like this:
ActionScript Code:
activity1.data.completion = "true"
activity1.data.activityType = "drag and drop"
I then run a conditional statement to ensure it's saved succesfully.
My question is can I write to this SO from another swf without overwriting the existing values? So I'd have something like this:
ActionScript Code:
activity2 = SharedObject.getLocal("TDS_Log");
ActionScript Code:
activity2.data.completion = "true"
activity2.data.activityType = "drag and drop"
View Replies !
View Related
Saving Colour With Shared Objects?
Hi,
I am developing a uk map application that all the regions colours can be changed.
So far so good, the problem i'm having is trying to get each region to save to a SO so that when the .swf is next opened the changed regions keep their colour.
Any help on saving a MC's colour would be much appreciated.
Thanks,
Phil
View Replies !
View Related
[Flash CS3] Saving Datagrids In Shared Objects
Hello everyone,
I am trying to make a phonebook where it saves the data they have entered into the Datagrid. This is my script:
Quote:
function dataGridFunction() {
var characters:Array = new Array(new Array("DK", "NH", "111-111-1111"), new Array("DK", "NH", "111-111-1111"));
for (var i = 0; i<characters.length; i++) {
var firstName:String = characters[i][0];
var lastName:String = characters[i][1];
var phonenumber:String = characters[i][2];
var email:String = characters[i][3];
dataGridMain.addItem({First:firstName, Last:lastName, Phonehonenumber, Email:email});
}
dataGridMain.setStyle("fontFamily","Verdana");
dataGridMain.setStyle("headerColor","0xA6CBDD");
dataGridMain.setStyle("alternatingRowColors",["0xF0F0F0", "0xFFFFFF"]);
dataGridMain.setStyle("rollOverColor","0xDCEBF1");
dataGridMain.setStyle("selectionColor","0xFFF97D") ;
dataGridMain.setStyle("selectionDuration",300);
}
function dataGridFunction1() {
var firstName:String = characters[i][0];
var lastName:String = characters[i][1];
var phonenumber:String = characters[i][2];
var email:String = characters[i][3];
dataGridMain.addItem({First:firstName, Last:lastName, Phonehonenumber, Email:email});
dataGridMain.setStyle("fontFamily","Verdana");
dataGridMain.setStyle("headerColor","0xA6CBDD");
dataGridMain.setStyle("alternatingRowColors",["0xF0F0F0", "0xFFFFFF"]);
dataGridMain.setStyle("rollOverColor","0xDCEBF1");
dataGridMain.setStyle("selectionColor","0xFFF97D") ;
dataGridMain.setStyle("selectionDuration",300);
}
so = SharedObject.getLocal("dataset1");
if (so.data.name != undefined) {
dataGridFunction1();
//dataGridMain.onLoad = function() {
dataGridMain.loadFromSharedObj("dataset");
//};
} else {
dataGridFunction();
so.data.name = "DKNH";
}
var row = dataGridMain.length;
//trace (row);
var column = dataGridMain.columnCount;
//trace (column);
var deleteselected = dataGridMain.selectedIndex;
this.addrow.onRelease = function() {
dataGridMain.addItem(item);
};
this.deleterow.onRelease = function() {
dataGridMain.removeItemAt(deleteselected);
//trace (row);
};
this.deleteallrows.onRelease = function() {
dataGridMain.removeAll();
};
this.close.onRelease = function() {
fscommand("quit", "");
};
this.addcolumn.onRelease = function() {
if (columnname != "" && columnname != undefined) {
dataGridMain.addColumn(columnname);
}
};
this.deletecolumn.onRelease = function() {
dataGridMain.removeColumnAt(column-1);
//trace (column);
};
this.deleteallcolumns.onRelease = function() {
dataGridMain.removeAllColumns();
};
this.a.onRelease = function() {
dataGridMain.spaceColumnsEqually();
};
this.save1.onRelease = function() {
dataGridMain.saveToSharedObj("dataset");
};
Please help me to make this work.
When I click save, I don't think it actually saves it on the SO because when I close it and then open it again, it didn't save it.
All help is appreciated!
View Replies !
View Related
Saving State With Local Shared Objects...Is This Right?
OK here is what I am trying to do with Shared Objects. I have a swf with the basic navigation 3 buttons (button1, button2, button3). This is called home.swf
each of these buttons calls a loadMovie action to load its respective page.
button 1 loads page1.swf
button 2 loads page2.swf
button 3 loads page3.swf
all load on level 2
All these swf files are in the same folder.
so simple enough. Now what I what to do with Shared Object code is to maintain state. So if I am in the site and reading on page 2....then quit the browser or go to another site....and then come back later ..it will load with page 2 or whatever was last on the screen.
So I am figuring that I need to place the "save" code on the individual page and the "retrieve" or "load" code on home.swf. Right?
Here is the code I have on the page#.swf files:
var local_data = SharedObject.getLocal("test", "/");
local_data.data=_level2; //not sure what goes here
local_data.flush(10000);
and on the home.swf I have:
var local_data = SharedObject.getLocal("test", "/");
local_data.data;
So tell me...am i way off here?? I understand the concept fine...but as usual the syntax stops me in my tracks....any help would be greatly appreciated....
View Replies !
View Related
Saving/loading By Shared Object File
I want to save my variables that are stored in a dynamic text field into a shared object file by clicking on my "save" button, and then load my variable data into the dynamic text fields from that shared object file using the "load" button.
When I click on the save button I dont see the shared object file being created. I had read the tutorials but cant seem to figure the thing I am doing wrong. Thats why I am including my fla file
(the fls file I made is very simple) so you can check it out. My code looks like this:
PS Could you please modify the fla file (if you find a programmnig misteke there) and attach the modified working file into your post, and tell me what I did wrong. Thanks for help!
//SAVE BUTTON
on (release) {
// create the local shared object
pos = sharedobject.getLocal("gamesave");
// save the variable number data value
pos.data.money = "money";
pos.data.week = "week";
// commit the change to disk
so.flush();
}
//LOAD BUTTON
on (release) {
// open the local shared object
pos = sharedobject.getLocal("gamesave");
// read the variable number data we saved previously
money = pos.data.money;
week = pos.data.week;
// spit it out so we can see it
trace(pos.data.money);
trace(pos.data.week);
}
View Replies !
View Related
Shared Objects Loading Pictures
I am trying to set up a favorites page for my website, using Shared Objects. I am having some problems.
Here is what I have so far :
Code:
favorites = SharedObject.getLocal("favorites", "/");
oneF = favorites.data.oneF;
if(favorites.data.oneF == undefined) {
favorites.data.oneF = "empty.jpg";
favorites.flush(true);
}
and
Code:
container.loadMovie(oneF);
It isn't working for me. I think that it may be the "favorites.data.oneF = "empty.jpg"" part, I don't know if that is right or not.
Let me know if you can help me, or if there is an easier way to do this.
View Replies !
View Related
Shared Objects. How To Undo Shared Object
Hi guys,
Basicaly I created a simple login function by following the shared objects tutorial (http://www.kirupa.com/developer/mx/sharedobjects.htm).
I wanted a button placed on my wlecome screen allowing the user to go back to the creating screen of the shared objects.
So basically another shared object can be made.
Any Ideas?
View Replies !
View Related
Store And Retrieve Array Of Custom Class Objects From Shared Objects.
Hi,
I am stuck up with a problem in ActionScript 2. I am using Flash MX 2004 on windows XP.
I have created 3 custom classes say Parent, Child, and GrandChild. Parent class contains in it an array of its Child objects. Similarly each Child object contains in it an array of GrandChild objects. Also I do have one global array of all the Parent objects.
I want to store this array to the shared objects on specific events(say exiting the session) and then reload them from the shared object(on next session startup). I am able to store the global array to the shared object but when I try to retrieve the same array from shared object, I could not do it. The retrieved array is not of my custom class type [Parent].
Help needed to solve this problem urgently. Does anybody have idea how to do it??
Thanks in advance.
Cheers,
Naishadh Sevalia
View Replies !
View Related
Modifying Library Objects
Is there a way to make a movie clip on the flash workspace (using ctrl+f8) and having it stored in the library and edit that object with actionscript. I know you can drag an instance of that object on the workspace and give it an instance name and edit the instance through actionscript. But, is there a way to edit the movieclip itself that is stored in the library with actionscript?
View Replies !
View Related
Shared Object Not Saving?
Here's the code. It appears that it will not save te cookie because on a return visit, it still triggers the undefined... any ideas? I've done this before and never had trouble, but something is obviously wrong:
get_flookies = function () {
_root.flookies = SharedObject.getLocal("preferences");
if (_root.flookies.desktop == undefined) {
trace("no desktop");
_root.flookies.desktop = _root.pref_pane.thumb0.name;
//_root.flookies.flush();
}
if (_root.flookies.volume == undefined) { trace("no volume");
_root.flookies.volume = 50;
//_root.flookies.flush();
}
};
What SHOULD happen is on the first visit, we'll create the preferences file and check to see if it has any values from a previous visit. If so, we'll use them and if not we need to set the defaults.
If anyone has any ideas, I'd appreciate the help!
View Replies !
View Related
Saving XML Into Shared Object Etc...
I'm setting up a system that will pull data from an XML doc, allow users to edit the attributes of items with a clcik, and then save it into a shared object on the computer (this will only be running on one machine).
There will also be a basic RESET function that at any time will load the data back in from the original XML and overwrite their SharedObject data.
But I'm having trouble figuring out how this SharedObject works. Once I've loaded my XML into an XML object in my movie, how do I then copy that data into the SharedObject?
Any help is greatly appreciated!
View Replies !
View Related
Shared Object Not Saving?
hey all. i have two different swfs. one sets a shared object and one is supposed to read it. it is always coming back as undefined (I'm not permitted to have a containing .swf, btw)
writer of SO:
var user = SharedObject.getLocal("userData");
var cookieValue=_root[mcAtTarget0]._name.charAt(10)+_root[mcAtTarget0]._name.charAt(11);
user.data.first=cookieValue;
user.flush();
reader:
user = SharedObject.getLocal("userData");
if (user.data.first == undefined){
text_txt.text = "not here";
} else {
text_txt.text = user.data.first;
}
what am i not getting? thanks!
View Replies !
View Related
Saving Text With 'shared Object'
can anyone tell me for sure that you can use the new 'shared object' feature of flash to save variables to a txt file to the users hard drive. this will be done offline from a projector. the text file will need to be somewhat cleanly formatted so the user can understand it.
i think this macromedia article suggests that it can be done, but i need a definitive answer.
thanks!!
corey
View Replies !
View Related
Shared Object Not Saving - Any Ideas?
Here's the code. It appears that it will not save te cookie because on a return visit, it still triggers the undefined... any ideas? I've done this before and never had trouble, but something is obviously wrong:
get_flookies = function () {
_root.flookies = SharedObject.getLocal("preferences");
if (_root.flookies.desktop == undefined) {
trace("no desktop");
_root.flookies.desktop = _root.pref_pane.thumb0.name;
//_root.flookies.flush();
}
if (_root.flookies.volume == undefined) { trace("no volume");
_root.flookies.volume = 50;
//_root.flookies.flush();
}
};
What SHOULD happen is on the first visit, we'll create the preferences file and check to see if it has any values from a previous visit. If so, we'll use them and if not we need to set the defaults.
If anyone has any ideas, I'd appreciate the help!
View Replies !
View Related
Shared Object (saving Frame States)
Hello...
I'm fairly new to AS & especially new to SOs...
I am working on an application that (on 16 different frames) has various loaded SWFs that have selections for the user to make. These SWFs are basically 6 frame animations - first frame for the roll over effect, and the remaining 5 frames for the actual selection. Therefore, the 'selection' is basically a gotoandstop on a certain frame. Once the user makes his selections for each item, he will then move onto another (of the 16) frame to make further selections. As of right now, the selections would revert back to their default state (frame 1 of 6 - rollover state) when they moved from one frame to another and back.
What I'm hoping to do is this:
A frame action that upon entering/exiting one of the 16 frames, would save and/or load a Shared Object that has the states (frame number) of all the loaded SWFs for that frame.
I hope this was clear...thanks in advance!!!
View Replies !
View Related
Problem Saving Shared Object On Linux
Hi,
My requirement is to save Shared object on the Linux machine and retrieve the data back for later use. As I have made the required changes in my code the same works fine on the Windows platform but behaves strangly on the Linux platform.
In class named "save.as" I am using the following code:
Code:
var objRecordSO:SharedObject = SharedObject.getLocal("record");
objRecordSO.data.RecordData = _strFileData;
var bSuccess = objRecordSO.flush(1024 * 100);
where _strFileData is the data being sent by some other function.
trace(bSuccess); returns true on the Linux machine but while retrieving the data in userProfile.as file (some other class file) does not always returs same data as been saved. It sometimes returns no data at all.
Can anyone through some light on the erratic behavior of Shared Object on Linux. Note that the same code always runs perfect on the Windows machine.
thanks.
View Replies !
View Related
Problem Saving Shared Object On Linux
Hi,
My requirement is to save Shared object on the Linux machine and retrieve the data back for later use. As I have made the required changes in my code the same works fine on the Windows platform but behaves strangly on the Linux platform.
In class named "save.as" I am using the following code:
Code:
var objRecordSO:SharedObject = SharedObject.getLocal("record");
objRecordSO.data.RecordData = _strFileData;
var bSuccess = objRecordSO.flush(1024 * 100);
where _strFileData is the data being sent by some other function.
trace(bSuccess); returns true on the Linux machine but while retrieving the data in userProfile.as file (some other class file) does not always returs same data as been saved. It sometimes returns no data at all.
Can anyone through some light on the erratic behavior of Shared Object on Linux. Note that the same code always runs perfect on the Windows machine.
thanks.
View Replies !
View Related
Saving Tons Of Vars W/ Shared Object, And Arrays?
(Using actionscript 2) I would want to know a way to write a code that would save tons of variables in a shared object, using for loops, to avoid having to write all the code for every variables, as this:
sharedobject.var1 = something
sharedobject.var2 = something
sharedobject.var3 = something
sharedobject.var4 = something
sharedobject.var5 = something
sharedobject.var6 = something
sharedobject.var7 = something
sharedobject.var8 = something
...
sharedobject.var100 = something
And I would like to do it this way, with a variable that increases to change the name of the variable to be saved:
for(number=0; number<101; number++) {
"sharedobject."+number = something
}
The problem is that I can't write "sharedobject."+number =....., because I can't use "+" on the left side of the assigment.
So what then should I do?
I think I should use arrays, but I don't know how to make it work properly, and if you find a way, please make sure it works.
View Replies !
View Related
Sandbox Violation When Saving MovieClip To Shared Object
I have a Library symbol called Panel. My movie allows the user to create and organize many Panels on the stage. I save them to a SharedObject so the user can pick up where he left off.
Panel extends MovieClip, which has the property transform. If I simply use registerClassAlias("Panel", Panel), I get a jumble of errors about converting generic Objects to SoundTransforms, ColorTransforms, etc.. As long as I don't try to access Panel.transform, there is no need for concern; however, I need to allow the user to change the color of the panel. The easiest way to do this ought to be accessing the transform property, but I am running into problems.
Code:
registerClassAlias("Transform", Transform); // errors "Argument count mismatch. Got 0, expected 1"
registerClassAlias("Transform", flash.geom.Transform)) or registerClassAlias("Transform", Class(Transform) //errors"*** Security Sandbox Violation *** SecurityDomain "myMovie.swf' tried to access Player UI context"
For now, I can create Shapes in different colors to workaround the problem. There has to be a better way though. What is this about accessing the Player UI context? How can I save flash.geom.Transform to a SharedObject?
View Replies !
View Related
Saving Live Video An Audio Shared Component
I want to know if it is possible to saver the Live Video And Audio Shared Components to HD on the server for later streaming or reporting.
What i want is to save all the conversations taken in a chatroom via Video Chat and be able to check them Later.
How's this done and where are they saved.
View Replies !
View Related
Shared Object / Saving & Retrieving Arrays Problem
I have used SO's to save and retrieve simple variables successfully, but I am a problem saving and retreiving array data in the following example:
http://www.nottingham.ac.uk/home/ccz...llRenderer.fla
A user selects several options using radio buttons. All that happens is that the SO should store in memory which buttons the user clicked on. If run through flash with the output window, you can see that when the save button is clicked, the data is saved. But when you load the activity a second time, the array data that was stored in the SO only gets recalled as 'undefined'.
Can someone suggest how I might fix this please? It may be to do with how I am moving the array data around, I am not sure.
Thanks
View Replies !
View Related
Saving An Objects X & Y Data...
Hi!
I have a drag and drop file. After that I have draged and droped my object I would like to make a post and save that data so that the object always stays where I´ve put it with my post on it.
So my question is, does any one know how I save this data, or does anyone know a tutorial that might help me?
help help!
please please!
/c
View Replies !
View Related
Saving Draggable Objects
Hello!
I'm trying to build an application in Flash using draggable objects. I have all the basic AS code I need to drag objects around and reset the stage as well.
However, what I canNOT seem to find in all my searching is the process by which to save the objects after they've been moved. I imagine it requires writing some data (new object coordinates??) to a text/XML file which could then be reloaded into the movie clip when brought up again...but I can't figure this one out!
Here's an example of what I'm trying to accomplish:
http://www.smartfurniture.com/shop/catalog.designer.asp
For the record, if any server-side code comes into play, I'm currently using ASP for the particular site I'm building this for (although I do know PHP and ColdFusion as well).
Any code examples or links to the appropriate tutorial(s) -- if anyone knows where they can be found -- would be greatly appreciated!!!
Thank you so much, and Happy Holidays to everyone!
View Replies !
View Related
Shared Objects
I've seen many tutorials on how to store text field info in "shared objects" and I was wondering if anyone knows if you can store other things in "shared objects?"
What I'm specifically looking to do is have the user select the background colour of the movie using the setRGB and then have this info stored in a shared object so when the user returns, the background will stay the same colour that they selected on their previous visit.
Any possible solutions would be greatly appreciated!
View Replies !
View Related
Shared Objects
I've seen many tutorials on how to store text field info in "shared objects" and I was wondering if anyone knows if you can store other things in "shared objects?"
What I'm specifically looking to do is have the user select the background colour of the movie using the setRGB and then have this info stored in a shared object so when the user returns, the background will stay the same colour that they selected on their previous visit.
Any possible solutions would be greatly appreciated!
View Replies !
View Related
Shared Objects
I am trying to assign the 'scheme' variable to 'grey' using a shared object.
This code loads on the first frame
mySO = SharedObject.getLocal("colors");
scheme = mySO.data.scheme;
and this should give the 'scheme' variable a value of 'grey'
on (release) {
mySO.data.scheme = grey;
}
I don't think it is, because if I look at the .sol file no value is set to 'scheme'
¿ #TCSO colors scheme
Any idea why?
View Replies !
View Related
Seeing Shared Objects On My Box
First:
Does anyone know where I can find my shared objects on my PC. I'm running windows 2000?
Second:
Does anyone know how I can retrieve the local path of a shared object in my code. By default the shared object is supposed to be stored under the "full path". I would like need to see what the full path is to troubleshoot a problem I'm having.
John
View Replies !
View Related
Shared Objects
I've searched the board on shared objects and found a lot of reference to the Macromedia site. Most all of the reference refers to using the shared object as a cookie to keep a name.
I want to use it so that it sees if they alread visited and if so it goes to the end of the .swf file.
I've found the code below but I can not seem to make it work. Has anyone successfully completed what I'm tring to do and if so could you help me out
------------------------
// setting up the shared object.
var mySO = SharedObject.getLocal("cookie");
// if we have something in stored we skip the animation.
if(mySO.data.stored)
{
// Frame is = the first frame after the anim.
gotoAndPlay(216)
} else
{
// if stored weren't found we store true
// in it to mark that the user has been here.
mySO.data.stored = true;
}
View Replies !
View Related
Shared Objects
Hi. I am currently building an MP3 player using Flash MX and ice Projector. The functionality of the playlist is based around a set of arrays. There is one array, called Artists, and another called Tracks, and a third called Files. Artists stores the artist names, Tracks stores the title, and files stores the streaming location. Each individual track is identified by it's loaction in the array. I am almost done except for the playlist. The problem I am running into is that I can't get it to save the arrays to Shared Objects.
I have the following function to display the array values in the playlist: (This works)
Code:
function loadList(Tracks,Artists) {
PlayList.removeAll();
for (i in Tracks) {
Song = Artists[i]+" -- "+Tracks[i];
PlayList.addItem(Song,i);
}
PlayList.sortItemsBy("data",asc);
}
Then I have this function to save the playlist, which is called when the user clicks the save button: (This doesn't work...)
Code:
function MasterSave(Tracks,Artists,Files) {
PL = SharedObject.getLocal("Cialnet_Playlist");
for (i in Tracks) {
PL.data.Tracks[i] = Tracks[i];
PL.data.Artists[i] = Artists[i];
PL.data.Files[i] = Files[i];
trace(PL.data.Tracks[0]);
}
PL.flush;
}
When the MP3 player is first evoked, the following function is run:
Code:
function LoadPL(){
PL = SharedObject.getLocal("Cialnet_Playlist");
if (PL.data.Tracks==undefined) {
trace("No Playlist");
}
Tracks = new Array();
Lengths = new Array();
Artists = new Array();
Files = new Array();
curTrack = 0;
pos = 0;
playing = "False";
// Defines track names shown in playlist and playing window
for (i in PL.data.Tracks) {
Tracks[i] = PL.data.Tracks[i];
Artists[i] = PL.data.Artists[i];
Files[i] = PL.data.Files[i];
}
_level0.LoadList(Tracks,Artists);
}
And obviously, the load function doesn't work either because the save function doesn't write anything to the SO...
Is there anything I have overlooked? From what I have heard, it is possible to save arrays into SOs, but this method isn't working. Much thanks for any help.
--Andrew
---Trmbne2000@hotmail.com
View Replies !
View Related
Shared Objects
Is there any way that I can save the .sol file along with my swf
Regards
Dabz
================================================== ====================
"Life is a mirror, what you do is reflected back to you, Be nice to
everyone"
================================================== ====================
View Replies !
View Related
HELP With Shared Objects
is it possible to record the top 10 highest scores sorted i order by using shared objects?? if so, then how is it done?
i badly need to know how to make a high score record for a game that is intended to be played on a standalone computer and NOT on the internet...
Please please help me....
thanks!!!
View Replies !
View Related
HELP W/ Shared Objects
is it possible to record the top 10 highest scores sorted in order by using shared objects?? if so, then how is it done?
i badly need to know how to make a high score record for a game that is intended to be played on a standalone computer and NOT on the internet...
Please please help me....
thanks!!!
View Replies !
View Related
Can I Do This With Shared Objects ?
ok i am trying to get the hang of this command and so far i got it to work. But now i want to go to the next step but dunno if thats possible and how.
I'm trying to make some sort of database in flash. what i was wondering is if it is possible that i can use a add another person option... so i can add new persons at any time and then when i alter the info and numbers of the person it will save it and i can see/edit those numbers again when i choose the person from a list ?!?
can i save all these persons in just one file ? or do i need to create multiple files, and if so how can i let it auto make a new file with info with persons name ?!?!
I hope i explained myself good enough
thanx in advange
assenoost
View Replies !
View Related
Shared Objects Help
Hi,
I'm trying to set up 'placeholder' of sorts, so that when a user clicks a "set bookmark" button, the _currentframe is recorded in a sharedobject. The next time the movie is run, the movie will automatically gotoAndStop to where the _currentframe was recorded (the frame the user was on when the "set bookmark" button was pressed)
I am attempting to do this with shared objects, rather than cookies.
My first frame is a blank key frame, with actionscript:
-----------------------------------------------------------
//create the local Shared Object
so = SharedObject.getLocal("bookmarker");
//if shared object has data already in it
if( so.data.placeHolder != null )
{
_root.gotoAndPlay( so.data.placeHolder );
}
------------------------------------------------------------
then, in subsequent frames, the user can click a button. This button has actionscript:
------------------------------------------------------------
on(release)
{
so.data.placeHolder = _root._currentframe;
}
------------------------------------------------------------
this method works perfectly when testing a movie, so if i set a bookmark, close the swf, and testmovie again, it will automatically jump to where i set the bookmark
the problem is when I export/publish, neither running the swf nor the html file works in whatever dir i publish to; the sharedobject data isnt remembered so the movie will always start at the beginning rather than the bookmarked frame.
I am guessing it is a problem associated with the path of the shared object and where it is stored. Is there a way to always store it in a user's IE cache?
Thanks for any suggestions
View Replies !
View Related
Oh Where Oh Where Have My Shared Objects Gone?
Just discovered SOs, and have replaced all my cookie scripts with them. Love them, and they are working just grand, but . . . I want to touch and feel them the way I can cookies. Where the heck ARE they on my hard drive? And can I expire them using the clock? Any tips on expiring appreciated. The MM documentation on them is a little weak. Okay, nonexistent in the help menu.
amy o'd
View Replies !
View Related
Shared Objects
Hi,
I am trying to make a drawing application in MX. I want the user to save his stuff file wise, and open them whenever he wants to and see the contents. I know how to use the shared object thingie in MX, but what I want is that the user can save the content(Ideally the frame of the movie) with a proper file name. And he can go on saving as many files as possible. He can then later open them and see the content.
Is it possible? Pl help
Thx
View Replies !
View Related
Shared Objects
I know I have been using the FlashKit Forum a lot lately. I have a major project and I am stepping out in new teritory with this one. I am a veteran viedo guy with lots of experience in animation with Flash and After Effects but when it comes to "True" interactivty and the more complex Action Scripting I have trouble. I need to know how to use Shared Objects in a stand-alone projector so that the first time the client runs the application they are using the default settings I have set for some of the options in the various panels. After they run the application for the first time, if they do not change any of the settings (defaults) I want those to stay in place, but once they do make changes I want to keep their settings for the next run. Please help.
Thanks!!
View Replies !
View Related
Shared Objects
Please help me with this one… I’m well and truly stuck.
I pray that there is a simple solution to my problem that does not involve databases, coldfusion, flash remoting …. Just flash, javascript or xml please !!!!
Step 1. A Pocket PC 2002 runs a flash 6 swf that creates and populates a shared object.
Step 2. The Pocket PC is connected to a Desktop PC.
Step 3. On the PC the user goes to a html page and needs to upload data.
Question. How can a swf or html running on a PC locate and read the contents of the Pocket PC shared object?
__________________
Here's hoping,
Regards,
Yvonne.
)
View Replies !
View Related
Shared Objects
Does anyone know how to store variables in the Shared Objects folder, like in the game Balloon Duel on newgrounds? I know how the folder works and everything, but I just need to know how to store the variables. Thanks.
View Replies !
View Related
Set Shared Objects Using PHP?
Is there a way to set shared objects using PHP?
My Flash site tries to remember the last page visited, regardless of using the Flash version or the html. When the flash website loads, it gets the SHaredObject data and redirects the user to the relevant page based on the last page it visited. If the user was browsing my site using the Flash version, it's all good. But if the user was browsing via the HTML version, then I would need to set the sharedObjects accodingly via PHP.
Another solution to this is using a cookie.. and im sure it's gona work for both Flash and HTML.. but i would like to know the sharedObject solution, if there ever is one.
Tea
View Replies !
View Related
Shared-objects
How do I go about to make a cookie in flash with shared objects? I want to play a diffrent swf depending on what kind of conection the visitor has. broadband or dial up.
/thanks
View Replies !
View Related
|