Cocos2d-html5 and Touch Problem

Hi,

I have used cocos2d previously and I am just beginning using the html5 version. Thank you for your work in creating this.

Unfortunately I am having trouble with a basic usage of this framework. It is one of the main reasons to use it - being able to make a game that can be used in a browser and on a touch device with the same code.

The issue I am having is with Touch. My code is working fine for mouse control, but my Touch are being ignored on both iOS and Android devices. Can someone please help me understand how to make Touch work, or is there something wrong with this build (2.1.3)? Of course, the menu touches work fine, the question is in my game code, which I put below. Please let me know where I am mistaken, thank you!

var GameplayScene = cc.Scene.extend({
    onEnter:function(){
        this._super();
        var layer = new GameplaySceneLayer();
        layer.init();
        this.addChild(layer);
    }
})

var redCircle;
var gameLayer;
var bulletSpeed=5;
var greenCircleArray=new Array();
var enemyCount=0;
var myClickCount=0;

var GameplaySceneLayer = cc.Layer.extend({
    init:function(){
        this._super();
        this.setMouseEnabled(true);
        this.setTouchEnabled(true);
        myClickCount=0;
        var circleSpeed = 2;
        var s = cc.Director.getInstance().getWinSize();
        gameLayer = cc.LayerColor.create(new cc.Color4B(153,51,153,255), 800, 500)
        for(i=0;i<20;i++){
            var greenCircle = cc.Sprite.create("images/greencircle.png");
            greenCircleArray.push(greenCircle);
            enemyCount = enemyCount + 1;
            var randomDir = Math.random()*2*Math.PI;
            greenCircle.xSpeed=circleSpeed*Math.cos(randomDir);
            greenCircle.ySpeed=circleSpeed*Math.sin(randomDir);
            gameLayer.addChild(greenCircle);
            greenCircle.setPosition(new cc.Point(Math.random()*800,Math.random()*500));
            greenCircle.schedule(function(){
                 this.setPosition(new cc.Point(this.getPosition().x+this.xSpeed,this.getPosition().y+this.ySpeed));
                 if(this.getPosition().x>800){
                    this.setPosition(new cc.Point(this.getPosition().x-800,this.getPosition().y));
                }
                if(this.getPosition().x<0){
                    this.setPosition(new cc.Point(this.getPosition().x+800,this.getPosition().y));
                }
                if(this.getPosition().y>500){
                    this.setPosition(new cc.Point(this.getPosition().x ,this.getPosition().y-500));
                }
                if(this.getPosition().y<0){
                    this.setPosition(new cc.Point(this.getPosition().x ,this.getPosition().y+500));
                }
            })
        }
        redCircle=cc.Sprite.create("images/redcircle.png");        
        gameLayer.addChild(redCircle);
        this.addChild(gameLayer);

        return true;
    },
        onMouseDown:function (event) {
        console.log("mouse down");
        myClickCount = myClickCount + 1;
            var location = event.getLocation();
            gameLayer.removeChild(redCircle);
            for(i=0;i<4;i++){
                var redBullet = cc.Sprite.create("images/redbullet.png");
                redBullet.xSpeed=bulletSpeed*Math.cos(i*Math.PI/2);
                redBullet.ySpeed=bulletSpeed*Math.sin(i*Math.PI/2);
                gameLayer.addChild(redBullet);    
                redBullet.setPosition(location);
                redBullet.schedule(function(){
                     handleBullet(this);
                })
            }
        },
        onMouseMoved:function(event){
            var location = event.getLocation();
            redCircle.setPosition(location);
        },
    onTouchBegan:function (touch, event) {
        console.log("touch began!");
        myClickCount = myClickCount + 1;
        var touchPoint = touch.getLocation();
        gameLayer.removeChild(redCircle);
        for(i=0;i<4;i++){
                var redBullet = cc.Sprite.create("images/redbullet.png");
                redBullet.xSpeed=bulletSpeed*Math.cos(i*Math.PI/2);
                redBullet.ySpeed=bulletSpeed*Math.sin(i*Math.PI/2);
                gameLayer.addChild(redBullet);    
                redBullet.setPosition(touchPoint);
                redBullet.schedule(function(){
                     handleBullet(this);
                })
            }
        },
    onTouchMoved:function(touch, event){
        console.log("touch move!");
        var touchPoint = touch.getLocation();
        redCircle.setPosition(touchPoint);
        }
})



function handleBullet(bullet){
    bullet.setPosition(new cc.Point(bullet.getPosition().x+bullet.xSpeed,bullet.getPosition().y+bullet.ySpeed));
    if(bullet.getPosition().x>800 || bullet.getPosition().y>500 || bullet.getPosition().x<0 || bullet.getPosition().y<0){
        gameLayer.removeChild(bullet);
    }
    for(i=greenCircleArray.length-1;i>=0;i--){
        var distX=bullet.getPosition().x-greenCircleArray[i].getPosition().x;
        var distY=bullet.getPosition().y-greenCircleArray[i].getPosition().y;
        if(distX*distX+distY*distY<144){
            gameLayer.removeChild(bullet);
            for(j=0;j<4;j++){
                var greenBullet = cc.Sprite.create("images/greenbullet.png");
                greenBullet.xSpeed=bulletSpeed*Math.cos(j*Math.PI/2);
                greenBullet.ySpeed=bulletSpeed*Math.sin(j*Math.PI/2);
                gameLayer.addChild(greenBullet);    
                greenBullet.setPosition(new cc.Point(greenCircleArray[i].getPosition().x,greenCircleArray[i].getPosition().y));
                greenBullet.schedule(function(){
                    handleBullet(this);    
                })    
            }
            gameLayer.removeChild(greenCircleArray[i]);
            greenCircleArray.splice(i,1);
            enemyCount = enemyCount - 1;
            if (enemyCount == 0){
            //go back to menu
            onReplaceSceneTran();
            }
        }
    }
}

function onReplaceSceneTran() {
    var scene = new GamereplayScene();
    var layer = new GamereplayLayer();
    scene.addChild(layer, 0);
    var director = cc.Director.getInstance();
    director.replaceScene(cc.TransitionSlideInT.create(2, scene));
}

Bump on my question related to basic touch implementation for this framework. It does not seem to be working for 2.1.3

I would appreciate some guidance here. Thank you