Code: Select all
function InitializeBrowser pBrowserArea
put wordOffset("stack",pBrowserArea) into tWord
put word 1 to (tWord -2) of pBrowserArea into browserAreaID
put the rect of browserAreaID into tBrowserRect
put the windowid of this stack into tWindowId
put "http://www.google.com" into tURL
if environment() is "mobile" then
mobileControlCreate "browser", "mainScroll"
put the result into sBrowserID
mobileControlSet sBrowserID, "rect", tBrowserRect
mobileControlSet sBrowserID, "visible", true
mobileControlSet sBrowserID, "url", tURL
--set the layer of button "HomeButton" to top
else
put revBrowserOpen(tWindowID, tURL) into tBrowserID
if tBrowserId is not an integer then
answer "Error opening browser: " & tBrowserID
exit InitializeBrowser
end if
put tBrowserId into sBrowserID
revBrowserSet sBrowserID, "showborder", true
revBrowserSet sBrowserID, "rect", tBrowserRect
end if
end InitializeBrowser
The header has two LiveCode Button with very simple mouseUp scripts. They are combined with a text string into a Group and are at the very top of the page.
The button with this script works fine.
Code: Select all
on mouseUp
launch url "http://www.google.com"
end mouseUp
Code: Select all
on mouseUp
go to card "Welcome"
end mouseUp
I just need a way for the user to go back to the main program. Any suggestions?