Copy link to clipboard
Copied
hi i have probleme with text anim all it work fine, but I need when I clic the pause button and paly again complete the text, and if i clic stop button clear the text, this is the file
text et son.rar - Google Drive
for the sound it works good i nedd just modification in Textanim and tanks a lot
Copy link to clipboard
Copied
You are more likely to get help if you show the code you are having a problem with in your posting rather than requiring people to download a file. Many people will not chance downloading files.
Copy link to clipboard
Copied
okey thanks for your advice, here is the capture
and here is the code :
import flupie.textanim.*;
import caurina.transitions.*;
/*
EXAMPLE:
0 - IMPORTANT! Donāt forget to embed the font that you want to use.
1 - Execute a static TextAnim "create";
2 - Indicates the way of TextAnim will be split text blocks. Can be CHARS, WORDS, LINES;
3 - Turning the blocks visible = false when dispatch block;
4 - Giving to TextAnim a effect function for apply for each blocks (can be an array of effects);
5 - Starts the animation
*/
var txtanim:TextAnim = new TextAnim(label1);
txtanim.interval = 200;
txtanim.blocksVisible = false;
txtanim.effects = myEffect;
import caurina.transitions.*;
function myEffect(block:TextAnimBlock):void {
block.scaleX = block.scaleY = 0;
block.rotation = -120;
Tweener.addTween(block, {rotation:0, scaleX:1, scaleY:1, time:.5, transition:"easeoutback"});
}
// part sound
var ecoute:Sound = new Sound();
var urlSon1:URLRequest=new URLRequest("C:/Users/hakim/Music/09 One Direction - Story Of My Life.mp3");
ecoute.load(urlSon1);
var piste1:SoundChannel;
var posLect:Number=0;
var etatLect:Boolean=true;
pauseBtn.addEventListener(MouseEvent.CLICK,pauseAction);
pauseBtn.buttonMode=true;
function pauseAction(evt:MouseEvent) {
if (etatLect) {
txtanim.start(); // here I start a text anim
piste1=ecoute.play(posLect);
piste1.addEventListener(Event.SOUND_COMPLETE,ecouteSonTerminee);
pauseBtn.btn_pause.visible=true;
pauseBtn.btn_play.visible=false;
} else {
posLect=piste1.position;
txtanim.stop(); // here I stop a text anim
piste1.stop();
pauseBtn.btn_play.visible=true;
pauseBtn.btn_pause.visible=false;
}
etatLect=!etatLect;
}
btn_stop.addEventListener(MouseEvent.CLICK,arreterSon);
// button stop
function arreterSon(evt:MouseEvent) {
posLect=0;
etatLect=true;
piste1.stop();
txtanim.stop(); // here I stop a text anim
pauseBtn.btn_play.visible=true;
pauseBtn.btn_pause.visible=false;
}
// function for SOUND_COMPLETE
function ecouteSonTerminee(evt:Event) {
posLect=0;
etatLect=true;
piste1.stop();
pauseBtn.btn_play.visible=true;
pauseBtn.btn_pause.visible=false;
}
Copy link to clipboard
Copied
What part of the code is not working for you?
It appears that textanim is someone else's class/design that you are adding to your file. The ability to control how it works will be determined by however that design is done. A well done design will provide all the information you need to implement it. See what klind of documentation is provided for the class and if you can resolve your wishlist with it. You might need to contact whoever provided you the file to find out how to interact with it the way you wish to.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now