Aide en flash

angelmnxxxx Messages postés 41 Statut Membre -  
azeaze Messages postés 731 Statut Membre -
bonjour
s'il vous plait je suis débutante en flash et je suis en treain de realiser une animation.
Je veux y integrer du son qui commence en meme temp que l'animation sans un bouton pour le declencher.
alors j'ai importé le fichier son. et j'ai essayé ce code là
mn.onLoad=function (){
son1 = new Sound ();
son1.attachSound("Panet.co.il_Rayan_Kanet-ro7i .mp3");
son1.setVolume (25);
son1.start(10,2);}

mn c'est le nom du fichier de l'animation
Mais ca ne marche pas
ca n'affiche aucune erreur c'est juste que ya pas de son

Merci pour votre aide j'en ai vraiment besoin le plutot possible
A voir également:

1 réponse

azeaze Messages postés 731 Statut Membre 376
 
et avec un truc comme ça ?

	if(_global.Behaviors == null)_global.Behaviors = {};
	if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
	if(typeof this.createEmptyMovieClip == 'undefined'){
		this._parent.createEmptyMovieClip('BS_son1',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
		_global.Behaviors.Sound.son1 = new Sound(this._parent.BS_son1);
	} else {
		this.createEmptyMovieClip('_son1_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
		_global.Behaviors.Sound.son1 = new Sound(this.BS_son1);
	}
	
_root.onLoad=function (){

	_global.Behaviors.Sound.son1.loadSound("Panet.co.il_Rayan_Kanet-ro7i .mp3",true);
	_global.Behaviors.Sound.son1.setVolume (25);
	_global.Behaviors.Sound.son1.start(10,2);}


ça doit fonctionner je pense...
@+, Azeaze
0