Great little function for flash! Just wondering how to repeat the function in a different part of the timeline with different text, without getting the duplicate errors.
Hi FlyFisho,
Run this little code snippet at the top of your ActionScript:
for(var i:int = 0; i < numChildren; i++) {
if(getChildAt(i).name == "rip") {
removeChild(getChildByName("rip"));
}
}
Then when you create the rip variable, give it a name like this:
var rip:RipText = new RipText(myString, 0x000000, 36); rip.name = "rip";
Now you can move along the timeline and when the frame hits again it will delete the previous text. In addition, you can run the for loop above on any other frame as well to get rid of the text.
-Jack
Thanks for the reply…. That all works fine but now I would like to know how to kill it so when I go to a previous frame it does not appear. As with the code given it Rewrites in the frame it resides( which is good ) but when i go back to a previous frame it is still there. Im fairly intermediate with this stuff so help would be appreciated greatly. Thanks Angus
Silly me it was looking at me. All good now just used the (removeChild(getChildByName(“rip”))
In the other frames to kill it.
Before I purchase this I need to know, does it support links? Can I have it load this:
My welcome text; enter here
where enter here is a link?
hi and thanks for that great file
i have customize your file to add multiple words:
//—-—-—-—-—-—-—-—-—-—-—-—-—--
var myString3:String = “Thriller”;
var rip3:RipText = new RipText(myString3, 0xff9999, 36);
rip3.x = 290;
rip3.y = 40;
addChild(rip3);
// call this whenever you want to start the animation rip3.ripIt(5, 1.5, Elastic.easeOut);
//—-—-—-—-—-—-—-—-—-—-—-—-—--
var myString4:String = “Komödie”;
var rip4:RipText = new RipText(myString4, 0xff9999, 56);
rip4.x = 290;
rip4.y = 60;
addChild(rip4);
// call this whenever you want to start the animation rip4.ripIt(5, 2, Elastic.easeOut);
//—-—-—-—-—-—-—-—-—-—-—-—-—--
No i want to add to each word a time delay. For example after 1 second the first word appear after 2 seconds the 2nd word and so on.. Can you help me please? Thanks a lot
micha
i am sorry i have pressed “report” Your answer was perfect, please paste it again for the other one . thanks a lot
Hi Majestic,
No problem. Here is the expanded code:
import flash.utils.setTimeout;
// 3 second delay
setTimeout(functionOne, 3000);
// 6 second delay
setTimeout(functionTwo, 6000);
function functionOne():void {
rip3.ripIt(5, 1.5, Elastic.easeOut);
}
function functionTwo():void {
rip4.ripIt(5, 2, Elastic.easeOut);
}

110 Purchases
24 Comments