I'm trying to create a music player in Flash CS6. I'm new to Flash. I have created the play/pause/volume buttons. I have also been able to extract the mp3 information using the id3 tags. So i have the song duration. I now need to create a seekbar/progress bar. I have taken the progress bar from the components, but do not understand how to code it now. Please help!
我正在尝试在Flash CS6中创建一个音乐播放器。我是Flash的新手。我创建了播放/暂停/音量按钮。我也能够使用id3标签提取mp3信息。所以我有歌曲的持续时间。我现在需要创建一个搜索栏/进度条。我从组件中获取了进度条,但现在不了解如何编写代码。请帮忙!
2 个解决方案
#1
1
According to the reference on Sound.play()
:
根据Sound.play()的参考:
public function play(startTime:Number = 0, loops:int = 0, sndTransform:flash.media:SoundTransform = null):SoundChannel
where the first argument is
第一个参数是
startTime:Number (default = 0)//The initial position in milliseconds at which playback should start.
so you can call
所以你可以打电话
channel.stop();
channel = sound.play(offset);
There is an example in the reference. Hope this helps.
参考文献中有一个例子。希望这可以帮助。
#2
0
You can get some idea using my audio player on my Github page.Also it's developed using flash CS6 and ActionScript 3.0. Use it, change it and develop your future with ActionScript .
您可以在我的Github页面上使用我的音频播放器获得一些想法。它也是使用Flash CS6和ActionScript 3.0开发的。使用它,更改它并使用ActionScript开发您的未来。
#1
1
According to the reference on Sound.play()
:
根据Sound.play()的参考:
public function play(startTime:Number = 0, loops:int = 0, sndTransform:flash.media:SoundTransform = null):SoundChannel
where the first argument is
第一个参数是
startTime:Number (default = 0)//The initial position in milliseconds at which playback should start.
so you can call
所以你可以打电话
channel.stop();
channel = sound.play(offset);
There is an example in the reference. Hope this helps.
参考文献中有一个例子。希望这可以帮助。
#2
0
You can get some idea using my audio player on my Github page.Also it's developed using flash CS6 and ActionScript 3.0. Use it, change it and develop your future with ActionScript .
您可以在我的Github页面上使用我的音频播放器获得一些想法。它也是使用Flash CS6和ActionScript 3.0开发的。使用它,更改它并使用ActionScript开发您的未来。