问题
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
ExternalInterfaceclass 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 usingExternalInterfacefor all JavaScript-ActionScript communication.Using local SharedObjects from within Flex
The
SharedObjectclass 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