View Full Version : Fade Out Problem - GotCha's Script
mirageforce
10-16-2005, 05:23 PM
Hello,
I've a question on the tutorial about animating text with actionscript. I tried to redo the tutorial from the beginning to make it exactly as the GotCha's tutorial which will make the text fly in and fade out. The problem is right now i can only make the text to fly in but to make the text to fade out i have to do it manually. I checked with the tutorial, all are exacly the same but still i can't manage to make it fade out automatically. When i test the movie it only fly in and then it stop. To make it fade out i have to right click at the movie and choose play. May i know what the problem is?Ok. Thanks for your help.
Here is my .fla
karlfb
10-17-2005, 03:19 PM
Hi,
First off i cant open ur fla. is states that is an unexpected file format lol.
I think i understand what you mean that your animation plays and then stops and you have to right click play for it too work. Is your text inside a movie clip?? is it embeded?? are you fading in and out using actionscript or are you doing it with a mask?
It sounds like you have a stop(); function somewere in the timeline thats stopping the movie, if this is the case you need to tell it to start playing again, this can be done by using lables and the sympol on press gotoAndPlay etc etc.
hope this helps if not get back to me
mirageforce
10-18-2005, 10:06 AM
Thanks karlfb for your reply. I already checked the stop(); function but it's same as in the GotCha script. Btw, here is my file, maybe the previous fla file that i've sent was not saved in flash mx format instead flash 8. Sorry for the inconvinience. And here is my script in case the file i attached doesn't work.
Frame 1
text = "testing";
startx = 165;
starty = 45;
setProperty("/ani", _visible, false);
length = length(text);
linelength = 50;
kerning = 6;
charinline = 0;
linenumber = 1;
linespace = 10;
i = 1;
x = 1;
lettercount = 1;
---------------------------------------------
Frame 10
charinline = Number(charinline)+1;
if (Number(charinline)>=Number(linelength)) {
prevent = substring(text, i-1, 1);
if (prevent eq " ") {
linenumber = Number(linenumber)+1;
charinline = 1;
}
}
duplicateMovieClip("/ani", "ani" add i, i);
setProperty("ani" add i, _x, Number(startx)+Number(charinline*kerning));
setProperty("ani" add i, _y, Number(starty)+Number(linenumber*linespace));
set("/ani" add i add "/letters:letters", substring(text, i, 1));
i = Number(i)+1;
Frame 11
if (Number(i)<=Number(length)) {
gotoAndPlay(10);
} else {
stop();
}
----------------------------------------
Frame 20
if (Number(x)<=Number(length)) {
tellTarget ("ani" + x) {
gotoAndPlay("end");
}
x = Number(x)+1;
}
------------------------------------------
Frame 21
gotoAndPlay(_currentframe-1);
-------------------------------------------
Frame 25(in mc)
stop();
lettercount = Number(lettercount)+1;
if (Number(lettercount) == Number(length)) {
tellTarget ("/") {
gotoAndPlay("end");
}
}
------------------------------------------
Frame 38(in mc)
stop();
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.