Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
0

Probleme with textanim

New Here ,
May 27, 2014 May 27, 2014

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

TOPICS
ActionScript
827
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 27, 2014 May 27, 2014

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 27, 2014 May 27, 2014

okey thanks for your advice, here is the capture

Capture.PNGCapture1.PNG

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;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 27, 2014 May 27, 2014
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines