Skip to main content
GuitarChick
Participating Frequently
June 9, 2015
Question

Side scrolling action script 3.0

  • June 9, 2015
  • 1 reply
  • 322 views

I am making a children's game for school using Flash Professional CS6 and action script 3.0. The game is about a scuba diver that goes underwater to take photos of sea creatures. I will have photos at the bottom of the screen that the scuba diver will have to take and I would like them to disappear when the scuba diver collides with the sea animal swimming underwater. These sea creatures are always moving around underwater.

I need to create a side scrolling platform where the scuba diver follows the mouse and at the same time, the screen moves left and right. I have already made the scuba diver follow the mouse however I need help with the side scrolling code and collisions if it's connected to the side scrolling.

I primarily need the side scrolling code or instructions to get it.

My characters movie clip instance name is ScubaDiver and animals will have the name Animal1, Animal2, Animal3 and so on.

Please help me!!

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
June 9, 2015

What are your intentions as far as controlling the side scrolling... is it automatic and constant or is it triggered by the diver's screen position or is it controlled by some other criteria?

GuitarChick
Participating Frequently
June 9, 2015

‌I'd like it to be triggered by the diver's screening position. When it gets to the left and right edges of my background (which is already wider than my stage), I'd like the side scrolling to stop in that direction but sill be able to go back. The scuba diver would start in the middle and choose o go left or right until the edges of the background in which case would only be able to go back.

Ned Murphy
Legend
June 9, 2015

What about the position of the diver triggers the movement of the background?  What stops the movement?  How fast does the background move?  You should try to be as detailed as possible because this is the information you are going to need to try to make this work (I don't plan on coding it for you).