Jump to content


Photo

MP3 Player scrollable playlist


  • Please log in to reply
63 replies to this topic

#1 adsmithy

adsmithy

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 12 June 2006 - 04:24 AM

Hi

I have gone through the 3 part tutorial for the MP3 Player and must say its very good and I didn't have many problems.

I want to expand upon it somewhat by making a scrollable playlist. Basically my player is quite small 600x200 and my playist will gradually grow over time. I want a way of loading my playlist items into a scrollable area but i'm unsure of how to do it.

Can movie clips be loaded into a scrollable area somehow? How would you go about doing this?

Just had a thought would loading the clips into a main clip and just attach the UIScrollBar component to it work?

Thanks
Adrian

Edited by adsmithy, 14 June 2006 - 03:22 AM.


#2 h o u s e

h o u s e

    Young Padawan

  • Members
  • Pip
  • 13 posts
  • Location:Los Angeles, CA
  • Interests:Flash, AS, pretty much all backend languages, CSS, oh yea and Flash.

Posted 14 June 2006 - 11:58 PM

You could always just code a simple scroller from scratch. It'll give you more freedom when it comes to modifying it. Let me know if you want me to help ya code wise. :P

#3 adsmithy

adsmithy

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 15 June 2006 - 04:32 AM

You could always just code a simple scroller from scratch. It'll give you more freedom when it comes to modifying it. Let me know if you want me to help ya code wise. :P


OK i'd like some help please because my first plan doesn't seem to work.

Below is my code which didn't work. I basically made a movie clip "playlistHolder" to hold my playlist buttons but the onRelease function fails to find the file.

The code works fine when you load the playlist buttons to the _root but not into playlistHolder. Any ideas?

_root.playlistHolder.attachMovie("butTemp", "but"+i, i+50);
			eval ("but"+i).id = i;
			_root.playlistHolder["but"+i]._x = 0;
			_root.playlistHolder["but"+i]._y = (i*15);
			_root.playlistHolder["but"+i].but_txt.text = songname[i]+" / "+songband[i];
								
			/*_root.playlistHolder["but"+i].onRollOver = function() {
					new Scale(this).run(125, 125, 250, Elastic.easeOut);					
				}
				
			_root.playlistHolder["but"+i].onRollOut = function() {
					new Scale(this).run(100, 100, 150, Sine.easeIn);
				}*/
			
			_root.playlistHolder["but"+i].onRelease = function() {
				
				clearInterval(timeInterval);
				_root.timeDisplay_txt.text = "00:00/00:00";
				_root.sound_mc.songStarter(songfile[this.id]);			
				//imageLoader(songimage[i]);
			}
			}
			};

The code: _root.sound_mc.songStarter(songfile[this.id]); seems to be throwing up the error

Cheers

Edited by adsmithy, 19 June 2006 - 04:14 AM.


#4 adsmithy

adsmithy

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 19 June 2006 - 04:14 AM

Bump for some help please!

#5 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 19 June 2006 - 06:36 AM

1 stupid question:

a. are the rollover & rollout functions responding? eg. working?

b. press CTRL+SHIFT+ENTER to enter debug mode, search for the playlistHolder clip and check if the path values are correct.

c. since you're already in debug mode, check also where the sound_mc is placed.

#6 adsmithy

adsmithy

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 19 June 2006 - 06:57 AM

1 stupid question:

a. are the rollover & rollout functions responding? eg. working?

b. press CTRL+SHIFT+ENTER to enter debug mode, search for the playlistHolder clip and check if the path values are correct.

c. since you're already in debug mode, check also where the sound_mc is placed.


a. Yes
b. Path values? _level0.playlistHolder?
c. _level0.sound_mc ?

:laugh:

Edited by adsmithy, 19 June 2006 - 07:00 AM.


#7 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 19 June 2006 - 07:55 AM

ok dude..

have a look at this code:
_root.PLHolder.attachMovie("butTemp","but"+i,i+50);
		trace(i);
		eval(_root.PLHolder["but"+i]).id=i; //<------- CHANGE THIS LINE
		_root.PLHolder["but"+i]._x = 5;
		_root.PLHolder["but"+i]._y = 40 + (i*15);
		_root.PLHolder["but"+i].but_txt.text = songname[i];
		if (i >= 3){
			_root.PLHolder["but"+i]._x = 160
			_root.PLHolder["but"+i]._y = -5 + (i*15);
		}
		_root.PLHolder["but"+i].onRelease = function(){
			clearInterval(timeInterval);
			_root.timeDisplay_txt.text = "00:00/00:00";
			_root.sound_mc.songStarter(songfile[this.id]);

- PLHolder is my playListHolder

As you see, the eval statement must point to the right locaction of where the button is being created.
since you packed the buttons inside a movieclip the path to the dynamic buttons change to:

_root.playlistHolder.buttonName

gl
funkysoul

Edited by funkysoul, 19 June 2006 - 07:56 AM.


#8 adsmithy

adsmithy

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 19 June 2006 - 08:29 AM

ok dude..

have a look at this code:

_root.PLHolder.attachMovie("butTemp","but"+i,i+50);
		trace(i);
		eval(_root.PLHolder["but"+i]).id=i; //<------- CHANGE THIS LINE
		_root.PLHolder["but"+i]._x = 5;
		_root.PLHolder["but"+i]._y = 40 + (i*15);
		_root.PLHolder["but"+i].but_txt.text = songname[i];
		if (i >= 3){
			_root.PLHolder["but"+i]._x = 160
			_root.PLHolder["but"+i]._y = -5 + (i*15);
		}
		_root.PLHolder["but"+i].onRelease = function(){
			clearInterval(timeInterval);
			_root.timeDisplay_txt.text = "00:00/00:00";
			_root.sound_mc.songStarter(songfile[this.id]);

- PLHolder is my playListHolder

As you see, the eval statement must point to the right locaction of where the button is being created.
since you packed the buttons inside a movieclip the path to the dynamic buttons change to:

_root.playlistHolder.buttonName

gl
funkysoul


Ok that worked a treat thank you. I was actually trying to do that but couldn't get the Syntax right. I seem to be in those situations alot with action script.

Do you have any ideas on a Scroll bar for the holding movie clip? Can the UIScrollBar be used? Somebody suggested earlier that I should code my own bar from scratch.
Also this isn't as important, can the playlist load the .ID3 data rather than the XML data?

cheers

Edited by adsmithy, 19 June 2006 - 08:31 AM.


#9 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 19 June 2006 - 10:08 AM

sure you can load the ID3 tags, but only when the complete song has been "downloaded" resulting in just blank space during the first streaming.
I would really go for the XML solution till the next version of Flash, which will have ID3 Classes already in place.

Not sure if the UIScrollbar will also work with a movieclip, I think it was built for textfields, but have a try.. ;)

#10 adsmithy

adsmithy

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 20 June 2006 - 10:53 AM

sure you can load the ID3 tags, but only when the complete song has been "downloaded" resulting in just blank space during the first streaming.
I would really go for the XML solution till the next version of Flash, which will have ID3 Classes already in place.

Not sure if the UIScrollbar will also work with a movieclip, I think it was built for textfields, but have a try.. :rolleyes:


OK the scrollable playlist is coming along nicely, although a few problems have occured. I'm using Flash 8 now so that may be a reason.

1.) The scrolling text does not update when an item is clicked from the playlist.

2.) The scrolling text only scrolls once across the mask.

3.) The dynamic text fields in my playlist do not show. This is not directly related to your tutorial so you may not be able to help with this one.

I've uploaded a .RAR file here containing my files around 850k: http://itsuite.it.bt...ads5/Player.rar

Would you be so kind to take a look for me? If I can get it working should be pretty cool!

Thanks

#11 Seraphic

Seraphic

    Young Padawan

  • Members
  • Pip
  • 18 posts

Posted 20 June 2006 - 11:23 PM

Hi,

I'm also really interested in this. I also used the flash music player tutorial to build a XLM steaming player. However, like adsmithy, I would like to have a scrollable play list (will have about 200 tacks). I'm somewhat new to flash so I’m not sure how to go about creating the play list and then having the tracks target to my already made options. (I.e. play, stop, volume)

Any help would be great! Thanks

Edited by Seraphic, 20 June 2006 - 11:23 PM.


#12 adsmithy

adsmithy

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 21 June 2006 - 03:35 AM

Hi,

I'm also really interested in this. I also used the flash music player tutorial to build a XLM steaming player. However, like adsmithy, I would like to have a scrollable play list (will have about 200 tacks). I'm somewhat new to flash so I’m not sure how to go about creating the play list and then having the tracks target to my already made options. (I.e. play, stop, volume)

Any help would be great! Thanks


This is my progress so far:
http://digital.proxi...tel/player.html

There are about 150 entries in my XML file. I copied the first 2 entries so it looks like I only have 2 songs, but you can tell from the playlist there are alot in there!

Just need to sort the 3 problems in the previous post and it should be all good. I used a tutorial / class from Kirupa.com forums for the scroll bar.

Edited by adsmithy, 21 June 2006 - 03:41 AM.


#13 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 21 June 2006 - 04:10 AM

adsmithy:

1- you setup the player for id3 usage which at this moment is bad (the time I wrote the tutorial I expected to have a class ready for the ID3 stuff soon), meaning you deleted the functionality of the basic player to read out the details from the XML.
2- first line of the actions layer was pointing to the wrong textfield ( I think it was text_txt.. which should be display_txt so the autosize works)
I've also changed the if statement a little bit to match your mask
3- Since Flash 8 you need to embed fonts!
Anyway the fla File attached is working how it should!

have a look at it, I've commented the stuff I've changed.
Attached File  Player.zip   41.8KB   444 downloads

Seraphic:
Have a look at the file that I've posted for adsmithy.

#14 adsmithy

adsmithy

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 21 June 2006 - 04:27 AM

adsmithy:

1- you setup the player for id3 usage which at this moment is bad (the time I wrote the tutorial I expected to have a class ready for the ID3 stuff soon), meaning you deleted the functionality of the basic player to read out the details from the XML.
2- first line of the actions layer was pointing to the wrong textfield ( I think it was text_txt.. which should be display_txt so the autosize works)
I've also changed the if statement a little bit to match your mask
3- Since Flash 8 you need to embed fonts!
Anyway the fla File attached is working how it should!

have a look at it, I've commented the stuff I've changed.
Attached File  Player.zip   41.8KB   444 downloads

Seraphic:
Have a look at the file that I've posted for adsmithy.


Thank you for this! I can't seem to download the file you've attached however, is there a problem with the server?

#15 funkysoul

funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 21 June 2006 - 06:30 AM

works for me...

#16 adsmithy

adsmithy

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 21 June 2006 - 06:41 AM

works for me...


Strange for me it just times out.. Sent you a PM

Edited by adsmithy, 21 June 2006 - 06:43 AM.


#17 Seraphic

Seraphic

    Young Padawan

  • Members
  • Pip
  • 18 posts

Posted 21 June 2006 - 11:55 AM

Hi,

I'm also really interested in this. I also used the flash music player tutorial to build a XLM steaming player. However, like adsmithy, I would like to have a scrollable play list (will have about 200 tacks). I'm somewhat new to flash so I’m not sure how to go about creating the play list and then having the tracks target to my already made options. (I.e. play, stop, volume)

Any help would be great! Thanks


This is my progress so far:
http://digital.proxi...tel/player.html

There are about 150 entries in my XML file. I copied the first 2 entries so it looks like I only have 2 songs, but you can tell from the playlist there are alot in there!

Just need to sort the 3 problems in the previous post and it should be all good. I used a tutorial / class from Kirupa.com forums for the scroll bar.


adsmithy, that is awesome. Very nice!

funkysoul, thanks for the file. I'll give it a look.

#18 adsmithy

adsmithy

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 21 June 2006 - 02:00 PM

File download works now! Im back on my home computer now. Must have been a problem with my computer at work.

Thanks for the help again!

#19 Seraphic

Seraphic

    Young Padawan

  • Members
  • Pip
  • 18 posts

Posted 21 June 2006 - 03:32 PM

File download works now! Im back on my home computer now. Must have been a problem with my computer at work.

Thanks for the help again!


adsmithy, you got it work?

Would you mind sharing the scrollable section? I'm still not experienced enough in flash.

Edited by Seraphic, 21 June 2006 - 03:44 PM.


#20 adsmithy

adsmithy

    Young Padawan

  • Members
  • Pip
  • 16 posts

Posted 22 June 2006 - 03:39 AM

File download works now! Im back on my home computer now. Must have been a problem with my computer at work.

Thanks for the help again!


adsmithy, you got it work?

Would you mind sharing the scrollable section? I'm still not experienced enough in flash.


Yes it works now. The latest version is here :
http://digital.proxi...tel/player.html

Rgd the scroll bar sure you can use it. I used this tutorial for it anyway:
http://www.kirupa.co...8/scrollbar.htm

...and this thread :
http://www.kirupa.co...ad.php?t=206127

HTH

Edited by adsmithy, 22 June 2006 - 03:44 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users