well this is what it should be.
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import flash.net.SharedObject;
private var myso:SharedObject =
SharedObject. getLocal( "test");
private function flushData():void
{
myso.data.david = "confused";
myso.flush() ;
}
]]>
</mx:Script>
</mx:Canvas>
Mayorbrain
--- David Freerksen <[EMAIL PROTECTED]> wrote:
> I created a new MXML based component based on
> Canvas. I copy/pasted everything in the Script tags
> to the new MXML component and saved. Now I get a
> different set of errors. The first two errors are
> the same. It is
> "Can not resolve a multiname reference
> unambiguously. SharedObject (from C:\Users.....)"
> The third error is
> "Type was not found or was not a compile-time
> constant:SharedObject."
> The fourth error is
> "Access to undefined property SharedObject."
> The fifth and sixth error is:
> "Access of undefined property myso."
>
> Here is my code from the MXML component
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <mx:Script>
> <![CDATA[
> import flash.net.SharedObject;
> var myso:SharedObject =
> SharedObject.getLocal("test");
> myso.data.david = "confused";
> myso.flush();
> ]]>
> </mx:Script>
> </mx:Canvas>
>
>
>
> ----- Original Message ----
> From: okegbenle mayowa <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Wednesday, December 12, 2007 3:14:35 PM
> Subject: Re: [flexcomponents] SharedObject
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> i want to believe the error is not on
> the code.it must
>
> be some compiler malfunction. try creating a new
> mxml
>
> component and copy the code into it.
>
>
>
> MayorBrain
>
>
>
> --- David Freerksen <honoraryvato@ yahoo.com> wrote:
>
>
>
> > I still can't get it to work. I removed absolutely
>
> > everything from the MXML page (other than the
>
> > Application and Script tags). All that is left is
>
> > this
>
> >
>
> > public static function getClient(): void{
>
> > var sharedObject: SharedObject =
>
> > SharedObject. getLocal( "ctuser") ;
>
> > }
>
> >
>
> > It's not even getting called anywhere yet and I am
>
> > still getting an error. "Call to a possibly
>
> > undefined method getLocal through a reference with
>
> > static type Class." Doesn't even help if I import
>
> > flash.net.SharedObj ect either.
>
> >
>
> >
>
> > ----- Original Message ----
>
> > From: okegbenle mayowa <brainny2002@ yahoo.com>
>
> > To: flexcomponents@ yahoogroups. com
>
> > Sent: Tuesday, December 11, 2007 11:26:02 PM
>
> > Subject: Re: [flexcomponents] SharedObject
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > this is snippet from a working
> program,
>
> > hope it helps/
>
> >
>
> >
>
> >
>
> > public static function removeUsernameOnCli
>
> > ent():void
>
> >
>
> > {
>
> >
>
> > var sharedObject: SharedObject =
>
> >
>
> > SharedObject. getLocal( "jewelryaffairus er");
>
> >
>
> > sharedObject. clear();
>
> >
>
> > }
>
> >
>
> > public static function
>
> >
>
> > saveUserTheme( swfThemeName: String):void
>
> >
>
> > {
>
> >
>
> > var sharedObject: SharedObject =
>
> >
>
> > SharedObject. getLocal( "jewelryaffairus er");
>
> >
>
> > sharedObject. data.userTheme = swfThemeName;
>
> >
>
=== message truncated ===
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping