Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / How to use the camera to make a background image

Author
Message
Jonney
9
Years of Service
User Offline
Joined: 29th Nov 2014
Location:
Posted: 18th Jul 2015 16:12
I am trying to make an app that uses a .png image that is either taken with the camera or selected from the gallery to be set as the background. You then tap anywhere on the background screen and a smaller ball.png image is placed in front, in the position you touch the screen. I would then like to be able to save the final combined images as one and send/share this final image with others but I have not attempted that part yet because I am still trying to get the background to display when captured/selected.

Any help would be very much appreciated.


Maghnus
9
Years of Service
User Offline
Joined: 12th Jul 2015
Location:
Posted: 18th Jul 2015 19:22 Edited at: 18th Jul 2015 19:38
After indentation and a quick walkthrough with the debugger using stop points at your labels (this is before even looking at your actual code), it appears your buttons exit the do loop and never return, leading your program to dive off the deep end into obscurity and probably self-termination.



I'll see if I can't get you back on track without mussing it up.

EDIT: I only made a couple of changes here. I changed your gotos to gosubs, since it appeared you were using them more like subroutines. I also changed if imageID = 1 to if imageID > 1 because you theoretically don't know what the image ID will be. FYI, IDs assigned by the compiler will start at 10001, so imageID = 10001 would have also worked, but imageID = 1 would never be true.
Jonney
9
Years of Service
User Offline
Joined: 29th Nov 2014
Location:
Posted: 18th Jul 2015 20:00
Hi Maghnus,

Thank you very much for that.
I just learned a lot from you there.

I added your changes and the image I take with the camera now displays which is great.
Now that I am motivated to keep going,I will try and figure out how to add the ball graphic on top when I tap on the image.

Thank you.

Login to post a reply

Server time is: 2024-11-21 20:58:31
Your offset time is: 2024-11-21 20:58:31