home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
i·cite - visualizing sources
/
iCite.iso
/
data
/
sp_website2.dir
/
00004_Script_4
< prev
Wrap
Text File
|
2006-06-30
|
4KB
|
172 lines
global sTempDir
on LoadTut1
--sprite("Tutorial1").editable = false
_movie.go(1 , "Tut01")
end
on LoadTut3
--sprite("Tutorial1").editable = false
_movie.go(1 , "Tut03")
end
on LoadTut4
--sprite("Tutorial1").editable = false
_movie.go(1 , "Tut04")
end
on LoadTut2
--sprite("Tutorial1").editable = false
_movie.go(1 , "Tut02")
end
on loadMenu
-- sprite("Tutorial1").editable = false
_movie.go(1,"icite")
end
on loadMenuAnim
-- sprite("Tutorial1").editable = false
_movie.go(1,"TutAnim")
end
on loadMenuSource
-- sprite("Tutorial1").editable = false
_movie.go(1,"TutSource")
end
on loadMenuTut
-- sprite("Tutorial1").editable = false
_movie.go(1,"TutMenu")
end
on beginSprite
sprite("Menu").editable = true
end
on getflashstringPrintW
string1 = sprite(1).getVariable("printvar", TRUE)
fileObj1 = new(xtra "FileIO")
if the platform contains "mac" then
setFilterMask(fileObj1,"TEXT")
else
setFilterMask(fileObj1,"Text Files,*.rtf,All Files,*.*")
end if
filename = "c:\test.rtf"
set OK1 = baDeleteFile("c:\test.rtf")
createFile(fileObj1,filename)
openFile(fileObj1, filename,0)
writeString(fileObj1, string1)
closeFile(fileObj1)
set OK = baPrintFile(filename)
--_player.alert(string1)
--member("test").text = string1
--_movie.printFrom(1)
end
on getflashstringPrintM string1--,string2
string1 = sprite(1).getVariable("printvar", TRUE)
sTempDir = baSysFolder("temp")
set OK1 = baDeleteFile(sTempDir & "abc.txt")
--alert (sTempDir)
writeFile string1
iResult = baPrintFile(sTempDir & "abc.txt")
-- _player.alert(iResult)
if (iResult < 32) then
--_player.alert("Error occurred. Error Number = " & iResult)
end if
end
on startmovie
-- set the exitlock = 1
--sprite("Tutorial1").editable = true
end
on getflashstringSave string1, string2
-- create the FileIO instance
string1 = sprite(1).getVariable("savevar", TRUE)
fileObj = new(xtra "FileIO")
if the platform contains "mac" then
setFilterMask(fileObj,"TEXT")
else
setFilterMask(fileObj,"Text Files,*.rtf,All Files,*.*")
end if
-- save dialog box
filename = displaySave(fileObj,"","")
-- set getdir=getOSDirectory( )
-- check to see if cancel was hit
if filename = "" then return FALSE
else
-- create and open the file
createFile(fileObj,filename)
openFile(fileObj, filename,0)
--writeString(fileObj, the text of member "test")
writeString(fileObj, string1)
closeFile(fileObj)
-- write the file
-- fileObj.writeString("hello world")
---set OK = baPrintFile("c:\test.txt")
return TRUE
end if
end
on writeFile mystring
objFile = new Xtra("FileIO")
objFile.createFile(sTempDir & "abc.txt")
objFile.openFile(sTempDir & "abc.txt", 0)
-- objFile.writeString(String(member("txtFile").text)) -- Here specify the proper cast member name
-- _player.alert(mystring)
objFile.writeString(mystring)
--alert ("Status of the WriteString Function = " & objFile.error(objFile.status()))
objFile.closeFile()
end writeFile
on LoadWs1
-- sprite("Tutorial1").editable = false
_movie.go(1 , "SP_Website1")
end
on LoadWs3
-- sprite("Tutorial1").editable = false
_movie.go(1 , "SP_Website3")
end
on LoadWs4
-- sprite("Tutorial1").editable = false
_movie.go(1 , "SP_Website4")
end
on LoadWs5
-- sprite("Tutorial1").editable = false
_movie.go(1 , "SP_Website5")
end
on LoadBooks
_movie.go(1,"SP_Book1")
end
on LoadArticles
_movie.go(1,"SP_Articles1")
end
on LoadAudio
_movie.go(1,"SP_AudioVis1")
end