Solved

Flex mp3 stream player

Posted on 2011-09-29
8
558 Views
Last Modified: 2012-05-12
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..
0
Comment
Question by:ram_0218
  • 4
  • 4
8 Comments
 
LVL 29

Accepted Solution

by:
dgofman earned 500 total points
ID: 36816311
0
 
LVL 17

Author Comment

by:ram_0218
ID: 36816854
looks like the UI is missing.. can you help
0
 
LVL 29

Expert Comment

by:dgofman
ID: 36816951
You can create your custom UI by using Flex components
0
 
LVL 17

Author Comment

by:ram_0218
ID: 36817308
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..
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 29

Expert Comment

by:dgofman
ID: 36817333
I don't know what skin would you like search on Google

"Player Flex Skin" and you can download at least 10 open sources
0
 
LVL 17

Author Comment

by:ram_0218
ID: 36818009
just the basic audio streamer, like this one (mini)?

http://flash-mp3-player.net/players/mini/
0
 
LVL 29

Expert Comment

by:dgofman
ID: 36818706
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>

Open in new window

0
 
LVL 17

Author Comment

by:ram_0218
ID: 36907377
thanks and yes you're right, too lazy :-)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
What is Backup? Backup software creates one or more copies of the data on your digital devices in case your original data is lost or damaged. Different backup solutions protect different kinds of data and different combinations of devices. For e…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now