Any help would be appreciated. Thanks
Card Script:
Code: Select all
on ScrollSet
local tScrollerRect, tContentRect
// Set the area of the scroller
put the rect of group "scrollArea" into tScrollerRect
// Set the are of the content to be scrolled
put the left of img"picture" ,the top of img"picture" ,the right of img"picture" ,the formattedHeight of img"picture" into tContentRect
##put 0,0,(the formattedWidth of group "scrollArea"),(the formattedHeight of group "scrollArea") into tContentRect
// Create the scroller control
mobileControlCreate "scroller", "loremScroll"
put the result into sScrollerID
// Set the properties of the scroller
--mobileControlSet "loremScroll", "contentRect", (0, 0, the width of img"picture", the height of img"picture")
mobileControlSet "loremScroll", "rect", tScrollerRect
mobileControlSet "loremScroll", "contentRect", tContentRect
mobileControlSet "loremScroll", "visible", true
mobileControlSet "loremScroll", "scrollingEnabled", true
mobileControlSet "loremScroll", "vIndicator", true
mobileControlSet "loremScroll", "hIndicator", true
mobileControlSet "loremScroll", "vscroll", 0
mobileControlSet "loremScroll", "hscroll", 0
end ScrollSet
on closeCard
// Delete the scroller
if environment() is not "mobile" then exit closeCard
mobileControlDelete sScrollerID
end closeCard
on scrollerDidScroll hOffset, vOffset
// When the user scrolls move the displayed content
set the vScroll of group "scrollArea" to vOffset
set the hScroll of group "scrollArea" to hOffset
put "Scrolled to" && hOffset & comma & vOffset into field "scroller status" of card "home"
end scrollerDidScroll
Code: Select all
Button 1:
on mouseUp
lock screen
put empty into img "picture"
set the width of img "picture" to "7500"
set the height of img "picture" to "3379"
set the defaultFolder to "/mnt/extsd/Maps"
set the topLeft of img "picture" to "0,0"
put URL ("binfile:" & "Alpha.png") into img "picture"
ScrollSet
unlock screen
end mouseUp
Button 2:
on mouseUp
lock screen
set the width of img "picture" to "2500"
set the height of img "picture" to "1126"
set the topLeft of img "picture" to "0,0"
ScrollSet
unlock screen
end mouseUp