I thought this thread from the forums might be of wider interest,
regarding shared objects in flash

---------- Forwarded message ----------
From: OpenLaszlo Developers Forums <[EMAIL PROTECTED]>
Date: Nov 16, 2006 11:59 AM
Subject: Reply to post 'solo deployment log issue'
To: [EMAIL PROTECTED]


Dear hqm,

d~l has just replied to a thread you have subscribed to entitled -
solo deployment log issue - in the LZX Coding Help forum of OpenLaszlo
Developers Forums.

This thread is located at:
http://forum.openlaszlo.org//showthread.php?t=7830&goto=newpost

Here is the message that has just been posted:
***************
If you have PHP then of course you can store user data server side.

But some SOLO apps run without server interaction and in this case
SharedObjects can be useful.

Shared Objects are "Flash cookies" which can be stored up to 100 kb in
local store, without user permission, and with user permission above
that size.

SharedObject files have extension .SOL and can contain types: numbers,
boolean, string, objects, arrays, XML, date, pointer.

Here are some bookmarked links explaining SharedObjects.

http://www.adobe.com/support/flash/action_scripts/local_shared_object/

http://www.flash-db.com/Tutorials/saving/savingData.php?page=3

http://www.kirupa.com/developer/actionscript/shared_objects.htm

http://www.actionscripts.org/tutorials/intermediate/SharedObjects/index.shtml

http://www.builderau.com.au/program/flash/soa/Create_powerful_Flash_applications_with_shared_objects/0,339028413,320278036,00.htm

....

To get an idea of where they SOL files are in your PC, install a SOL editor

....

For Windows ..

http://sourceforge.net/projects/soleditor


For Linux/Mac/Windows ..

http://solve.sourceforge.net/

.....

Here is an example in lzx code ..


Code:
---------
<canvas width="500" height="500" debug="true" >

<!-- from this tutorial:- -->
<!-- 
http://www.actionscripts.org/tutorials/intermediate/SharedObjects/index.shtml
-->

<script>

function checkSO() {
       // Does this client allow SharedObjects to be stored?
       // Create a dummy SO and try to store it
       mySO = SharedObject.getLocal("test");
       if (!mySO.flush(1)) {
               // SOs not allowed on this system!
               // Prompt user to change settings
               System.showSettings(1);
               } else {
               // SOs allowed
               Debug.write("Your system allows SharedObjects");
       }
}
checkSO();

// ================================

// Create an SO
mySO = SharedObject.getLocal("test");
// Add some important data
mySO.data.stickAround = "I'll be here for years to come!";
// Write the SO to the disk (I'm not checking for success here)
mySO.flush();
// Delete the SO
delete mySO;
// Reload the SO
mySO = SharedObject.getLocal("test");
// This time we're not adding any data, so when we write
// our SO it should the old data be overwritten, right?
mySO.flush();
// Delete the SO
delete mySO;
// Load the SO back in once more,
mySO = SharedObject.getLocal("test");
// Scan the SO for values
for (a in mySO.data) {
       Debug.write(a+": "+mySO.data[a]);
}
// Wrong! The trace shows our old values all still exist!

// ================================

// System.showSettings(1); // show settings panel

</script>
</canvas>
---------
After running this lzapp, check the SOL file using SOL edtor.

This is a simple example. You can add XML content, objects, arrays.

e.g. XML datasets can be written, after user changes.
***************


There may be other replies also, but you will not receive any more
notifications until you visit the forum again.

All the best,
OpenLaszlo Developers Forums

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unsubscription information:

To unsubscribe from this thread, please visit this page:
http://forum.openlaszlo.org//subscription.php?do=removesubscription&type=thread&subscriptionid=15027&auth=9066dff550a4430f2689464efc9da7f2

To unsubscribe from ALL threads, please visit this page:
http://forum.openlaszlo.org//subscription.php?do=viewsubscription&folderid=all


--
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to