Page 1 of 1

Placing image from iPhonePickPhoto

Posted: Thu Nov 17, 2011 10:54 am
by grovecat
I have created an image object ("thePhoto"), into which I want to place the photo chosen via the iPad (in this case) photo picker. Using this bit of code:

on mouseUp
iphonePickPhoto library 440, 330
put the last image into the image "thePhoto"
end mouseUp

Now this does the job exactly, but it also puts a copy of the photo in the centre of the screen. I can't find a way to prevent this happening or deleting the extra copy. I'm sure there is a very simple solution ...

TIA
Don

Re: Placing image from iPhonePickPhoto

Posted: Thu Nov 17, 2011 11:22 am
by Klaus
Hi Don,

well, that's the way it works!
"iPhonePickPhoto" does always create a NEW image on the current card, get used to it 8)

I would do something like this:

Code: Select all

on mouseUp
  if there is an img "thePhoto" then
     delete img "thePhoto"
  end if
  iphonePickPhoto library 440, 330
  set the name of last img to "thePhoto"
end mouseUp
Noone will tell the difference! :D


Best

Klaus

Re: Placing image from iPhonePickPhoto

Posted: Thu Nov 17, 2011 12:36 pm
by grovecat
Thanks again Klaus.

Cheers
Don