Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   Advanced (http://www.flasher.ru/forum/forumdisplay.php?f=4)
-   -   Загрузка mp3-шки... (http://www.flasher.ru/forum/showthread.php?t=60169)

taras1987 04.07.2004 09:28

Загрузка mp3-шки...
 
Хочу загрузить случайным образом MP3 файлик (музычку на фон),
Пишу в 1 кадре г_root-а:

stop();
s=new Sound();
file=Math.floor(Math.random()*2+1)
file=file+".mp3";
s.loadSound(file, false);

И ничего...
Файлы 1.mp3 и 2.mp3 в той-же папке

ЧТо не так?

@713 09.07.2004 04:51

а ты случаем не забыл
 
s.start(...); ?

taras1987 09.07.2004 10:37

т. е. я забыл его стартонуть? И что там в параметрах? (вместо ...)

@713 20.07.2004 06:45

Sound.start()
Availability
Flash Player 5.

Usage
my_sound.start([secondOffset, loop])

Parameters
secondOffset An optional parameter that lets you start playing the sound at a specific point. For example, if you have a 30-second sound and want the sound to start playing in the middle, specify 15 for the secondOffset parameter. The sound is not delayed 15 seconds, but rather starts playing at the 15-second mark.

loop An optional parameter allowing you to specify the number of times the sound should play consecutively.

Returns
Nothing.

Description
Method; starts playing the last attached sound from the beginning if no parameter is specified, or starting at the point in the sound specified by the secondOffset parameter.

-------------------------------------------------------------------
почаще см. хелп. Если нет такого - рекомендую как можно скорее качнуть с макромедии.

taras1987 20.07.2004 10:38

Cпасибо за совет!


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

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