Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my game, I want to implement touch listener for my child scene objects. Basically I tried all the possible way to implement this that I have usually done for my normal scenes, but those methods do not work here. Could somebody provide some guidance for setting touch area listener in child scene?

Here is my code:



    menuScene.setOnAreaTouchListener(new IOnAreaTouchListener() {

        public boolean onAreaTouched(TouchEvent pSceneTouchEvent,
                ITouchArea pTouchArea, float pTouchAreaLocalX,
                float pTouchAreaLocalY) {
            return true;

In this code, menuScene was a child scene activity.

Also after research I found that my engine was stopped while the child scene was activated so the touch event is not detected. I want to implement a pause menu in my game so any desirable solution for a pause menu implementation would help.

share|improve this question

Are you still having the problem? Try checking out the AndEngine example for the pause menu

if(this.mEngine.isRunning()) {
        this.mMainScene.setChildScene(this.mPauseScene, false, true, true);
else {

The above code should work for a pause menu.

share|improve this answer
In that example, the touch event of the pause button was not implemented and I want that touch event implementation. The engine was stopped so no touch event is possible that was my problem. In that particular example all the thing was handle using menu button of the device. But I don't want that implementation. – Siddharth Aug 4 '12 at 5:12

I used



share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.