The answer to fileImportWeb.
Returns "" while nothing has happened yet; then, once, the stored file's name - or "*cancelled*" if the user cancelled (or the file was too big for the web file store).
File IO
Parameters & Returns
Parameters
This function takes no parameters.
Returns
String
Quick Summary
The answer to fileImportWeb.
Returns "" while nothing has happened yet; then, once, the stored file's name - or "*cancelled*" if the user cancelled (or the file was too big for the web file store).
Technical Exegesis...
The answer to fileImportWeb. Check it every frame: it gives the result only once, then "" again, so the code that loads the file runs once.
Web target only: on the desktop, programs read and write real files, so they don't need it. See Building for the Web (File System). GUI programs using BGI can use bgiExportFileWeb / bgiImportFileWeb instead, which answer with a BGI event.
The answer to fileImportWeb. Check it every frame: it gives the result only once, then "" again, so the code that loads the file runs once.
Web target only: on the desktop, programs read and write real files, so they don't need it. See Building for the Web (File System). GUI programs using BGI can use bgiExportFileWeb / bgiImportFileWeb instead, which answer with a BGI event.
Returns: "" while nothing has happened yet; then, once, the stored file's name - or "*cancelled*" if the user cancelled (or the file was too big for the web file store).
Example
Example.bam
Local name:String = fileImportWebResult()
If name = "*cancelled*" Then
status = "No file chosen"
ElseIf name <> "" ThenLocal f:Int = fileReadFile(name)
status = "Loaded " & fileReadLine(f)
fileCloseFile(f)
EndIf