Просмотр полной версии : Preolader Sound'a
googleavast
08.05.2007, 12:53
Дарова, люди!
Загружаю в сам мувик саунд из сервера, после нажатия кнопки begin!
Допустим гружу из www.mysite.ru/Sound/1.mp3 !
Как ПРАВИЛЬНО мне поставить на него преоладер!
Сам преоладер зовут pre(там 100 кадров)!
Подскажите плиз код!
screamge
08.05.2007, 13:00
цитирию хелп:
// Create a new Sound object to play the sound.
var songTrack:Sound = new Sound();
// Create the polling function that tracks download progress.
// This is the function that is "polled." It checks
// the downloading progress of the Sound object passed as a reference.
function checkProgress (soundObj:Object):Void {
var numBytesLoaded:Number = soundObj.getBytesLoaded();
var numBytesTotal:Number = soundObj.getBytesTotal();
var numPercentLoaded:Number = Math.floor(numBytesLoaded / numBytesTotal * 100);
if (!isNaN(numPercentLoaded)) {
trace(numPercentLoaded + "% loaded.");
}
};
// When the file has finished loading, clear the interval polling.
songTrack.onLoad = function ():Void {
trace("load complete");
clearInterval(poll);
};
// Load streaming MP3 file and start calling checkProgress(),
songTrack.loadSound("http://www.helpexamples.com/flash/sound/song1.mp3", true);
var poll:Number = setInterval(checkProgress, 100, songTrack);
googleavast
10.05.2007, 12:07
Пасиб те screamge! Я в help'e не нашел!
Я в help'e не нашел!
И не искал.
http://livedocs.adobe.com/flash/9.0/main/00001029.html
googleavast
10.05.2007, 15:54
Кому интересно, вот еще линк!
http://www.tutorio.com/sound-tutorials.html:)
Работает на vBulletin ® версия 3.7.3. Copyright ©2000-2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Copyright © 1999-2008 Flasher.ru. All rights reserved.