Показать сообщение отдельно
Старый 16.11.2004, 16:03
Iv вне форума Посмотреть профиль Отправить личное сообщение для Iv Посетить домашнюю страницу Iv Найти все сообщения от Iv
  № 4  
Iv
 
Аватар для Iv

Регистрация: Apr 2001
Адрес: Moscow
Сообщений: 1,475
да... вижу выход такой:

делаем отдельную 1х1 swf и связываем ее с главной с помощью LocalConnection.

скрипт в главной:
Код:
_root.out_lc = new LocalConnection();
_root.out_lc.connect("listener_mp3");
_root.out_lc.loadSound = function(url) {
	if ((url=this.url=(url.length ? url : this.url)).length) {
		this.send("broadcaster_mp3", "loadSound", url);
	}
};
_root.out_lc.unloadSound = function() {
	delete this.url;
	this.send("broadcaster_mp3", "unloadSound");
};
_root.out_lc.startSound = function(secondsOffset, loops) {
	this.send("broadcaster_mp3", "startSound", secondsOffset, loops);
};
скрипт во внешней:
Код:
_root.in_snd = new Sound(this);
//
_root.in_lc = new LocalConnection();
this.in_lc.loadSound = function(val) {
	trace("loadSound: "+val);
	_root.in_snd.loadSound(val);
};
this.in_lc.unloadSound = function() {
	trace("unloadSound");
	loadMovieNum(_root._url, 0);
};
// sound management here
this.in_lc.startSound = function(secondsOffset, loops) {
	trace("startSound: "+arguments);
	_root.in_snd.start(secondsOffset, loops);
};
_root.in_lc.connect("broadcaster_mp3");
_root.in_lc.send("listener_mp3", "loadSound");
- как видишь, unloadSound просто перегружает swf. поскольку этот swf маленький и в кэше, то это не страшно.
Внимание! я не добавался того, чтобы всё работало как часы. Задача стояла прекратить загрузку звука. Управление звуком и т.п. тебе придется писать самому. Не вижу здесь особых проблем.

Удачи!