Duplicate movie clip

Hi, Can someone explain to me how I can increase the quantity at a given time being displayed… and the _y: line of code please?

[AS]
play();

amount = 5000;
i= 0;

this.onEnterFrame = function(){

valueObj = {_x: Math.random()*710, 
		_y: Math.random()*-550 + 550, 
		_xscale: Math.random()*100,
		_yscale: Math.random()*100,
		_alpha: Math.random()*100
}
	
if(amount>0){
	flower.duplicateMovieClip ("mc"+i, i, valueObj);
	i++;
	amount--;
	trace("reflectEnter");
}

}
[/AS]

probebly something like
your question is a little unclear however without the original FLA file.


play();
amount = 8000;
i= 0;
this.onEnterFrame = function(){        
  valueObj = {_x: Math.random()*710, _y: Math.random()*-600 + 600, _xscale: Math.random()*100, _yscale: Math.random()*100,  _alpha: Math.random()*100 } 
if(amount>0){
  flower.duplicateMovieClip("mc"+i, i, valueObj);
  i++;
  amount--;
  trace("reflectEnter");
  }
}

increasing the amount doesn’t solve the problem. I want to be able to increase the general quantity appearing on the stage or decrease. here is the fla

Does anyone have any ideas about this?

ok, this is what I did with it. Try punching this in and see how it differs

play();
amount = 100000;
i= 0;
this.onEnterFrame = function(){
	valueObj = {_x: Math.random()*710, 
			_y: Math.random()*550, 
			_xscale: Math.random()*50+50,
			_yscale: Math.random()*100+100,
			_alpha: Math.random()*50+50
	}
	if(amount>0){
		flower.duplicateMovieClip ("mc"+i, i, valueObj);
		i++;
		amount--;
		trace("reflectEnter");
	}
}

I think that the number of them doesn’t look like it’s increasing because they are all squeezed in at the bottem. I solved the _y location by making it a straight random 1 - 550, instead of what they had it set at.

I’ve also upped the alpha levels to between 50 and 100 % rather than 1 - 100%, and tweeked the scaling a little.

play around with the numbers.

Question. Can I ask who’s effect this is. I’d like to use a variation of it, and I always give credit to originators when I can.

I don’t remember where this script came from, it’s basically been modified a bunch of times so it’s kind of a new version.

So I tried yer code and it still feels more like fireflies than stars, it’s not an even randomness blend across the stage but more like insects. I don’t know, if you have any more suggestions that would be great. Thanks!

Here is what I have so far, basically it still feels like a bunch of fireflies rather than twinkling stars. Could someone please help me make this look more like a twinkling start field? Thanks!

:pope: any ideas?