Hey, I’m having loads of trouble getting movie clips to delete. Can anyone help? Basically this codes for a load of lines that draw within a load of movie clips which are constantly moviing across the screen like a tunnel…when the movie clips come off the screen I want them to delete otherwise the tunnel keeps getting longer and longer and eventually kills your computer, lol.
Has anyone tried doing something similar, or can anyone help me fix it so that things delete when they go off the screen.
I would appreciate any help so much!
this version has no delete functions as I’ve given up,
if anyone wants to give it a shot please do :)
thanks in advance
Sam
scenewidth = 550
points = 50;
x= 0;
speed = scenewidth/points;
tunnel = 150
y = Math.random()*200 + 175
createEmptyMovieClip("block", 50);
for ( var i=0; i < points; i ++ ){
duplicateMovieClip("block", points, i)
block.lineStyle(5, 0xFF0000, 100)
block.moveTo(x, y)
block.lineTo(x+scenewidth/points, y)
block.moveTo(x, y-tunnel)
block.lineTo(x+scenewidth/points, y-tunnel)
x+=scenewidth/points
y+=Math.random()*10-5
}
onEnterFrame = function(){
trace(i);
for ( var i=0; i < 1; i ++ ){
duplicateMovieClip("block", points, i)
block.lineStyle(5, 0xFF0000, 100)
block.moveTo(x, y)
block.lineTo(x+scenewidth/points, y)
block.moveTo(x, y-tunnel)
block.lineTo(x+scenewidth/points, y-tunnel)
x+=scenewidth/points
y+=Math.random()*10-5
}
_x-=speed
}