Adobe Dreamweaver Forums



Last 10 THreads :         DIV in Table not working. (Last Post : Murray *ACE* - Replies : 11 - Views : 12 )           »          navigation bar in div (Last Post : jody25 - Replies : 2 - Views : 3 )           »          Disabling menu bars in a browser window (Last Post : Jay Jay - Replies : 6 - Views : 7 )           »          Cannot Connect Remotely to FTP using Dreamweaver CS4 (Last Post : Murray *ACE* - Replies : 15 - Views : 114 )           »          Library is missing names from splitter bar (Last Post : Murray *ACE* - Replies : 10 - Views : 11 )           »          Multiple Netstreams (live feeds) best practices (Last Post : techeye - Replies : 3 - Views : 4 )           »          Dynamic XML Array Push ? (Last Post : Jadeivy - Replies : 0 - Views : 1 )           »          How to make a paypal button? (Last Post : loki2357 - Replies : 0 - Views : 1 )           »          How to align XML loading text to right (Last Post : Boxing Boom - Replies : 8 - Views : 9 )           »          Why is this not working!!! (Last Post : NedWebs - Replies : 10 - Views : 11 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #11 (permalink)  
Old 11-26-2008, 04:54 AM
scotchfasterr
 
Posts: n/a
Diggs:
Default Re: Local Shared Objects and multiple SWFs: mutexesnecessary?

Yeah, I still think there's something quirky here. Consider the attached code.
If writeSharedObject() is called, and then another instance in the same domain
writes a different value to mySO.data.test, readSharedObject() will still
output "Hello world". The fix: add "mySO = null;" to the end of both functions,
or use local variables.

Obviously, this code is simplified for illustration purposes. Hope this is
helpful for someone else.

private var mySO:SharedObject;

private function writeSharedObject():void
{
mySO = SharedObject.getLocal("mySO", "/");
mySO.data.test = "Hello world";
mySO.flush();
mySO.close();
}

private function readSharedObject():void
{
mySO = SharedObject.getLocal("mySO", "/");
trace( mySO.data.test );
mySO.close();
}

Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 10:51 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk