# I need help with actionscript urgently please

**URL:** <https://forum.kirupa.com/t/i-need-help-with-actionscript-urgently-please/168581>\
**Category:** Uncategorized\
**Created:** [November 8, 2005, 2:44pm UTC](https://forum.kirupa.com/t/i-need-help-with-actionscript-urgently-please/168581 "2005-11-08T14:44:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manod100](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@manod100](https://forum.kirupa.com/u/manod100)\
**Post date:** [November 8, 2005, 2:44pm UTC](https://forum.kirupa.com/t/i-need-help-with-actionscript-urgently-please/168581/1 "2005-11-08T14:44:53Z")

</div>

hi this is amanda here. i am making a flash game for uni and im having a major problem. i have falling roses from the sky but i want them to stop when they get to a certain frame, (42). anyway ive tried everything to stop them when they get to frame 42 but they wont. this is the actionscript that i have on the frame of the redroses…

depth = 0;  
rroses = new Array();  
function makeNewClip() {//  
clearInterval(ranID); //  
ran = (Math.random()\*4000)+1000;  
ranID = setInterval(makeNewClip, ran);  
newClip = \_root.attachMovie(‘redanime’, ‘redanime’+depth, depth++);  
rroses.push(newClip);  
newClip.\_x = Math.random()\*500;  
newClip.\_y = 3;  
newClip.speed = (Math.random()_50)+20;  
newClip.onEnterFrame = function() {  
this.\_y += this.speed;  
if (this.\_y\>520) {  
var my\_sound = new Sound();  
my\_sound.attachSound(“blackhit”);  
my\_sound.start();  
updateScore(-10);  
for (i=0; i\<rroses.length; i++) {  
if (this == rroses_) {  
rroses.splice(i, 1);  
//trace(rroses)  
}  
}

this.removeMovieClip();  
}  
};  
}  
makeNewClip();  
\_root.createEmptyMovieClip(‘watchCollision’, -2);  
watchCollision.onEnterFrame = function() {  
for (i=0; i\<rroses.length; i++) {  
if (rroses\*.hitTest(basket)) {

rroses\*.removeMovieClip();  
rroses.splice(i, 1);  
var my\_sound = new Sound();  
my\_sound.attachSound(“redhit”);  
my\_sound.start();

updateScore(10);

}  
}  
};  
score = 0;  
function updateScore(amount) {  
score += amount;  
\_global.scoreis = score;

}

updateScore(0);

please tell me how do i get it to stop on frame 42 its really urgent.

thank you :ne:
