Avatar billede jammer Nybegynder
15. november 2000 - 10:55 Der er 2 kommentarer og
1 løsning

FileIO

Er der nogen der ved, om det er muligt at skrive til HD fra Shockwave uden at skulle benytte en Xtra? FileIO kan så vidt jeg ved, kun benyttes når der eksisterer en Xtra! Jeg er godt klar over, at jeg kan sende til ASP og skrive til DB, men det kunne jo være meget smart, hvis man ikke behøvede at lave alt for meget kode!
Avatar billede crunch Nybegynder
15. november 2000 - 11:18 #1
du kan bruge set setPref / getPref komandoen.
læs selv:

Syntax    setPref prefName, prefValue
    Example    Command; writes the string specified by prefValue in the file specified by prefName on the computer’s local disk. The file is a standard text file.

The prefName argument must be a valid file name. To make sure the file name is valid on all platforms, use no more than eight alphanumeric characters for the file name.
After the setPref command runs, if the movie is playing in a browser, a folder named Prefs is created in the Plug-In Support folder. The setPref command can write only to that folder.
If the movie is playing in a projector or Director, a folder is created in the same folder as the application. The folder receives the name Application Folder, where Application is the name of the application. For example, a projector named BigBand would have a folder named BigBand Folder.

Do not use this command to write to read-only media. Depending on the platform and version of the operating system, you may encounter errors or other problems.
This command does not perform any sophisticated manipulation of the string data or its formatting. Any formatting or other manipulation must be performed in conjunction with getPref; the data can then be manipulated in memory and written over the old file via setPref.
In a browser, data written by setPref is not private. Any Shockwave movie can read this information and upload it to a server. Confidential information should not be stored using setPref.

Example    This handler saves the contents of the field cast member Text Entry in a file named “DayWare settings”:

on mouseUp
    setPref the text of member ¬
    \"Current Preferences\", \"DayWare settings\"

end
Avatar billede crunch Nybegynder
15. november 2000 - 11:19 #2
- men det er altså kun txt format du kan skrive i ! (du kan selv formatere det når du henter det ind igen..)
Avatar billede jammer Nybegynder
15. november 2000 - 16:17 #3
Great, takker...
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester