Hmm, compiled for me in a current build,
haven’t tried on the beta though.
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Teoti Graphix
Sent: Monday, February 13, 2006
5:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders]
SharedObject.getLocal() Flex2 beta1
Hello, has anyone had
this problem in the beta?
Taken from their help...
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"
creationComplete="initApp()">
<mx:Script>
<![CDATA[
import
flash.net.SharedObject;
public var
mySO:SharedObject;
[Bindable]
public var
welcomeMessage:String;
public function initApp():void
{
mySO =
SharedObject.getLocal("mydata");
if (mySO.data.visitDate==null) {
welcomeMessage = "Hello first-timer!"
} else {
welcomeMessage
= "Welcome back. You last visited on " + getVisitDate();
}
}
private function
getVisitDate():Date
{
return mySO.data.visitDate;
}
private function
storeDate():void
{
mySO.data.visitDate = new Date();
mySO.flush();
}
]]>
</mx:Script>
<mx:Label id="label1"
text="{welcomeMessage}"/>
<mx:Button label="Log Out" click="storeDate()"/>
</mx:Application>
I can't even run this becasue I am getting..
with LINE ==> "mySO =
SharedObject.getLocal("mydata");"
"Call to a possibly undefined method 'getLocal' through a reference with
static type 'Class'"
I am stumped, first I thought it was they had no import, added the flash.net still gives me this error?!
Peace, Mike
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|