Code: Select all
global photoSource
on mouseUp
put "library" into photoSource
pickPhoto
end mouseUp
on pickPhoto
put the loc of graphic "shoppingPhoto" of cd "content" into theLoc
put the height of graphic "shoppingPhoto" of cd "content" into theHeight
put the width of graphic "shoppingPhoto" of cd "content" into theWidth
mobilePickPhoto photoSource, theHeight, theWhidt -- photoSource is camera or library
if the result is empty then -- no errors
set the name of the last image to "myImageTempName"
set icon of button "imageButton" to "myImageTempName"
end if
end pickPhoto