Loading an image
Loading an image to a LiveCode stack is straightforward. In this recipe, you will learn how to load an image from the mobile device's photo library.
How to do it...
This recipe provides details on how to load an image from a mobile device's library.
Use the following code to prompt the user to select an image from their device's image library:
on mouseUp mobilePickPhoto "library" if the result is empty then // do something end if end mouseUp
Note
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
How it works...
For both iOS and Android devices, we can use the mobilePickPhoto
command to prompt the user to select an image from their device's image library. We accomplish this by passing library
as the parameter. Our code included...