Quick Question

Oh k. I’m doing a easing out transistion and right now I’m using some scaling code.


onClipEvent(enterFrame) {
	if(grdChk == 1 && _root.Grades._width >= xSclTmp) {
		_root.Grades._xscale -= 4;	
		_root.Grades._yscale -= 4;
		_root.Grades._x += -53/speed;
		_root.Grades._y += -29/speed;
		
		_root.Subject._xscale -= 4;	
		_root.Subject._yscale -= 4;
		_root.Subject._x += -90/speed;
		_root.Subject._y += -5/speed;
	}
}

As you can see I am scale down 2 MC’s.

Now the question is on like “_root.Subject._x += -90/speed;” when speed is = 5, how come the _x will decrease but won’t let it go into the negatives? When I trace it out this is what I get:
237
219.1
201.15
183.25
165.3
147.4
129.5
111.55
93.65
75.7
57.8
39.9
21.95
4.05

Can somebody explain this to me real quick? I am tryin to use this sorta function to program an _alpha fade but can’t get it to stop.

is speed always constant?! and i’m not sure what you mean by the alpha fade thing?! Alphas lowest is 0 so why do you want it to go into negative?! or is that for something else?!!

I don’t want it to fade to 0. I want it to fade to like 50 or something. Actually, I figured it out. However, I want to change the color of some text, how would I fade that?

you would use the setRGB in flash. You can find it in the AS dictionary :slight_smile:

FYI I am trying to put this on a MC that is text. Will this still work? The code I’m using right now is


onClipEvent(load) {
	value = this.getRGB().toString(16);
	trace(value);
}

When I do this trace is undefined.