Parallax Scrolling With Movieclip character

I know this been asked many times in forums [Parallax Scrolling] I read through all of those forums and I checked out the Parallax Module and the Camera Module. I got down how to use the Camera Module but not sure if its best approach for my current game. I will post a link below of a person asking a similar question to mine but got no reply so im left thinking which path should I take.

What Im trying to accomplish is a character who will move when I hit left Arrow and right arrow its a movieclip character to simulate movement. But I will have 2 backgrounds next to each other to make it seem like one big background and in front of the backgrounds there will be static objects. I will also keep the character from going off screen once it reaches both ends. Ok my question is how can I make my character travel between 2 backgrounds back and forth simulating one big background think of it like a Mario bros game you start in point A you travel to point B as you travel the background scrolls and you meet new objects along the way.

Link: http://developer.anscamobile.com/forum/2011/09/11/simple-scrolling-help-needed-parallax

Thanks in advance!

Good to remember that each graphics object inserted to a display group has precedence of order based on the order they were put into the group. The order of the images can be reordered programmatically later on in the code if needed.

In other words, Display the sky, then mountains, then foreground like trees or buildings, and finally your game piece or game character. Each will be layered correctly over the other, and any layer in the group can be scrolled or moved independently of the other. The foreground then mountains, then sky can move at progressively faster or slower speeds to give the parallax effect.

-David

Keep in mind you can use obj:toFront() and obj:toBack() to move the hero "between" images :)

@ peach

I did not know those API exist lol ill look into them Thanks.

No worries; just keep in mind they are toFront and toBack - so it's not possible to move an image back "one place", or one "layer" like in Photoshop.

EG;
A
B
C

to become;
C
B
A

Would require you move C to front then A to back, etc.

Still VERY useful though :)

Peach

Ohh...I did not know about that Peach!

Thank you for telling it.

views:1622 update:2011/11/14 9:16:56
corona forums © 2003-2011