A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: Save TO Projector?

  1. #1
    Junior Member
    Join Date
    Sep 2002
    Posts
    12

    Save TO Projector?

    Hi guys

    Can anyone tell me whether it is possible to save INTO a projector file?

    Scenario is this:

    I have a Projector file, say John.exe. It has dials on it which John can move to different settings. I want to be able to save the settings BUT this Projector file needs to be dragged around to different machines and to save the settings as it goes. I don't want to have to also drag a .txt or xml file around as well so the settings need to be saved in John.exe. Is this possible?

    (Each projector (John.exe) can be renamed (Bill.exe, Sharon.exe) and given to different clients, but clients don't necesarily have internet connection, so cannot save settings remotely)

    If this is not possible, any ideas? (I can just about scrape by with simple c programs if needed)

    Thanks guys, this is my first ever forum post, help a new guy. I googled til my fingers bled I swear, theres nothing/

    (FLASH MX)
    Last edited by keniway; 04-30-2008 at 08:34 AM.

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    My product, SWF Studio, is the only projector tool I know of that can do this.

    The Scratch.read and Scratch.write commands are what you're looking for.

    I've attached a really simple example. You'll need a copy of SWF Studio to test this but there's a free trial version available from www.northcode.com.
    Attached Files Attached Files
    Last edited by Northcode; 04-30-2008 at 11:32 AM.

  3. #3
    Senior Member
    Join Date
    Jun 2004
    Location
    UK
    Posts
    451
    Interesting. So if I have a SWF Studio projector on a certain machine, I'm assuming that scratch.read can read back scratch.write data from a previous session if the computer had been switched off in the meantime? This would be useful for password id processing...

  4. #4
    Junior Member
    Join Date
    Sep 2002
    Posts
    12

    not giving up

    re: My product, SWF Studio, is the only projector tool I know of that can do this.

    Yes Mr Northcode, I'm well aware that your program can do the trick, I've been searching all day for a solution and you keep popping up everywhere. I'm doing this project for a charity and they can't afford big dollars for fancy programs, sorry. Besides that, If your program can do it then so can I. I realise saving to the program is nigh on impossible for newbigrunts like me, but I intend to write to a text file using a bat, whicvh it seems is also impossible, but I reckon I can do it, if I can then the millions of other people trying to do that will hopefully benefit as well. (well thaousands anyway from what Google says).

    Thanks anyway brother, I'm just not in the vibe for 3rd parties.
    Last edited by keniway; 04-30-2008 at 05:45 PM.

  5. #5
    Senior Member
    Join Date
    Jun 2004
    Location
    UK
    Posts
    451
    That seems unnecessarily harsh. Northcode is just pointing something out. And if you are determined to do it yourself, why did you ask the question? There IS a free trial version -- can't you use that for 30 days to do what you want to do?

  6. #6
    Junior Member
    Join Date
    Sep 2002
    Posts
    12
    Yes it was, I apologise Northcode. No doubt your product is very good.

  7. #7
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    Interesting. So if I have a SWF Studio projector on a certain machine, I'm assuming that scratch.read can read back scratch.write data from a previous session if the computer had been switched off in the meantime? This would be useful for password id processing...
    goliard: The Scratch commands work by adding an encrypted block of data to the end of the EXE. So, yes, the data is persistent. If you've ever tried to make an EXE modify itself you'll understand that this is a pretty cool trick

    keniway You didn't mention that you were doing this for a charity in your post, but I'm a pretty reasonable guy. Tell you what. If you try SWF Studio and it does what you need, I'll donate a copy to the charity so it won't cost them a penny. Just send an email to support@northcode.com and I'll keep an eye out for it

  8. #8
    Junior Member
    Join Date
    Sep 2002
    Posts
    12
    ok IF YOU READ THE NOTES ABOVE YOULL see what im trying to do, and im so close..but yet so farr. please check the zip for my next dilemma, Ive managed to save some data in a so, get it into a text file and i can almost bring it back into the projector, but for some unfathomable reason, the txt file with the data needs to be opened manually and then saved before the projector will import it. its wierd and hard to explain, just open the fla and export as projector, info is included to clarify.

    Cheers guys, i know someone will know straight away what the problem is

  9. #9
    Junior Member
    Join Date
    Sep 2002
    Posts
    12

    the zip file

    heres the files
    Attached Files Attached Files

  10. #10
    Junior Member
    Join Date
    Sep 2002
    Posts
    12

    Path to nowhere

    actually, dont bother, ive just realised that the new flash players will have adobe in the path to shared obs rather than macromedia i.e.

    C:\Documents and Settings\%username%\Application Data\Macromedia\Flash Player\localhost\example_a.sol will be different now.

    never mind (sigh)

  11. #11
    Junior Member
    Join Date
    Sep 2002
    Posts
    12

    Last post

    Yep, I don't think there is any realistic way to save data to a document, never mind to an exe with out 3rd party software. Beleive me I've tried, it seems the whole offline world is geared up to refuse point blank any shinanigans involving writing to a file.

    Tried northcodes swf studio and it does what I want absolutely perfectly, although I think I may have to work out a way to save several bits of data in the one scratch area if I do use it, but I suppose reading and writing comma seperated values would be simple enough.
    It does what it says on the tin - saves to the exe and keeps the data no matter where you run it from = plus it looks like theres a lot more too.

    Thanks for the help

  12. #12
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    There is one way I can think that you could make this work without a commercial third party tool. If you installed Apache and PHP on the machines where your projector was going to run you could have the projector talk to a PHP script running on the localhost (127.0.0.1). That PHP script could access the entire machine and write to a local file. You could use _url.substr(8,1) to get the drive letter where the EXE was run from (e.g. A:) and pass that to the PHP script so it could write the data to a known location. It's a bit of work but it could be done and it's a free solution.

    Regardless of whether that's a viable solution for you or not, Mervin will have a SWF Studio registration email waiting in his inbox in the morning with everything you need to start using SWF Studio.

  13. #13
    Junior Member
    Join Date
    Sep 2002
    Posts
    12

    Mmm

    Yes Northcode that's right, I'm better with PHP than Flash and I run Apache with PHP/Mysql on my own machine for testing. But as I say I need the app to be usable on any macchine without installin anything preferably on a little floppy for convenience (dont think I could squeeze an apache onto a floppy ). Anyhow the program is nearly finished - it saves the settings to a out of veiw text box, each variable comma seperated. As soon as I see Mervin I'll make northcode swf studio scratch that text box so that each tiome the app is started the scratched data is reloaded - magnificent being able to do that, really turns me on(in a nerdy kind of way.

    Meanwhile this app will soon be available on flashkit using a csv to import the data, wont be able to save (scratch) settings from the flash GUI of course, but its a way to view boring data in a pleasing way, keep yourr eye out for "CLOX" on flashkit in the near future.

    That really is my last thread here, I hope people will avoid trying to write data from MX onwards by reading this lot, might ssave them some time -

    3rd party is the ONLY way folks

    OUT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center