Image replacement from camera don´t remove when tap button to go next page

Hello everyone!

After an image is replaced from camera and go next or previous page, the image always stay in the same position in every single page, never gone.

 

How can I resolve this problem?

 

I will really appreciate your help!

 

Many Thanks!

Can you share the related code snippet so we can see what’s going on?

@bgmadclown

Hello, 

 

Thank you very much for your help. Really appreciate it.

Last night I got the solution!    sceneGroup:insert(photo); instead of  group:insert(photo);  :smiley:

But, I have a new question know :(   I´m gonna open a new topic but before that I would like to ask you first…

This is the code I use in my app for image replacement from iPad camera:

local onComplete = function(event) local photo = event.target photo.x = 1745; photo.y = 1380; photo.xScale = 1; photo.yScale = 1; sceneGroup:insert(photo); end if media.hasSource( media.Camera ) then media.show( media.Camera, onComplete ) end

Do you Know how to activate only front facing camera? In other words, The child take photo of themselves

Many thanks in advance for your help. 

 

Victor

I haven’t used it myself but have you tried this?

https://docs.coronalabs.com/api/library/display/setDefault.html#camera-source-1

My problem is I don´t know where add or replace this lines in my code:

if ( system.getInfo( "environment" ) ~= "simulator" ) then display.setDefault( "cameraSource", "front" ) -- Front-facing camera end

Do you know how?

How about this?

https://docs.coronalabs.com/api/type/ShapeObject/fill.html#camera-source-fill

Many thanks!

 

I’m working on it!

 

Best!

Can you share the related code snippet so we can see what’s going on?

@bgmadclown

Hello, 

 

Thank you very much for your help. Really appreciate it.

Last night I got the solution!    sceneGroup:insert(photo); instead of  group:insert(photo);  :smiley:

But, I have a new question know :(   I´m gonna open a new topic but before that I would like to ask you first…

This is the code I use in my app for image replacement from iPad camera:

local onComplete = function(event) local photo = event.target photo.x = 1745; photo.y = 1380; photo.xScale = 1; photo.yScale = 1; sceneGroup:insert(photo); end if media.hasSource( media.Camera ) then media.show( media.Camera, onComplete ) end

Do you Know how to activate only front facing camera? In other words, The child take photo of themselves

Many thanks in advance for your help. 

 

Victor

I haven’t used it myself but have you tried this?

https://docs.coronalabs.com/api/library/display/setDefault.html#camera-source-1

My problem is I don´t know where add or replace this lines in my code:

if ( system.getInfo( "environment" ) ~= "simulator" ) then display.setDefault( "cameraSource", "front" ) -- Front-facing camera end

Do you know how?

How about this?

https://docs.coronalabs.com/api/type/ShapeObject/fill.html#camera-source-fill

Many thanks!

 

I’m working on it!

 

Best!