开发者

Save data into external files in AS3, with out server?

HI

How can I save some text information in local hard-disk with out the server support. I know shared object, but i dont use this. I need to save all these function in anther external file as text.

Is there any way to do that in AS3.0.

I don't prefer Flex, am working in Action Scrip开发者_如何学Ct 3.0 & Flash IDE

EDIT:

My swf is saved in a local machine. So no server interaction or browser interaction. the swf is running a local folder and read txt files from local folder, and save once press the save button.


Use the save method of class FileReference since Flash Player 10.0


How can I save some text information in local hard-disk with out the server support.

How are you defining local in this case? Local to the server or local to the client? Nothing server side is going to help you save anything local to the client. Also, nothing client side is going to help you save anything to the server.

You can use Shared Objects to store local information from the Flash Player. These are like cookies, though, and are probably not what you're looking for.

If this is an AIR app you can use the File API to save local files. These APIs are not available when running a web app, though.

If you're okay with prompting users for the save location, you can use the FileReference.save method.

If the file already exists on the server, you could link to it, causing the browser to handle it. Browser settings will determine what actually happens, though. IT may try to render the file, it may prompt the user to download, or open it.


You could try to use XML to save and retrieve data ( it could act as a local database)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜