ram_0218
asked on
Flex mp3 stream player
hi all, I'm looking for a flex code for a simple mp3 stream player with buffering options + play volume options..
anyone has code to share with?
PS: I'm not looking for SWF file, I'm looking for the source code..
anyone has code to share with?
PS: I'm not looking for SWF file, I'm looking for the source code..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can create your custom UI by using Flex components
ASKER
I tested and yes it seems to work pretty good.. but for the UI, is it possible to have basic UI like this:
http://flash-mp3-player.net/players/mini/
i know it's pretty simple but can you give MXML or action script? I just put Play and Pause labels and played them which is working good..
http://flash-mp3-player.net/players/mini/
i know it's pretty simple but can you give MXML or action script? I just put Play and Pause labels and played them which is working good..
I don't know what skin would you like search on Google
"Player Flex Skin" and you can download at least 10 open sources
"Player Flex Skin" and you can download at least 10 open sources
ASKER
I cannot understand why sometime our experts so lazy...
<s:Application name="Spark_VideoPlayer_playPauseButton_enabled_test"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo" creationComplete="buffering()">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
private var _interval:Number;
private var _value:uint = 0;
protected function buffering():void{
var interval:Number;
track.percentWidth = 0;
function buffering():void{
track.percentWidth++;
if(track.percentWidth == 100)
clearInterval(interval);
};
interval = setInterval(buffering, 50);
}
protected function play(evt:Event):void{
clearInterval(_interval);
if(playPauseButton.selected == true)
_interval = setInterval(test, 50);
}
private function test():void{
if(_value == 100){
clearInterval(_interval);
_value = 0;
playPauseButton.selected = false;
}else{
scrubBar.value = ++_value;
}
}
]]>
</fx:Script>
<s:Group left="0" right="0" height="25">
<!-- background -->
<s:Rect left="0" right="0" top="0" bottom="0">
<s:fill>
<s:LinearGradient rotation="90">
<s:GradientEntry color="0xFFFFFF"/>
<s:GradientEntry color="0xDCDCDC"/>
</s:LinearGradient>
</s:fill>
</s:Rect>
<s:ToggleButton id="playPauseButton" left="0" bottom="0" selected="false"
skinClass="spark.skins.spark.mediaClasses.normal.PlayPauseButtonSkin"
focusIn="event.target.depth=1" focusOut="event.target.depth=0"
click="play(event)"/>
<!-- The skin pat that defines the video timeline -->
<s:Button id="track" left="40" top="6" right="10" width="0" height="11"
skinClass="spark.skins.spark.mediaClasses.normal.ScrubBarTrackSkin" />
<s:ScrubBar id="scrubBar" left="40" top="6" right="10" width="100%"
liveDragging="true" value="0" maximum="100"
skinClass="spark.skins.spark.mediaClasses.fullScreen.ScrubBarSkin" />
</s:Group>
</s:Application>
ASKER
thanks and yes you're right, too lazy :-)
ASKER