Клубове Дир.бг
powered by diri.bg
търси в Клубове diri.bg Разширено търсене

Вход
Име
Парола

Клубове
Dir.bg
Взаимопомощ
Горещи теми
Компютри и Интернет
Контакти
Култура и изкуство
Мнения
Наука
Политика, Свят
Спорт
Техника
Градове
Религия и мистика
Фен клубове
Хоби, Развлечения
Общества
Я, архивите са живи
Клубове Дирене Регистрация Кой е тук Въпроси Списък Купувам / Продавам 20:06 17.06.24 
Клубове/ Компютри и Интернет / Flash Пълен преглед*
Информация за клуба
Тема Towa shte pomogne na Sertys :-)
Автор moonjogger (Хе-хе!)
Публикувано09.08.01 22:10  



Mislq che tova shte pomogne mnogo za sinhronizaciq i n.t
Ako ima neshto neqsno - shte se radvam da obqsnq - ako moga
pause() - Ako ima zvuk shte go spre, ako ne - go puska
isBusy() - Vrashta "viarno" ako ima zvuk, ako ne - "nevqrno"
timeElapsed() - Vrashta vremeto otkakto e pusnat zvuka (v sekundi)
timeRemaining() - vrashta vremeto ostavashto do svarshvaneto na svuka(v sekundi)


//---------------------------------------------------------------------------------------------
// Sound2 prototype object
//---------------------------------------------------------------------------------------------

//constructor
function Sound2(mc){
this.sound = new Sound(mc);
this.secs = 0;
this.startTimer = null;
this.pauseTimer = null;
this.timer = 0;
this.paused = false;
}

//stop
function Sound2_stop(id){
this.startTimer = null;
this.sound.stop(id);
}

//start
function Sound2_start(offset, loops){
this.offset = offset;
this.startTimer = getTimer() - (offset*1000);
this.sound.start(offset, loops);
this.duration = this.secs*(loops+1)*1000;
trace(this.duration);
this.loops = loops;
}

//pause
function Sound2_pause(){
var currTime = getTimer();
if (!this.paused){
this.timer = currTime - this.startTimer;
this.pauseTimer = currTime;
this.paused = true;
this.sound.stop(this.soundID);
}else{
this.paused = false;
var tempStart = this.startTimer + (currTime - this.pauseTimer);
this.start(this.timer/1000);
this.startTimer = tempStart;
}
}

//attachSound
function Sound2_attachSound(soundID, secs){
this.soundId = soundID
this.secs = secs;
this.sound.attachSound(soundID);
}


//isBusy
function Sound2_isBusy(){
if (this.startTimer != null){
if (getTimer() - this.startTimer < this.duration){
return (true);
}else{
return (false);
}
}else{
return (false);
}
}

//timeElapsed
function Sound2_timeElapsed(){
var currTime = getTimer();
if (this.startTimer != null && (currTime - this.startTimer < this.duration)){
return ((currTime - this.startTimer)/1000);
}else{
return (-1)
}
}

//timeRemaining
function Sound2_timeRemaining(){
var currTime = getTimer();
if (this.startTimer != null && (currTime - this.startTimer < this.duration)){
return ((this.duration - (currTime - this.startTimer))/1000);
}else{
return (-1)
}
}


//A sega da postroim Obekta :-)
Sound2.prototype.stop = Sound2_stop;
Sound2.prototype.start = Sound2_start;
Sound2.prototype.pause = Sound2_pause;
Sound2.prototype.attachSound = Sound2_attachSound;
Sound2.prototype.isBusy = Sound2_isBusy;
Sound2.prototype.timeElapsed = Sound2_timeElapsed;
Sound2.prototype.timeRemaining = Sound2_timeRemaining;
Sound2.prototype.getPan = function(){ return (this.sound.getPan())};
Sound2.prototype.getTransform = function(){ return
(this.sound.getTransform())};
Sound2.prototype.getVolume = function(){ return (this.sound.getVolume())};
Sound2.prototype.setPan = function(pan){ return (this.sound.setPan(pan))};
Sound2.prototype.setTransform = function(obj){ return
(this.sound.setTransform(obj))};
Sound2.prototype.setVolume = function(volume){ return
(this.sound.setVolume(volume))};
//---------------------------------------------------------------------------------------------

|Не се изказвай за неща, които не разбираш|

Цялата тема
ТемаАвторПубликувано
* Towa shte pomogne na Sertys :-) moonjogger   09.08.01 22:10
. * Re: Towa shte pomogne na Sertys :-) Sertys   10.08.01 08:48
Клуб :  


Clubs.dir.bg е форум за дискусии. Dir.bg не носи отговорност за съдържанието и достоверността на публикуваните в дискусиите материали.

Никаква част от съдържанието на тази страница не може да бъде репродуцирана, записвана или предавана под каквато и да е форма или по какъвто и да е повод без писменото съгласие на Dir.bg
За Забележки, коментари и предложения ползвайте формата за Обратна връзка | Мобилна версия | Потребителско споразумение
© 2006-2024 Dir.bg Всички права запазени.