I previously created a topic titled "Uploading photo from library and storing in the iPhone app." However this caused some confusion as it was pointed out that you don't "upload" something to an app from the iPhone you "import" it.
So this is what I am trying to do and could really do with some help.
I have created a card within a stack that has 10 blank buttons, the buttons all have the following code (apart from set the left and set the top number):
Code: Select all
on mouseUp set the lockloc of the templateimage to true set the width of the templateimage to "72" set the height of the templateimage to "72" set the left of the templateimage to "32" set the top of the templateimage to "135" mobilePickPhoto "library" if the result is empty then end if end mouseUp
The next part is what I am struggling with....I want to be able to save the imported photo with the app so it remains there after the app has been closed. The code I have entered to the stack script is this (which has not worked):
Code: Select all
on shutdown --set default folder to writeable directory on mobile set the defaultFolder to specialFolderPath("Documents") --puts the name of the current card into a text file called mobiletest.txt put the short name of this card into URL ("file:mobiletest.txt") pass shutdown end shutdown on openStack --set default folder to folder with text file in it set the defaultFolder to specialFolderPath("Documents") -- places the contents of this text file into a temp variable put URL ("file:mobiletest.txt") into tState --navigates to the card names in the temp variable go card tState end openStack
I hope I have made sense with this topic.