Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   Preolader Sound'a (http://www.flasher.ru/forum/showthread.php?t=95552)

googleavast 08.05.2007 12:53

Preolader Sound'a
 
Дарова, люди!
Загружаю в сам мувик саунд из сервера, после нажатия кнопки 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 не нашел!

etc 10.05.2007 13:04

Цитата:

Сообщение от googleavast
Я в 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:)


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

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