I am making a runner game in air for android actionscript 3.
It has two buttons. One for Jumping and one for running. It runs to the right.
As my character runs to the right the background also scrolls to the left.


Now the problem is I need to add some obstacles for the character. The character needs to jump on it to avoid losing life.


How can I add a obstacle and a health bar T_T. Also can the obstacles be on random so that the user won't predict where the obstacles are.

Help me please! I can't figure it out