Skip to main content
Wholeo
Known Participant
October 29, 2006
Answered

sharedObject only in Flash 6?

  • October 29, 2006
  • 2 replies
  • 411 views
I downloaded the example file local_so.fla from this page:
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16194
Since I use Flash 8, it wanted me to save it as 8. I also updated the publish settings to export as Flash 8 with Actionscript 2. In the browser the local_so.swf in local_so.html does not work. Also fails if exported as Flash 7. But it does work when exported as Flash6, AS2. Why?
This topic has been closed for replies.
Correct answer
SharedObject, instead of sharedobject.

2 replies

Correct answer
October 29, 2006
SharedObject, instead of sharedobject.
Wholeo
WholeoAuthor
Known Participant
October 29, 2006
SharedObject is it. I changed this line:
myLocalSO = sharedobject.getLocal("flashcookie" );
to this:
myLocalSO = SharedObject.getLocal("flashcookie" );
and the program works with Flash 8, published as Flash 8.
I still haven't studied this deeply, but this is very encouraging. I was going to fiddle with the counter, but I guess the program does it with this line, before incrementing:
myLocalSO.data.counter = 1;

So thanks, both, for the tips!
Follow The Sand, a 5-year movie plan: Wholeo 2024
Inspiring
October 29, 2006
I don't think there were any changes in how SharedObject worked between Flash 6 and 7. I just flipped through my help files a bit and didn't see anything that said the behavior had changed either.

Usually when somebody says, "Works in 6, not in 7 or 8" it is one of the following issues. The biggest change between the two is that capitalization matters and you can't do things like increment undeclared variables.

So my guess would be that there is a variable that is spelled OneWay in one spot and oneWay in another, or some such.

Also look for anything like myCount++ when myCount has never been defined before.