How to place objects beyond the 480x320 Ipod screen

Is it not possible to place an image beyond the ipod screen. I mean, in the game I’m making the first scene moves to the left and outside the screen. Scene 2 takes its place. How do i place things for scene 2 beforehand?

for example, if i want an image at x = 20 for scene 2,

image.x = 500
does not work.

[import]uid: 175611 topic_id: 30839 reply_id: 330839[/import]

If you use storyboard, that includes many scene transition animations, including the one you describe.

http://docs.coronalabs.com/api/library/storyboard/index.html [import]uid: 87794 topic_id: 30839 reply_id: 123383[/import]

You can place images ‘off’ screen. image.x = 500 will place the image 20 pixels off the right hand side of the screen.

To move it on screen, you could do a transition on the object:

[lua]transition.to(image, {time = 1000, x = 20, transition = easing.inOutExpo})[/lua]

Or a transition on your overall display group (i.e. mainGroup, localGroup - whatever you called it). This is the equivalent of moving the ‘camera’ of your game so it looks at objects that were previously off screen.

[lua]transition.to(localGroup, {time = 1000, x = -480, transition = easing.inOutExpo})[/lua]

These approaches are handy for bringing in windows or popups on an existing scene. As @digitaloranges says, for distinct scenes with vastly different layouts, logic, purpose - it’s better to use storyboard which will use a different .lua file for each scene. It also means you can easily do fancy transitions between scenes with just a line of code. [import]uid: 93133 topic_id: 30839 reply_id: 123384[/import]

Thank you very much. both strategies were very useful. [import]uid: 175611 topic_id: 30839 reply_id: 123482[/import]

If you use storyboard, that includes many scene transition animations, including the one you describe.

http://docs.coronalabs.com/api/library/storyboard/index.html [import]uid: 87794 topic_id: 30839 reply_id: 123383[/import]

You can place images ‘off’ screen. image.x = 500 will place the image 20 pixels off the right hand side of the screen.

To move it on screen, you could do a transition on the object:

[lua]transition.to(image, {time = 1000, x = 20, transition = easing.inOutExpo})[/lua]

Or a transition on your overall display group (i.e. mainGroup, localGroup - whatever you called it). This is the equivalent of moving the ‘camera’ of your game so it looks at objects that were previously off screen.

[lua]transition.to(localGroup, {time = 1000, x = -480, transition = easing.inOutExpo})[/lua]

These approaches are handy for bringing in windows or popups on an existing scene. As @digitaloranges says, for distinct scenes with vastly different layouts, logic, purpose - it’s better to use storyboard which will use a different .lua file for each scene. It also means you can easily do fancy transitions between scenes with just a line of code. [import]uid: 93133 topic_id: 30839 reply_id: 123384[/import]

Thank you very much. both strategies were very useful. [import]uid: 175611 topic_id: 30839 reply_id: 123482[/import]