Показать сообщение отдельно
Старый 03.06.2008, 01:33
Vektor вне форума Посмотреть профиль Отправить личное сообщение для Vektor Найти все сообщения от Vektor
  № 5  
Ответить с цитированием
Vektor
 
Аватар для Vektor

Регистрация: May 2008
Адрес: Новокузнецк
Сообщений: 219
Записей в блоге: 1
Ответ, на Самый певый вопрос.
Код:
//звуки добавиш сам, не забуть в Properties звука поставить галочку, как для Мувика. 
//Названия звука 1-9.
var aSound:Array = ["1", "2", "3", "4", "5", "6", "7", "8,", "9"];
var nS:Number;
this.onMouseDown = function() {
	var mySound:Sound = new Sound();
	nS = Math.floor(Math.random()*aSound.length);
	mySound.attachSound(aSound[nS]);
	mySound.start();
	aSound.splice(nS,1);
	this.onEnterFrame = function() {
		if (mySound.duration == mySound.position) {
			nS = Math.floor(Math.random()*aSound.length);
			mySound.attachSound(aSound[nS]);
			mySound.start();
			aSound.splice(nS,1);
			if (aSound.length == 0) {
				delete onEnterFrame;
			}
		}
	};
};
В следующий раз, формулируй ? правильно.
__________________
Книги и желание лучшие учителя.