Flint Particle System Forum - Strange collision performance problem 2012-05-26T06:37:25+01:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher Strange collision performance problem http://flintparticles.org/forum/comments.php?DiscussionID=536&Focus=1782#Comment_1782 2011-11-08T21:47:43+00:00 2012-05-26T06:37:25+01:00 dwightepp http://flintparticles.org/forum/account.php?u=552 So I have two different gametypes, one you have to hit each pin once to win and the other it just counts the total hits. for some reason "type1" starts to slow down and use more memory, ...
[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 2011-11-08T22:31:43+00:00 2012-05-26T06:37:25+01:00 dwightepp http://flintparticles.org/forum/account.php?u=552 so I tried have the image in frame two being the same as frame 1, performance increased. Were' talking about really small images here, can't believe that would affect the frame rate so much that it ...