|
-
fade text in and out?
I created a text field dynamically. That works great. Now I want to fade the text in and out. I tried putting it into a mc and changing the alpha, but that didn't work. Any ideas?
-
Noor._alpha = 0 !
here u go !
i dun think that can be done using a dynamic text field..even if it's within a mc but my idea is to create another movie clip with a borderless rectangle in it (it's color depeneds on ur background color) and put it above the movie that has the dynamic text and make it's alpha = 100 for fade out effect and make alpha=0 for fade in effect..
but for fade in and fade out effect u gotta use setInterval() , clearInerval() functions..
let me know if it works..
good luck
Noor
-
Thanks for the reply. I created another mc dynamically with a higher depth, and put it over the text. The text still shows through it. Any ideas on what I'm doing wrong? I'm trying to keep everything dynamic.
Thanks again.
-
Can't Re-Member
put this on the MC....
Code:
onClipEvent (load) {
this._alpha = 0;
this.onEnterFrame = function() {
if (this._alpha<100) {
this._alpha += 5;
trace(this._alpha);
} else if (this._alpha>=100) {
trace("It's Done!");
delete this.onEnterFrame;
}
};
}
-
That or put a movie clip on top of the text that fades in with the bacground and out to display teh text.
-
Noor._alpha = 0 !
read this carefully..
hey gamist,
the thing is (NOT) to create an empty movie clip and just put on the other movie clip (BUT) create a movie clip with a white borderless rectangle in it and then put it above the movie and control it's alpha to get the fade in , fade out effect..
-
I used the code below and put it at a higher depth than the text, but for some reason the text always shows:
//Function that draws the rectangle
function drawRectangle(nameOfMC,left,right,top,bottom,boxCo lor,lineColor,depthNumber) {
_root.createEmptyMovieClip(nameOfMC,depthNumber);
with(nameOfMC) {
beginFill(boxColor, 100);
lineStyle(1, lineColor, 100);
moveTo(left,top);
lineTo(right,top);
lineTo(right,bottom);
lineTo(left,bottom);
lineTo(left,top);
}
}
-
Noor._alpha = 0 !
i didn't work much with creating movie contents dynamicly, why don'tu try to create a movie and put a rectangle in at (DESIGN TIME)..that is going to work..i have just tried that,,
Good Luck,
Noor
-
Thanks. I just created a mc the old fashioned way like you recommended. It worked. I was just hoping to have my whole movie dynamic.
Thanks again for your help.
-
Noor._alpha = 0 !
i know what u meant..u wanted to be unique..u r a capricorn if im not worng..but something is gifted, accept it..
Good Luck,
Noor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|