Can i convert TimerEvent to MultitouchInputMode ?
hi to all I'm trying to create a siple app for android (spaceinvaders) and I created a TimerEvent for the laser
this is the code
___________
//Create a timer that executes a function every 1/2 second
var laserTimer:Timer = new Timer(500);
laserTimer.addEventListener(TimerEvent.TIMER, timerListener);
function timerListener(e:TimerEvent):void
{
//In the Library linkage for a movieclip should be Laser
var tempLaser:MovieClip = new Laser();
//place the laser at the tip of the pla5er's ship
tempLaser.x = player.x +(player.width/2);
tempLaser.y = player.y;
tempLaser.speed = 10;
Lasers.push(tempLaser);
addChild(tempLaser);
var sound:Sound = new shoot();
sound.play();
}
//Lasers array is required;
function moveLaser():void
{
//Move Laser
var tempLaser:MovieClip;
for (var i=Lasers.length-1; i>=0; i--)
{
tempLaser = Lasers;
tempLaser.y -= tempLaser.speed;
if (tempLaser.y < 0)
{
//Remove laser 1 from Lasers array;
removeLaser(i);
}
}
//Remove any tempExplosion from the explosions array that has already played;
var tempExplosion:MovieClip;
for (i=explosions.length-1; i>=0; i--)
{
tempExplosion = explosions;
if (tempExplosion.currentFrame >= tempExplosion.totalFrames)
{
removeExplosion(i);
}
}
}
____
now I'm asking to convert this code whit a Multitouch event this is the code
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
movieClip_1.addEventListener(TouchEvent.TOUCH_TAP, fl_TapHandler);
function fl_TapHandler(event:TouchEvent):void
{
//code
}
_____
What should I do if it 'possible?
many tnks to all
