all groups > flash (macromedia) > december 2004 >
You're in the

flash (macromedia)

group:

Playing mp3


Playing mp3 raquel79
12/15/2004 11:55:40 PM
flash (macromedia): Hi:

I have a mp3 file into my movie, I want to play only a part of the song. Can anybody tell me how can I make to play only from the middle of the music to the end.

Re: Playing mp3 Peter Blumenthal
12/16/2004 11:38:32 AM
This is taken directly from the actionScript dictionary (which it is a good
idea to check before posting :)

Sound.start()
Availability
Flash Player 5.

Usage
my_sound.start([secondOffset:Number, loop:Number]) : Void

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 that lets you specify the number of times the
sound should play consecutively.



So, all you need to do is set the secondOffset parameter to where you want
your song to start playing.

hth

AddThis Social Bookmark Button