View Full Version : log
rahul_7star
August 12th, 2008, 08:52 AM
is there any way to create log file....i want to save data to text file and reterive from it...using flash only
randomagain
August 12th, 2008, 09:47 AM
via PHP yes, with xml
also CS3 is whizzy :P
glosrfc
August 12th, 2008, 07:10 PM
It's called SharedObject...check the help files
REEFˇ
August 12th, 2008, 07:12 PM
It's called SharedObject...check the help filesJust how exactly does SharedObject write to a text file? They store cookies holding variable values that are nullified when the cache is cleared.
Your best bet is to use a tiny PHP script that writes to a text file using data written from Flash. Flash then can read it and the user has no control over whether or not the data written stays or goes.
Krilnon
August 12th, 2008, 07:41 PM
What browser are you using that clears Flash's #SharedObjects folder?
REEFˇ
August 12th, 2008, 07:56 PM
Firefox 3, usually cleared upon request - I didnt mean it does it by itself.
Krilnon
August 12th, 2008, 08:47 PM
Unless you've installed an extension that clears SharedObjects, Firefox 3 won't clear them when you select everything in the 'Clear Private Data' dialog. That makes sense, too, because SharedObjects are accessible from Flash Player using all browsers and without using a browser.
bluemagica
August 13th, 2008, 03:24 AM
Well, instead of arguing on whether SharedObjects are deleted or not, maybe we should concentrate on the actual topic.
rahul, the way to go actually depends upon your situation, and the amount of data you want to store!
Text Files:-
Text Files can only communicate with flash via php.
They will have to stay server-side to be properly accessed by php.
These are good, when you need database like functionality on your server, but don't have access to an actual database like Mysql. Text files act as flat-file databases on your server.
XML files:-
These are the same as text files, but are more structured.
These are also server side and need php
They are good when you need access to repeated data, that is in a pattern(partent-child), like a quiz game question answers.
Shared Objects:-
SObjs are client side, means they stay on the users computer
They are simple flash objects, so they are easy to handle from flash and can communicate with flash directly.
However, they are commonly limited to a size of 100kb unless the user manually changes his settings.
These are good for data that only concerns the user, and which you dont need access to, like game progress and/or client customizations!
Since Sobj are stored client side, you yourself wont have access to them, and thus you neither can move them to a different place nor change them at will. Also they can get deleted under various situations, and also the size limit can cause problems if you try to store large data without asking the user to increase the size first. These can be thought of as a temporary way to store data.
On the other hand textfiles, and xml files, stay on your server, so you can easily manipulate them at will, and a change in one will be reflected upon all users. Also you can move them to different server or take backups for safety!
however, if you want to do serverside, then i highly recommend using a Mysql database if possible, instead of flat files!
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.