Показать сообщение отдельно
Старый 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);
	}
}