-
OK, here's the idea and my somewhat failed attempt...
use FScommand to execute command.com, thus creating a .txt file to the user's hard drive.
After file is created, the stored variables can be later referenced for use in the standalone.
reason for this? Here's one... A user is navigating through your CD and wants to "bookmark" where he is for use later in a couple days when he has more time. He clicks a "bookmark" button, which creates a .txt file with a variable denoting the section of the movie he is in. A couple days later he inserts the CD, then chooses "Go to bookmark" from the movie's start page. At this point, the movie references the created .txt file for the variable "bookmark" and takes the user to that place in the movie. This would be great for instructional CDs that will be used over a period of days or weeks (sessions).
Now, here's my code:
fscommand ("exec", "command.com" add chr(9) add "/c" add chr(9) add "echo off" add chr(9)add "bookmark=this^is^where^you'd^store^the^locati on" add ">c:\bookmark.txt");
It seems to me that this should work, but for some reason it doesn't. I am getting a "file creation error" from the command line. If there are any suggestions, I'd love to hear them!
Regards,
Jabez
-
Umm.. Suggestion #1
Search the board.. I've read that it works.. I just haven't tried it yet.. (heard nasty things about MS-DOS window or something)
Suggestion #2
Use my program (Flash Beta Tools 4) if you haven't already..
http://www.flashkit.com/board/showth...threadid=20493
-
true, true
I have successfully gotten this command to work, however you are correct...
when FScommand executes the command.com, the dos window pops up (long enough to write the text file), then disappears. On most systems, this will cause the whole screen to go black for about a second. I guess if this method is to be used, one should warn the user that their screen may flicker briefly.
Master,
I have not used your app yet, but I have downloaded it. Does the function to write text files in your app cause any type of DOS screen to apear?
regards,
Jabez
-
My Solution
This is the code I used to make it work for me...
on (release) {
fscommand ("exec", "command.com\t/c\techo\\bookmark=thisiswhereyoustorethelocation>c :\\bookmark.txt");
}
Put this action on a button and you are all set. You can also get creative by dynamically setting the variable "bookmark" in your movie and then placing that generated variable into the above command.
Jabez
Note:this code was used in Flash5... don't know how it works in F4
-
its real fickle.
I must Access the command with:
C:\COMMAND.COM
Based on a Flash 4 SWF- I'll see if I can get this puppy to work on a Flash 4 based proj.
-
No it doesn't use a MS-DOS window that would be pointless..
Not to mention that I'm not sure the command.com stuff would work on all implementations of windows (unlike my program) specifically there might be problems on Windows ME (DOS was removed) and Windows 2000