How do i store cookies in flex?

做~自己de王妃 提交于 2019-12-25 01:28:08

问题


I want to store some values in browser using cookies

but i don't do i do ?

please help me


回答1:


You have two options.

  • Using ExternalInterface and javascript.

    The ExternalInterface class is the External API, an application programming interface that enables straightforward communication between ActionScript and the Flash Player container– for example, an HTML page with JavaScript. Adobe recommends using ExternalInterface for all JavaScript-ActionScript communication.

  • Using local SharedObjects from within Flex

The SharedObject class is used to read and store limited amounts of data on a user's computer or on a server. Shared objects offer real-time data sharing between multiple client SWF files and objects that are persistent on the local computer or remote server. Local shared objects are similar to browser cookies and remote shared objects are similar to real-time data transfer devices.




回答2:


You can take a look at this library called JSinterface on GoogleCode

http://code.google.com/p/jsinterface/



来源:https://stackoverflow.com/questions/1879240/how-do-i-store-cookies-in-flex

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!