PDA

View Full Version : Writing to text file, offline, from Projector?


jacques10
04-08-2008, 01:07 PM
Hi everybody,

Thanks for this forum, I am new here, but have already had a lot of issues solved by just browsing the comments and questions here.

I have a problem at the moment, and just can't seem to find the solution!

Here goes:

I have a flash projector, to be used offline as an e-learning program, on a usb flash drive.

I would like the user to be able to 'bookmark' his position in the program, by recording a few variables, that can later be called back to take the user back to his origional position.

I can not use shared objects, as I want the user to be able to reload these variables(i.e. his bookmark) on a different computer.

I know that fscommand and the 'save' function can do that, but unfortunately I have heard that its not an option for macs, and a growing number of our users are using macs.

I started experimenting with tens of tutorials and examples of using php and a text file, this seems to be the way to go, but I just cannot get it to work.

My question is:

Can I use php/text file from a flash projector for this purpose, without the user getting the macromedia security popup('this bla bla is trying to communicate bla bla , unsafe operation)?

Are there any other options for me?

I have SWF Studio(Northcode), but I would like to explore other options!

Would anybody be so kind to maybe post some sourcecode on how this can be done, from a projector, offline, using php or another server side script?

Thanks a million to everybody trying to help!

northcode
04-08-2008, 02:17 PM
The SAVE command was only in the Flash 5 projector and was removed in future versions so it's not even an option for Windows anymore. If you can't use shared objects then the only other alternative is a third party tool (like SWF Studio). PHP won't work because you need a server and the server won't be able to write a local file, unless PHP is also running locally, which will require a local HTTP server as well.

jacques10
04-08-2008, 04:25 PM
Hi Northcode

Thanks a lot for that!

Actually, the reason why I didnt want to explore the SWF Studio option, is when I tried to view the write to file example, I couldn't download the file, with a strange *.spx extension - I just gave up in the end!

But since you seem to be affiliated with Northcode, and I did pay a bit for the software, do you mind shedding some light on what I need to do in order to make the example work?

Or maybe another tut/example on Northcode somewhere?

Thanks!

northcode
04-08-2008, 04:31 PM
I'm "kind of" affiliated with Northcode, I wrote the software :)

The SPX files are like ZIP files that work with SWF Studio. They contain the project (SPF) file and all the source files. If you right click on the SPX file and download it and then double click on it, it will be opened in SWF Studio. All the files will be extracted to a folder in the same place as the SPX file. All you have to do once you've opened the project is press the build button to create the EXE for the demo you downloaded.