![]() |
Включение звука с определенного момента
Здравствуйте, мой вопрос вот в чем:
Есть мультик, в который вставлено много разных звуковых дорожек, идущих одна за другой. Есть кнопка "стоп", останавливающая видео и звук, и есть кнопка "начать", продолжающая видео с того же момента, где оно было остановлено. Как сделать так, чтобы звук тоже продолжался с того же момента, где был остановлен? |
start (Sound.start method)
public start([secondOffset:Number], [loops:Number]) : Void 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. Availability: ActionScript 1.0; Flash Player 5 Parameters secondOffset:Number [optional] - A 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. loops:Number [optional] - A parameter that lets you specify the number of times the sound should play consecutively. This parameter is not available if the sound is a streaming sound. position (Sound.position property) public position : Number [read-only] The number of milliseconds a sound has been playing. If the sound is looped, the position is reset to 0 at the beginning of each loop. Availability: ActionScript 1.0; Flash Player 6 Example See Sound.duration for a sample usage of this property. duration (Sound.duration property) public duration : Number [read-only] The duration of a sound, in milliseconds. Availability: ActionScript 1.0; Flash Player 6 Example The following example loads a sound and displays the duration of the sound file in the Output panel. Add the following ActionScript to your FLA or AS file. Код AS1/AS2:
The following example loads several songs into a SWF file. A progress bar, created using the Drawing API, displays the loading progress. When the music starts and completes loading, information displays in the Output panel. Add the following ActionScript to your FLA or AS file. Код AS1/AS2:
Код AS1/AS2:
|
| Часовой пояс GMT +4, время: 03:49. |
Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.