Duplicate not showing up

I can’t seem to get the cir to show up can anyone tell me what am I screwing up. Thanks


init();
function init() {
	alpha = 1;
	curve = Math.floor(Math.random()*100)+1;
	ydist = Math.floor(Math.random()*10)+1;
	radius = 1000;
	centerx = 225;
	centery = 150;
	rotAngleDeg = 0;
	rotAngleRad;
}
function degreesToRadians(degrees) {
	return (degrees/180)*Math.PI;
}
function dup() {
	duplicateMovieClip("cir", "cir"+x, x);
	cir = _root["cir "+x];
	rotAngleDeg += 5;
	rotAngleRad = degreesToRadians(rotAngleDeg);
	cir._y = centery-Math.sin(rotAngleRad)*_ymouse/10;
	cir._x = centerx+Math.cos(rotAngleRad)*_xmouse/10;
	var newcol = new Color("cir");
	newcol.setRGB(x*(16777215/11));
	cir._alpha = x*alpha;
	cir._yscale = x/2;
	cir._xscale = x/2;
	cir._visible = false;
	if (x>80) {
		removeMovieClip("cir "+(x-80));
		x = 1;
	}
	x++;
}
cir .onEnterFrame = function() {
	dup();
};

WOO I just put this code up and noticed that all the 0 are some weird icon like an eye. If this shows up its a “0” not an icon .

[edit] edit by lostinbeta to disable smilies in post and show real code [/edit]

Cir isn’t a dynamically made movie clip, it is a clip on the stage.

Where did you get this code, what is it supposed to do?

hey lostinbeta how goes it ?
Its an experiment code in Flash Math Creative and I wanted to use it as a loader created by PaulPrudence. They way it was done in flash math creative was in a 3 frame loop but I wanted to make it more compact the code.
HERE IS A LINK TO THE FLASH MATH
it is circling 1 on the page

I KNEW THIS CODE LOOKED FAMILIAR!!!

LOL, Sorry, someone else posted on this forum with a question about that same code :slight_smile:

Well see, it is in a 3 frame loop because that is like its form of onEnterFrame, if you have it in 1 frame, in MX, it doesn’t count that frame as being looped over and over for some reason, so it won’t keep updating the code and instead it will just be there.

This is my theory on what is going on at least.

hem not sure I understand what you mean sorry.

Well you said the original code was in a 3 frame loop, but you wanted to compact it.

Well I assumed that you meant you wanted to make it 1 frame.

If your movie is only one frame long Flash will not loop around and update the new information with things you are using += with and such.

So your cir clip will just be one clip randomly changing colors…

You are using the onEnterFrame function to use this code on the clip “cir”, but an onEnterFrame function is used to act like the onClipEvent (enterFrame) of a movie clip, which is not how this movie updates it’s code.

[SIZE=1]are you getting it that I am confusing myself too?[/SIZE]

ah get you now. thanks

LOL really? Because I knew what I was talking about when I started typing, then I relooked at the code, and forgot what I was talking about… and ended up not making any sense to myself…lol.

Well I guess in short… these people crushed the code down as much as they possibly could :slight_smile:

Although MX could probably do more… not sure if you want to mess with that really :slight_smile:

I here you all for a loader I think I can come up with something faster than trying to work this out. Thanks for the advice.