Log in

View Full Version : looking for spec. Flash player (button) script



03SF06
06-25-2008, 04:41 PM
hello!

I am looking for a very specific script,
a flash button that streams a mp3 file (only one button) basically something like this: http://www.premiumbeat.com/flash_resources/free_flash_music_player/mini_flash_mp3_player.php

but then only the middle part (the waves)in grey, that would function as the play and stop button as well...


so very small, yet effective,
thanks for your time!

Medyman
06-26-2008, 10:45 PM
How involved of a script are you looking for? Do you just need it to stop/start sound? How familiar with ActionScript are you?

03SF06
06-27-2008, 06:51 PM
euhm.. so I have done some AS before, but has certainly been a while, the main features I am looking for would be, start/stop button, a piece of code that prevents song from starting again, when other one is still playing.

I am working on getting the animation part down and see how far I get, it would be great if you'd have some time to check my code.

I'll post something as soon as I have something

03SF06
06-28-2008, 01:27 AM
I have made the button that I was looking for after this tutorial,

tutorial (http://www.lukamaras.com/tutorials/sound/simple-mp3-loop-tune-player.html)

the AS is this:

var musicPlays:Boolean = false;
var loopTune:Sound = new Sound();
loopTune.onLoad = function(success:Boolean) {
if (success) {
loopTune.start(0, 999);
musicPlays = true;
_root.musicPlayer.gotoAndStop("playing");
}
};
loopTune.loadSound("js/muziek.mp3", false);
musicPlayer.playStop.onPress = function ():Void {
if (musicPlays) {
this._parent.gotoAndStop("stopped");
loopTune.stop();
musicPlays = false;
} else {
this._parent.gotoAndStop("playing");
loopTune.start(0, 999);
musicPlays = true;
}
};



and everything is working fine, but have run into three problems,

- the mp3 file is heavy, (3mb) is there a way to make it load faster?

- when you go back to 'home' (index.html, it's a page that shows the rest of the website through an iframe so the music will play continiously)
a few times, it starts to play the song again, and even load extra flash players into the document, so I end up several playing at once how do I fix this?

- I cannot seem the embed the swf file into an HTML file properly
http://www.purephotography.nl/newsite/muziekje2.html <-- this the html page flash gives me, for the code, the actual page that it will be on and is

this is the page I am talking about (http:/www.purephotography.nl/newsite/index.html)

so I can place it in a div on a specific spot.

thank you so much for your time, I hope somebody can help me out cuz this little music thingy has post phoned the website release waaay to long

Thanks again!