Flint Particle System Forum - Strange collision performance problem Sat, 26 May 2012 06:43:28 +0100 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher Strange collision performance problem http://flintparticles.org/forum/comments.php?DiscussionID=536&Focus=1782#Comment_1782 http://flintparticles.org/forum/comments.php?DiscussionID=536&Focus=1782#Comment_1782 Tue, 08 Nov 2011 21:47:43 +0000 dwightepp
[code]
function collisionHandler(_event:ParticleEvent):void{
//plays hit animation
hitPin.x = _event.otherObject.x;
hitPin.y = _event.otherObject.y;
hitPin.play();
//plays hit sound
var collideSound = new collide();
var channel:SoundChannel = collideSound.play();

if(masterGameType == "type1"){ //code for pin clearing game type
//moves both movieclips involved in collision to frame two, making the pin green
_event.particle.image.gotoAndStop(2);
_event.otherObject.image.gotoAndStop(2);
pinsHitRound++;
}else if(masterGameType == "type2"){//code for hit counter game type
if(_event.particle.dictionary['type'].substr(0,3) == 'pin' || _event.otherObject.dictionary['type'].substr(0,3) == 'pin'){
totalHits++;
hitCounter.text = totalHits;
}
}

}
[/code] ]]>
Strange collision performance problem http://flintparticles.org/forum/comments.php?DiscussionID=536&Focus=1783#Comment_1783 http://flintparticles.org/forum/comments.php?DiscussionID=536&Focus=1783#Comment_1783 Tue, 08 Nov 2011 22:31:43 +0000 dwightepp