Posted By

klarth_archecrc on 12/09/10


Tagged


Versions (?)

Check if sound is playing AS2


 / Published in: ActionScript
 

Mauro

  1. var miSonido:Sound;
  2. var sndObj:Object;
  3.  
  4. miSonido= new Sound(sndObj);
  5.  
  6. onEnterFrame = mx.utils.Delegate.create(this,checkProgress);
  7. miSonido.onLoad = mx.utils.Delegate.create(this,onLoadInitSound);
  8.  
  9. mySound.loadSound("elMp3.mp3");
  10.  
  11.  
  12. function checkProgress():Void{
  13. if(miSonido.position != miSonido.duration){
  14.  
  15. trace("La musica se esta escuchando");
  16.  
  17. };
  18.  
  19. };
  20.  
  21. function onLoadInitSound(success:Boolean){
  22. trace("la musica empezo");
  23. miSonido.start();
  24.  
  25. };

Report this snippet  

You need to login to post a comment.