ARe FadeIn and FadeOut difficult?

my problem is fadeIn and FadeOut ? How can i use fadeIn and FadeOut Function?
You can see this url

http://bj.mng.cc/RollOver3Btn.html

WHat i mean is
If mouse over button1 then fadeIn btn1mov. and if i rollover button2 then fadeOut btn1mov and fadeIn btn2mov. and so on. I can do this just if i have 2 buttons.
But third button is a bit strange. 'coz If mouse over button1 then fadeIn btn1mov. but i cann’t fade out btn1mov.

HELP ME this.
Thanx everyone.

Ok ! I will try explaning this I hope you understand it !

Place the text that appears in the left down corner in to a movie clip !

Then convert it to a Movie clip then edit the text or the movie clip by clicking it 2 times ! then make a tween in the timeline ! thats in the movie clip that you have created then set the tween 10 frames long ! then in the furst frame set the alpha of the “text” to 0% and the last frame thats frame 10 to alpha = 100% !

I hope this helps ! or you undertsand ! say so if you dont !(-:

Thanx for your help
Blastboy.
But i wanna a something just different from your advice. Maybe you visit that page. Maybe that is help you just what i mean.
could i use a function that something fadeIn and fadeOut. or something different.

MovieClip.prototype.fade = function(desAlpha, rate) {
	this.onEnterFrame = function() {
		if (this._alpha<=desAlpha) {
			this._alpha += rate;
			if (this._alpha>desAlpha) {
				this._alpha = desAlpha;
				delete (this.onEnterFrame);
			}
		}
		if (this._alpha>=desAlpha) {
			this._alpha -= rate;
			if (this._alpha<desAlpha) {
				this._alpha = desAlpha;
				delete (this.onEnterFrame);
			}
		}
	};
};

on your button

on(rollOver){
mc.fade(100,10);
}
on(rollOut){
mc.fade(50,10);
}

this function is two way fade, u can control it as u like…
but if u want to separate it to fadeIn() and fadeOut() function, i think u can make it from the sample above…
search www.proto.layer51.com for more fade function…

this is for the fadeOut function

MovieClip.prototype.fadeOut = function(speed) {
	this._alpha = 100;
	this.onEnterFrame = function() {
		this._alpha -= speed;
		if (this._alpha<=0) {
			this._alpha = 0;
			delete (this.onEnterFrame);
		}
	};
};

the fadeIn it would be easy now isn’t it??

Thanx.
indojepang.
I have to check this script and if i have problem.
may i ask question?

sure… if ican help…:stuck_out_tongue:

Sorry indojepang.
That script doesn’t work.
Can u attach a fla file. Or explain usega of that script a little more.
THanx

this is the fla that use fade() function, another is comin: fadeIn() & fadeOut()…

btw last night i copied too much function for u… :slight_smile: feel sleepy…

prototypes are a bit confusing for new users, indojepang… but it looks like you have a good feel for them. I may pick your brain soon as I’m trying to develope a tutorial explaining them in newbie terms.

I look forward to you trying to explain them to mngBJ. :slight_smile:

i experienced the same trouble before…:slight_smile:
btw it would be a great tutorial !!!

this is the 2nd fla…
I hope i’m not wastin page here…:stuck_out_tongue:

Thanx. indojepang.
That’s just what i need. And I will finish my work. so easy.
And again thanx

u welcome…:slight_smile: function is ROck!!

Can i switch a variables between 2 different swfs.
What i mean is
In my firts.swf contain a number. (i=5)
So in the second.swf begins frame number 5. COz i took i=5;
if i=6 second.swf begins from 6-th frame.

Is it possible? :( :(

i don’ get the picture here… what do u wanna do?

in a one word: that is i wanna run my swf at any frame number?
that is maybe i can do.
And also FMX how can i draw a rectangle using action script?

sorry i really don’t understand… may be someone can help u with that…
but for draw rectangle, search http://proto.layer51.com/default.aspx

Thanx. indojepang.