Форум Flasher.ru
Ближайшие курсы в Школе RealTime
Список интенсивных курсов: [см.]  
  
Специальные предложения: [см.]  
  
 
Блоги Правила Справка Пользователи Календарь Сообщения за день
 

Вернуться   Форум Flasher.ru > Flash > ActionScript 3.0

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему Закрытая тема
Старый 17.09.2010, 16:38
Vetal123 вне форума Посмотреть профиль Отправить личное сообщение для Vetal123 Найти все сообщения от Vetal123
  № 1  
Vetal123

Регистрация: Sep 2010
Сообщений: 4
По умолчанию помогите пожалуйста со скриптом

Доброго времени суток!
Вот я здесь по какому поводу,есть скрипт на плеер интернет радио.И основная проблема вот в чем,я хочу сделать так,что б радио воспроизводилось сразу же после того как человек зайдет на его страницу ненажымая на кнопочку плей.Если кто то поможет с ним,то буду очень признателен.
Код AS3:
volume_mc.gotoAndStop("5"); 
play_mc.id=0;
 
play_mc.onRollOver = function(){ // 
	if(this.id==0){ 
		this.gotoAndStop("2");
	}
	if(this.id==1){
		this.gotoAndStop("4");
	}
}
play_mc.onRollOut = function(){ 
	if(this.id==0){
		this.gotoAndStop("1");
	}
	if(this.id==1){
		this.gotoAndStop("3");
	}
}
 
play_mc.onRelease = function(){
	if(this.id==0){
		_root.time_mc.alltime = 0; 
		_root.mySound = new Sound(); 
		_root.mySound.loadSound("http://sevenskies.ru:9000/sevenskies128", true); 
		_root.mySound.start(); 
		_root.procent_mc.myInt = setInterval(_root.procent, 500); 
		_root.time_mc.myInt = setInterval(_root.timer, 1000); 
		this.gotoAndStop("3"); 
		_root.polosa_mc.gotoAndPlay("2"); 
		this.id=1; 
		return;
	}
	if(this.id==1){
		_root.procent_mc.procent_txt = "00%"; 
		_root.time_mc.time_txt = "0.00"; 
		clearInterval(_root.procent_mc.myInt); 
		delete _root.mySound; 
		clearInterval(_root.time_mc.myInt);//
		this.id=0;
		this.gotoAndStop("1");
		_root.polosa_mc.gotoAndStop("1"); 
		return;
	}
}
 
volume_mc.onRelease = function(){
	_root.volume_s(this._xmouse); 
	this.gotoAndStop(Math.ceil(this._xmouse/5));
}
 
function procent(){
	if(mySound.duration){ 
		procent_mc.procent_txt = ""+Math.ceil((mySound.position/mySound.duration)*100)+"%"; 
	}
}
function timer(){ 
	if(play_mc._currentframe == 3){
		time_mc.alltime++;
		time_mc.minuty=Math.floor(time_mc.alltime/60);
		time_mc.sekundy=time_mc.alltime-(Math.floor(time_mc.alltime/60)*60);
		if(time_mc.sekundy<10){
			time_mc.time_txt=""+time_mc.minuty+"."+"0"+time_mc.sekundy;
		}
		if(time_mc.sekundy>=10){
			time_mc.time_txt=""+time_mc.minuty+"."+time_mc.sekundy;
		}
	}
}
 
function volume_s(xclick){
	if(xclick<5){
		mySound.setVolume(0);
	}
	else{
		mySound.setVolume(xclick*5);
	}
}

Старый 17.09.2010, 16:46
easy.proger вне форума Посмотреть профиль Отправить личное сообщение для easy.proger Найти все сообщения от easy.proger
  № 2  
easy.proger

Регистрация: Jun 2010
Адрес: somewhere in the universe
Сообщений: 195
а причем тут раздел AS3 ?

по делу
Код AS1/AS2:
// после 
volume_mc.gotoAndStop("5"); 
play_mc.id=0;
// вставить это 
_root.time_mc.alltime = 0; 
_root.mySound = new Sound(); 
_root.mySound.loadSound("http://sevenskies.ru:9000/sevenskies128", true); 
_root.mySound.start(); 
_root.procent_mc.myInt = setInterval(_root.procent, 500); 
_root.time_mc.myInt = setInterval(_root.timer, 1000); 
play_mc.gotoAndStop("3"); 
_root.polosa_mc.gotoAndPlay("2"); 
play_mc.id=1;

Старый 17.09.2010, 16:51
etc вне форума Посмотреть профиль Найти все сообщения от etc
  № 3  
etc
Et cetera
 
Аватар для etc

Регистрация: Sep 2002
Сообщений: 30,787
Название темы не отражает сути вопроса.
Раздел выбран неверно.

Создать новую тему Закрытая тема Часовой пояс GMT +4, время: 23:11.
Быстрый переход
  « Предыдущая тема | Следующая тема »  

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


 


Часовой пояс GMT +4, время: 23:11.


Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.