Hi
New to Flash, was wondering if any one out there could give us instructions in creating a simple juke box in flash. Just need a play, next track and start button. Want to play ten mp3s.
Any help much appreciated
VJ
Printable View
Hi
New to Flash, was wondering if any one out there could give us instructions in creating a simple juke box in flash. Just need a play, next track and start button. Want to play ten mp3s.
Any help much appreciated
VJ
Hello... (sorry have trouble spelling your name...)
You can follow this link:
http://www.swishzone.com/
Or you can learn how to create a simple jukebox:
http://www.cartoonsmart.com/XML_MP3_player.html - I bought this tutorial and I'm very happy with it.
Regards,
Availor.
Hi Vijayram,
There's probably many ways to do this but here's my method.
In the attached screengrab create 10 buttons (in the screen grab they're named Track 1, Track 2, Track 3, "South of the River", etc.
Now on each button attach the following AS
Quote:
on (release) {
loadMovieNum("track1.swf",10);
}
Alter the action for each button to
'loadMovieNum("track2.swf",10);'
'loadMovieNum("track3.swf",10);'
'loadMovieNum("track4.swf",10);'
etc
Now create a new fla file for each of your mp3's. Drop a copy of the mp3 onto the time line. Save & Publish.
Create a StopPlaying button on layer0 and give it the following code:
Quote:
on (release) {
unloadMovieNum(10);
}
Nice job Egg!
Cheers Paul,
This was for a draft site I did for a local pop singer. It was the best site I never did in my opinion. He thought the juke box image was to 50/60's, but that's exactly what his music was.
But then, he's the client.
Clever thinking Egg.... My problem often is that I always seem to look after a more complicated way, whereas there is a more simple way to do it... I've been pulling my haid out trying to follow some of the tutorials using XML tags to load soundtracks.... When I could use the loadMovie command... brilliant Egg :-)
I used the method above and all works in Flash and if I publish preview in HTML it was well but not on my website.
I created swf files for the songs and published them and created swf file for jukebox using the codes. All files transferred to server but it does not load the songs.
Anyone have any idea what I could do next?
If it works in preview, but not on the server, my guess is that the song.swf files aren't in the same directory as the jukebox swf.
Paul
All swf files are located on server under the same folder.
I have inserted the swf doc using Dreamweaver. Code below:
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','260','heigh t','200','title','TAT Remixes','src','../FlashDocs/TAT Jukebox','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','../FlashDocs/TAT Jukebox' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="260" height="200" title="TAT Remixes">
<param name="movie" value="../FlashDocs/TAT Jukebox.swf" />
<param name="quality" value="high" />
<embed src="../FlashDocs/TAT Jukebox.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="260" height="200"></embed>
</object></noscript>
I get the image but not the sounds when the buttons are clicked.
?????
Do you have the Scripts folder that's created uploaded?
It won't work without that.
Long story short, it's a work around to a plug-in law suit that came up a few years ago.
I do have a scripts folder with AC_RunActiveContent file
Welcome acyn04,
First, check that the swf files are where there expected to be by typing in the url into your browsers address bar:
http://www.yourdomain.com/jukebox/track1.swf
Does the music play?
Whilst your at it, check all your file names are lower case. Upper case filenames will work on your local computer but not on your server.
Hi Egg,
Thanks for your response!
I have 3 different fla docs. 1 is the jukebox with 3 buttons and the correct actions. The other 2 are the songs. All 2 song fla docs simply have the
mp3's attached. There are published as is the jukebox doc. All docs are in lowercase and are uploaded to my flash folder. I have also got a script folder with AC_RunActiveContent file. I have used dreamweaver to attach the swf doc to my page.
I tried http://www.yourdomain.com/jukebox/track1.swf and it says page not found.
The page in question is below:
http://www.cyndilauperuk.com/tat2005single.html
The swf doc (Time After Time Cassette) is on the page but the 3 buttons; remix 1, remix 2 & stop button do not work. The mouse changes but no music plays. :(
I have clearly done something wrong. Any ideas? :confused:
Josh
Josh, I don't believe it's your Flash. If you go straight to your main swf file the music plays fine.
http://www.cyndilauperuk.com/FlashDocs/tatjukebox2.swf
However, your music swf files are quite large. Almost 6 megs a piece. The server your hosting from is pretty slow as well.
Have you tried putting the Scripts folder under FlashDocs with your main swf. It might work then.
I'll poke around a bit more.
No it won't. You should change the URL to the path to your swf file on your server, just to check it's where you think it is :)Quote:
You do have upper case file names (http://www.cyndilauperuk.com/FlashDocs/tatjukebox2.swf)
ie FlashDocs, but I don't think this is the cause of your problem. Can you post the button actions on your buttons? I think RedWombat has hit the nail on the head.
Whilst on about buttons how about making the links more interactive, so on mouse over they are more obvious links other than the hand on and off the text as well as letting the visitor know something's happening once the button's been clicked.
See attachment. It doesn't actually load anything but the buttons are more interactive/obvious and the visitor can see that on clicking, something is happening.
If I move the scripts folder or the scripts to my flash folder then the swf file does not show up on the page.
For what ever reason that method of putting a jukebox together does not work for me.
As I am very new to flash I think I might need to find an alternative.
I am simply miffed by the facted it works perfectly on my pc and through flash but not on my server. :(
You need to show us the code that you have used. All of your file paths should be relative to the jukebox swf. If you have specified a full file path for your PC then it'll work there but not on the server. We can only guess if you don't post some of the code!
It's pretty likely that your swf files are in the wrong place and/or you aren't specifying a relative path to them.
Paul
Is this the code you want to see? All I did was inserted media - flash - swf doc using Dreamweaver.
<head>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','260','heigh t','165','title','tatremixes','src','flashdocs/tatjukebox2','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','flashdocs/tatjukebox2' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="260" height="165" title="tatremixes">
<param name="movie" value="flashdocs/tatjukebox2.swf" />
<param name="quality" value="high" />
<embed src="flashdocs/tatjukebox2.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="260" height="165"></embed>
</object></noscript>
</body>
For the 3 seperate swf docs I used the method listed above. Created the image, added the 3 buttons. I assigned the actions as listed above.
All swf docs are uploaded to my flashdocs folder. I have made sure all folders and files are in lowercase.
I really appreciate all the help from everyone. :)
Josh
I think Paul was wanting to see your AS code. Unless you can decompile an swf, you can't see that.
Josh, I took the liberty of decompiling your swf to peek at your code.
First, you can move your swf's - tatjukebox2.swf, tat1.swf and tat2.swf into the root of your site. (Where your main html page is). I've done this and it works.
Or second, you can try to change your AS code on your button states to have your FlashDocs subfolder.
Your jukebox should be looking in it's same folder by looking at your code. It might be looking in the root of your site for your music.
Third would be to change your html so it doesn't look in the FlashDocs folder at all and move all your swf files into the root of your site.Code:on (release)
{
loadMovieNum("tat2.swf", 2);
}
Here's an example. All I've done is take your files and put them into the root of your site. I then removed the FlashDocs from the paths in your html code. The code you posted above.
http://www.bigplan.net/client/z_test...5single02.html
Does this make sense?
Those are some funky mixes! :)
My wife and son had the opportunity to meet Cindi in Denver a few years back when she was touring with Cher. She's an incredibly nice person!
Hope it helps.
Superstar! Thank you so much!
I moved the 2 songs swf files to the root and all works fine. They take about 10 seconds to load.
One last question hopefully. How do I create remix 1 loading or remix 2 loading to appear on screen after the on release has occurred?
Basically what did with his example.
Glad it worked for you Josh.
What you're asking would require a preloader. Basically counting the bytes downloaded and when it reached 100%, would go away and play the song.
I have some simple code for one I created awhile back, I'll try to find a sample for you. Unless someone else here has one at their fingertips?
Just want to say thank you to everyone for your help.
I did a 5 day course for Flash, Actionscript, HTML, XHTML, Javascript, Photoshop and of course that just touched on the very basics.
Having said that it has enabled me to build my site from scratch.
So much more to learn and that I want to achieve. You guys will probably hear alot from me as this has been the best forum that I have found.
Josh
Hi Josh,
I'm not sure a preloader is the best method to use here as the file should stream such that the whole file doesn't need to download before it starts playing. It might be better to just have a LOADING FILE text block in frame1 and the load music file in frame2 but without the text block. This way frame1 (LOADING FILE) will display until the music starts streaming when it will disappear.