Adobe Flash Mp3 Player Tutorial
Adobe Flash Mp3 Player Tutorial
Currently Available to Buy on eBay:
No items matching your keywords were found.
Currently Available to Buy on Amazon:
|
|
Toast 11 Titanium Pro Mac
$69.95 Toast 11 Pro is a valuable collection of Mac digital media apps. It includes Toast 11 Titanium and $300 of extras, featuring Adobe Photoshop Elements 9, Blu-ray Disc authoring, Sonicfire Pro soundtrack creation, SoundSoap audio noise reduction and FotoMagico for gorgeous slideshows. Use Toast 11 to capture, convert and share your digital media almost anywhere. Toast's new design, including both vi... |
|
|
Pantech Breakout 4G Android Phone (Verizon Wireless)
$399.99 With a slim, stylish design and the latest Android operating system (2.3 Gingerbread), the Pantech Breakout exclusively from Verizon Wireless runs on the blazing fast 4G LTE network for super-fast downloads. The front of the Breakout stands out with silver button accents and a brightly colorful 4-inch capacitive touch display, while the back has a textured surface to help you grip the phone when ... |
|
|
LG Phoenix Android Phone (AT&T)
$599.99 The LG Phoenix smartphone is the perfect balance of functionality and affordability. It feature whip-fast processing on the Android 2.2 platform, PC-like browsing, and access to email, contacts, and calendar that sync with your web accounts and PC. The LG Phoenix lets you have your world, your way. The perfect balance of functionality and affordability. View larger C... |
Adobe flash(actionscript help)?
Hi,
I am making an mp3 player on flash.
I have already created the buttons and i have been loking for tutorials of it i found one that was good :http://www.thegoldenmean.com/technique/mp3player01.html but it was so har to make i couldn't make to second step.
I need help on:
Loading the Music
Play button making the music play
When music finishies go to next track(continuous playing)
And a volume slider so i can put volume how i like.
PS: Is it possible to make button that you can open somethine like i press search and the searching box appears and i go to my hard drive select music folder and press open and loads the music on that foler is that possible?
Sorry if i look sooooooooooooooooooooooo demanding xD but i can't find a good page that let me do that.
Thanx for the help and your time you took for me!!! thanx
create a folder mp3player
create a folder tracks in mp3player
copy your favourite mp3's to tracks
name it 1.mp3,2.mp3,3.mp3.....6.mp3 etc
create an xml file and name it tracks.xml n save in mp3player
create a Flash CS3 AS3 document and save in mp3player
drag List & CheckBox components to your lib (not to stage)
select first frame of your document and paste this code (code is not completed but works)
/*
Flash CS3 AS3
XML MP3 PLAYER BY ANIL KUMAR N D
MARCH 6 2008
anilkumarnd@gmail.com
anilkumarnd@yahoo.com
*/
import fl.data.DataProvider;
import fl.controls.*;
import flash.events.*;
import flash.media. Sound;
import flash.media. SoundChannel;
import flash.net. URLRequest;
var currentSong:String = new String();
var tracks_array:Array = new Array();
var Songs:Array = new Array();
var Artist:Array = new Array();
var Album:Array = new Array();
var Title:Array = new Array();
var status_txt:TextField = new TextField();
status_txt.text = "Status";
status_txt.selectable = false;
status_txt.mouseEnabled = false;
status_txt.x=50;
status_txt.y=50;
addChild(status_txt);
var artist_txt:TextField = new TextField();
artist_txt.text = "Artist:";
artist_txt.selectable = false;
artist_txt.mouseEnabled = false;
artist_txt.x=250;
artist_txt.y=100;
addChild(artist_txt);
var artist_dis_txt:TextField = new TextField();
artist_dis_txt.text = "Artist Name";
artist_dis_txt.selectable = false;
artist_dis_txt.mouseEnabled = false;
artist_dis_txt.x=300;
artist_dis_txt.y=100;
addChild(artist_dis_txt);
var album_txt:TextField = new TextField();
album_txt.text = "Album:";
album_txt.selectable = false;
album_txt.mouseEnabled = false;
album_txt.x=250;
album_txt.y=120;
addChild(album_txt);
var album_dis_txt:TextField = new TextField();
album_dis_txt.text = "Album Name";
album_dis_txt.selectable = false;
album_dis_txt.mouseEnabled = false;
album_dis_txt.x=300;
album_dis_txt.y=120;
addChild(album_dis_txt);
var title_txt:TextField = new TextField();
title_txt.text = "Title:";
title_txt.selectable = false;
title_txt.mouseEnabled = false;
title_txt.x=250;
title_txt.y=140;
addChild(title_txt);
var title_dis_txt:TextField = new TextField();
title_dis_txt.text = "Title Name";
title_dis_txt.selectable = false;
title_dis_txt.mouseEnabled = false;
title_dis_txt.x=300;
title_dis_txt.y=140;
addChild(title_dis_txt);
var list_comp = new List();
addChild(list_comp);
list_comp.move(100,100);
var continuous_comp = new CheckBox();
addChild(continuous_comp);
continuous_comp.x=300;
continuous_comp.y=300;
continuous_comp.label = "Continuous";
continuous_comp.selected = true;
var btn_play:MovieClip = new MovieClip();
btn_play.graphics. beginFill (0x00FF00);
btn_play.graphics. drawRect (0, 0, 40, 20);
btn_play.graphics. endFill();
btn_play.x = 250;
btn_play.y = 170;
var play_txt:TextField = new TextField();
play_txt.text = "PLAY";
play_txt.selectable = false;
play_txt.mouseEnabled = false;
btn_play.addChild (play_txt);
addChild (btn_play);
btn_play . buttonMode = true;
var btn_pause:MovieClip = new MovieClip();
btn_pause.graphics. beginFill (0xFF0000);
btn_pause.graphics. drawRect (0, 0, 40, 20);
btn_pause.graphics. endFill();
btn_pause.x = 300;
btn_pause.y = 170;
var pause_txt:TextField = new TextField();
pause_txt.text = "PAUSE";
pause_txt.selectable = false;
pause_txt.mouseEnabled = false;
btn_pause. addChild (pause_txt);
addChild (btn_pause);
btn_pause. buttonMode = true;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener ( Event.COMPLETE, onLoadXML);
loader.load (new URLRequest ("tracks.xml"));
function onLoadXML(ev:Event) {
try {
var myXML:XML = new XML(ev.target.data);
var list:XMLList = myXML.track;
displayDetails (list[0].@artist, list[0].@album, list[0].@title);
playSong (list[0].@source);
populateList (list);
} catch (e:TypeError) {
//Could not convert the data, probavlu because
//because is not formated correctly
trace ("Could not parse the XML");
trace (e.message);
}
}
function displayDetails (artist:String, album:String, title:String) {
artist_dis_txt.text =artist ;
album_dis_txt.text = album;
title_dis_txt.text = title;
}
function playSong(id:String) {
var url:String = id;
var song:SoundChannel;
var soundFactory:Sound = new Sound();
var request:URLRequest = new URLRequest(url);
soundFactory.addEventListener (Event.COMPLETE, completeHandler);
soundFactory.addEventListener (Event.ID3, id3Handler);
soundFactory.addEventListener (IOErrorEvent.IO_ERROR, ioErrorHandler);
soundFactory.addEventListener (ProgressEvent.PROGRESS, progressHandler);
soundFactory. load(request);
song = soundFactory.play();
}
function completeHandler (event:Event):void {
//trace("completeHandler: " + event);
}
function id3Handler (event:Event):void {
//trace("id3Handler: " + event);
}
function ioErrorHandler (event:Event):void {
//trace("ioErrorHandler: " + event);
}
function progressHandler (event:ProgressEvent):void {
//status_txt.text = String(event.bytesLoaded);
//trace("progressHandler: " + event.bytesLoaded);
}
function populateList (list:XMLList) {
var dp:Array = new Array();
var i:uint;
var count:uint = list.length();
for (i = 0; i < count; i++) {
dp.push ({label:list[i].@title});
}
for (i = 0; i < count; i++) {
Songs.push (list[i].@source);
}
for (i = 0; i < count; i++) {
Artist.push (list[i].@artist);
}
for (i = 0; i < count; i++) {
Album.push (list[i].@album);
}
for (i = 0; i < count; i++) {
Title.push (list[i].@title);
}
list_comp.dataProvider = new DataProvider(dp);
}
list_comp. addEventListener (Event.CHANGE, playSelectedSong);
function playSelectedSong (event:Event):void {
SoundMixer.stopAll();
var cur:Number = event. target. selectedIndex;
playSong (Songs[cur]);
displayDetails(Artist[cur], Album[cur], Title[cur]);
}