You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by jv...@gmail.com on 2025/10/01 21:41:31 UTC

RE: Using "cookies"

Hi Yishay,

Tanks for your answer.

I added the reference to asconfig.json according to your instructions, but it still doesn't recognize the "import mx.net.SharedObject" instruction. I've copied the library to the root of my project and other locations, trying to achieve a result, but it hasn't worked. Can you provide additional help with this? Thank you very much.

Regards,

Jorge Valeze

 

De: Yishay Weiss <yi...@hotmail.com> 
Enviado el: martes, 30 de septiembre de 2025 4:45
Para: users@royale.apache.org
Asunto: Re: Using "cookies"

 

Also, check out the storage library which contains classes such as LocalStorage, AMFStorage, and more.

  _____  

From: Josh Tynjala <joshtynjala@bowlerhat.dev <ma...@bowlerhat.dev> >
Sent: Monday, September 29, 2025 6:43 PM
To: users@royale.apache.org <ma...@royale.apache.org>  <users@royale.apache.org <ma...@royale.apache.org> >
Subject: Re: Using "cookies" 

 

Hi Jorge,

 

It looks like an emulated SharedObject class is implemented in the MXRoyaleBase library. This library isn't included by default, so you need to add it to your project's library-path compiler option (or js-library-path, if you are targeting JavaScript).

 

I don't know which editor you are using. However, if you are using Visual Studio Code, you should be able to add it to your asconfig.json under compilerOptions.

 

"js-library-path": [

    "${royalelib}/js/libs/MXRoyaleBaseJS.swc"

]

 

--

Josh Tynjala

Bowler Hat LLC 

https://bowlerhat.dev/

 

 

On Mon, Sep 29, 2025 at 8:17 AM <jvaleze@gmail.com <ma...@gmail.com> > wrote:

Hi,

I am try to use the example in the docs: 

 

You use the same static method getLocal() to create a new Local Shared Object or to retrieve an existing one.

public static function getLocal(name:String, localPath:String = null, secure:Boolean = false):SharedObject

Then call the method and save the referrence in a variable:

var myNewLocalSharedObject:SharedObject = SharedObject.getLocal("myNewLocalSharedObject");

Royale looks for an existing myNewLocalSharedObject.sol file in the local directory on the user’s computer. If it does not find one, Royale creates a new .sol file with that name. It then returns a reference to the file.

 

 

 

But I can not found the SharedObject object.

 

Thanks for your help.

 

Jorge Valeze


RE: Using "cookies"

Posted by jv...@gmail.com.
Thank you so much!!! Storage.swc made it really quick and easy.

 

 

De: Yishay Weiss <yi...@hotmail.com> 
Enviado el: miércoles, 1 de octubre de 2025 19:10
Para: users@royale.apache.org
Asunto: Re: Using "cookies"

 

You are trying to use MXRoayleBase per Josh's recommendation. I'm not sure but that may require a special flag in asconfig.json for using emulation mode. My comment was that it might be possible to use the Storage swc, which does not require a special configuration and should also be more lightweight. 

 

The tradeoff is between emulating Flex and saving some dev time and keeping it lightweight.

  _____  

From: jvaleze@gmail.com <ma...@gmail.com>  <jvaleze@gmail.com <ma...@gmail.com> >
Sent: Thursday, October 2, 2025 12:41 AM
To: users@royale.apache.org <ma...@royale.apache.org>  <users@royale.apache.org <ma...@royale.apache.org> >
Subject: RE: Using "cookies" 

 

Hi Yishay,

Tanks for your answer.

I added the reference to asconfig.json according to your instructions, but it still doesn't recognize the "import mx.net.SharedObject" instruction. I've copied the library to the root of my project and other locations, trying to achieve a result, but it hasn't worked. Can you provide additional help with this? Thank you very much.

Regards,

Jorge Valeze

 

De: Yishay Weiss <yishayjobs@hotmail.com <ma...@hotmail.com> > 
Enviado el: martes, 30 de septiembre de 2025 4:45
Para: users@royale.apache.org <ma...@royale.apache.org> 
Asunto: Re: Using "cookies"

 

Also, check out the storage library which contains classes such as LocalStorage, AMFStorage, and more.

  _____  

From: Josh Tynjala <joshtynjala@bowlerhat.dev <ma...@bowlerhat.dev> >
Sent: Monday, September 29, 2025 6:43 PM
To: users@royale.apache.org <ma...@royale.apache.org>  <users@royale.apache.org <ma...@royale.apache.org> >
Subject: Re: Using "cookies" 

 

Hi Jorge,

 

It looks like an emulated SharedObject class is implemented in the MXRoyaleBase library. This library isn't included by default, so you need to add it to your project's library-path compiler option (or js-library-path, if you are targeting JavaScript).

 

I don't know which editor you are using. However, if you are using Visual Studio Code, you should be able to add it to your asconfig.json under compilerOptions.

 

"js-library-path": [

    "${royalelib}/js/libs/MXRoyaleBaseJS.swc"

]

 

--

Josh Tynjala

Bowler Hat LLC 

https://bowlerhat.dev/

 

 

On Mon, Sep 29, 2025 at 8:17 AM <jvaleze@gmail.com <ma...@gmail.com> > wrote:

Hi,

I am try to use the example in the docs: 

 

You use the same static method getLocal() to create a new Local Shared Object or to retrieve an existing one.

public static function getLocal(name:String, localPath:String = null, secure:Boolean = false):SharedObject

Then call the method and save the referrence in a variable:

var myNewLocalSharedObject:SharedObject = SharedObject.getLocal("myNewLocalSharedObject");

Royale looks for an existing myNewLocalSharedObject.sol file in the local directory on the user’s computer. If it does not find one, Royale creates a new .sol file with that name. It then returns a reference to the file.

 

 

 

But I can not found the SharedObject object.

 

Thanks for your help.

 

Jorge Valeze


Re: Using "cookies"

Posted by Yishay Weiss <yi...@hotmail.com>.
You are trying to use MXRoayleBase per Josh's recommendation. I'm not sure but that may require a special flag in asconfig.json for using emulation mode. My comment was that it might be possible to use the Storage swc, which does not require a special configuration and should also be more lightweight.

The tradeoff is between emulating Flex and saving some dev time and keeping it lightweight.
________________________________
From: jvaleze@gmail.com <jv...@gmail.com>
Sent: Thursday, October 2, 2025 12:41 AM
To: users@royale.apache.org <us...@royale.apache.org>
Subject: RE: Using "cookies"


Hi Yishay,

Tanks for your answer.

I added the reference to asconfig.json according to your instructions, but it still doesn't recognize the "import mx.net.SharedObject" instruction. I've copied the library to the root of my project and other locations, trying to achieve a result, but it hasn't worked. Can you provide additional help with this? Thank you very much.

Regards,

Jorge Valeze



De: Yishay Weiss <yi...@hotmail.com>
Enviado el: martes, 30 de septiembre de 2025 4:45
Para: users@royale.apache.org
Asunto: Re: Using "cookies"



Also, check out the storage library which contains classes such as LocalStorage, AMFStorage, and more.

________________________________

From: Josh Tynjala <jo...@bowlerhat.dev>>
Sent: Monday, September 29, 2025 6:43 PM
To: users@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>>
Subject: Re: Using "cookies"



Hi Jorge,



It looks like an emulated SharedObject class is implemented in the MXRoyaleBase library. This library isn't included by default, so you need to add it to your project's library-path compiler option (or js-library-path, if you are targeting JavaScript).



I don't know which editor you are using. However, if you are using Visual Studio Code, you should be able to add it to your asconfig.json under compilerOptions.



"js-library-path": [

    "${royalelib}/js/libs/MXRoyaleBaseJS.swc"

]



--

Josh Tynjala

Bowler Hat LLC

https://bowlerhat.dev/





On Mon, Sep 29, 2025 at 8:17 AM <jv...@gmail.com>> wrote:

Hi,

I am try to use the example in the docs:



You use the same static method getLocal() to create a new Local Shared Object or to retrieve an existing one.

public static function getLocal(name:String, localPath:String = null, secure:Boolean = false):SharedObject

Then call the method and save the referrence in a variable:

var myNewLocalSharedObject:SharedObject = SharedObject.getLocal("myNewLocalSharedObject");

Royale looks for an existing myNewLocalSharedObject.sol file in the local directory on the user’s computer. If it does not find one, Royale creates a new .sol file with that name. It then returns a reference to the file.







But I can not found the SharedObject object.



Thanks for your help.



Jorge Valeze