Here is the script of the initiating button:
Code: Select all
global tFile, sBrowserID
on mouseUp
put the short name of this cd into tFile
replace space with "%20" in tFile -- I read you have to do this when the name has space. True?
put "file://"&tFile&".pdf" into tFile -- I read somewhere that "file://" must be prepended to the filename
go stack "pdf viewer" -- would it be simple to put the browser on a separate cd of the same stack?
end mouseup
Code: Select all
global sBrowserID, tFile
on openCard
browserOpen
end openCard
on browserOpen
put the windowID of this stack into tWinID
put revBrowserOpen(tWinID,"") into sBrowserID
revBrowserSet sBrowserID, "showborder","true"
revBrowserSet sBrowserID, "rect", rect of image "browser image"
end browserOpen
--- the browser does open
BrowserSetURL tFile
on BrowserSetURL
revBrowserSt sBrowserID, "url", tFile
end BrowserSetURL
on mouseup
global tFile
revBrowserClose sBrowserID
delete global tFile
close this stack
end mouseup
Monty May