Play Button Problems!

  • Jeremy Neumann
  • Born
  • Born
  • No Avatar
  • Inscription: Sep 10, 2004
  • Messages: 3
  • Loc: USA, MO
  • Status: Offline

Message Septembre 10th, 2004, 4:20 pm

Bonjour, j'ai un fichier flash a été que lorsque vous cliquez sur le bouton de lecture, il va jouer un son de la bibliothèque. Mais si vous appuyez plus d'une fois, il commence la chanson. Ce qui provoque la chanson de jouer contre lui-même.

Comment puis-je résoudre ce problème?

Voici où vous pouvez visualiser le flash problème, et le. Fla.

http://www.handsomerob. com / test / index.html

Jeremy Neumann
  • Anonymous
  • Bot
  • No Avatar
  • Inscription: 25 Feb 2008
  • Messages: ?
  • Loc: Ozzuland
  • Status: Online

Message Septembre 10th, 2004, 4:20 pm

  • fotbon
  • Novice
  • Novice
  • No Avatar
  • Inscription: Mar 16, 2004
  • Messages: 20
  • Status: Offline

Message Septembre 10th, 2004, 5:56 pm

mettre un qualificatif si, au début de la touche et ont un interrupteur variable sur une fois que vous cliquez dessus et l'éteindre une fois que la chanson est fini de jouer.

par exemple
Code: [ Select ]
on( release ){
if( playing != true ){
  //play song
  playing = true;
}
}
  1. on( release ){
  2. if( playing != true ){
  3.   //play song
  4.   playing = true;
  5. }
  6. }

code pour la dernière image:
Code: [ Select ]
playing = false;
  • Jeremy Neumann
  • Born
  • Born
  • No Avatar
  • Inscription: Sep 10, 2004
  • Messages: 3
  • Loc: USA, MO
  • Status: Offline

Message Septembre 10th, 2004, 7:06 pm

Peu confus ici. Étaient exactement dois-je mettre le code?

J'ai ajouté un comportement pour le bouton pour lire un morceau de la bibliothèque, c'est le code que ça m'a fait...


Code: [ Select ]
on (release) {
    //Play Internal Sound Behavior
    if(_global.Behaviors == null)_global.Behaviors = {};
    if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
    if(typeof this.createEmptyMovieClip == 'undefined'){
        this._parent.createEmptyMovieClip('BS_testraindownsong',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
        _global.Behaviors.Sound.testraindownsong = new Sound(this._parent.BS_testraindownsong);
    } else {
        this.createEmptyMovieClip('_testraindownsong_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
        _global.Behaviors.Sound.testraindownsong = new Sound(this.BS_testraindownsong);
    }
    _global.Behaviors.Sound.testraindownsong.attachSound("raindown");
    if (true) {
        _global.Behaviors.Sound.testraindownsong.start(0,1);
    }
    //End Behavior

}
  1. on (release) {
  2.     //Play Internal Sound Behavior
  3.     if(_global.Behaviors == null)_global.Behaviors = {};
  4.     if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
  5.     if(typeof this.createEmptyMovieClip == 'undefined'){
  6.         this._parent.createEmptyMovieClip('BS_testraindownsong',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
  7.         _global.Behaviors.Sound.testraindownsong = new Sound(this._parent.BS_testraindownsong);
  8.     } else {
  9.         this.createEmptyMovieClip('_testraindownsong_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
  10.         _global.Behaviors.Sound.testraindownsong = new Sound(this.BS_testraindownsong);
  11.     }
  12.     _global.Behaviors.Sound.testraindownsong.attachSound("raindown");
  13.     if (true) {
  14.         _global.Behaviors.Sound.testraindownsong.start(0,1);
  15.     }
  16.     //End Behavior
  17. }
  • Jeremy Neumann
  • Born
  • Born
  • No Avatar
  • Inscription: Sep 10, 2004
  • Messages: 3
  • Loc: USA, MO
  • Status: Offline

Message Septembre 13th, 2004, 5:28 am

Ahh nevermind, j'ai tout compris.

Merci!

Jeremy

Afficher de l'information

  • Total des messages de ce sujet: 4 messages
  • Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 30 invités
  • Vous ne pouvez pas poster de nouveaux sujets
  • Vous ne pouvez pas répondre aux sujets
  • Vous ne pouvez pas éditer vos messages
  • Vous ne pouvez pas supprimer vos messages
  • Vous ne pouvez pas joindre des fichiers
 
 

© 2011 Unmelted, LLC. Ozzu® est une marque déposée de Unmelted, LLC