Please help....
I am trying to create a volume control that will control the volume of my entire movie-regardless of what is playing. My control actually contains 10 little buttons rather than the typical slider.
I want each of the buttons to represent a different volume: ie button 1 will be the minimum and the last button will be max vol and then everything inbetween.
Being a complete novice i just cant get to grips with what actions i need to give each button to acheive this (i assume actionscript is used, although bear in mind that this is like Japeneese to me).
many thanks tmoore935 for those examples. i was slightly confused by necromanthus' reply (no offence intended) and after 4 days of going in circles, your reply has stopped me throwing my pc outta the nearest window.
cheers again, and i will letyou know how i am getting on with the site.
thanks for your help again tmoore935. a quick question - using your example, what changes would i need to make to get the mp3 file to play automatically rather than use the "play" button, and also to stream rather than download.
thanks again for all your help
This was from a couple of weeks ago. Looking at your own site which is pretty good, you should have no problem combinig the two fun fules for your needs.
Any programming language is at its best before it is implemented and used.
Thanks for that tmoore935, I will take a look at the files you provided and have a play - some nice bits on there that i hadn't thought of like displaying bytes loading/loaded and displying current volume. That will keep me busy for a while.
One quick question - what does 1024 refer to in loading and loaded lines of the action scripting (?) as the mp3 file you provided in the example was 842kb.
Thanks again (i'll mention you on the credits as i wouldn't be getting this far without some outside help)
Originally posted by imladris
[BOne quick question - what does 1024 refer to in loading and loaded lines of the action scripting (?) as the mp3 file you provided in the example was 842kb.
imladris
[/B]
If you remove the 1024 you would get 862208. If you divide that by 2^10 or 1024, you get KB which is easier I think to comprehend. It works frame by frame so it is not perfect but seems to work with koolmoves and gives some idea to the user of what is going on.
Any programming language is at its best before it is implemented and used.
I have one final problem (HONEST!!) that you may be able to help me with:
Level 0 contains the main interface which automatically loads the media base into level 2 (level 1 will be used for the information channels).
The media base is basically an amended version of the files you provided me with.
What I need to achieve is this:
Each of the songs listed will play automatically one after the other with the option of using the "previous" and "next" buttons to skip backwards and forwards.
Do you have any idea how I can amend the media base to achieve these two things?
ONCE AGAIN MANY THANKS & PLEASE FEEL FREE TO TELL ME TO GET LOST IF I'M BEING A PAIN IN THE BUTT
Each of the songs listed will play automatically one after the other with the option of using the "previous" and "next" buttons to skip backwards and forwards.
IMLADRIS
I did this with my last web site. but I used flash mx. So give me a day or two to look it up and I will post the code that I used. But i remember that I used some method to determine when the song was at 99.9 percent(similar to a preloader) then I had used loadMovieNum to the same level as the first player. This was an If statement. But the songs were swf's. with mp3's it is easier.
Any programming language is at its best before it is implemented and used.
This is what I used on my last mp3 player which was in flash MX:
var total = Math.round(_level1.getBytesTotal()/1024);
var loaded = Math.round(_level1.getBytesLoaded()/1024);
_level1.percent = Math.round((_level1._currentframe/_level1._totalframes)/.01);
// to load the second song
if (_level1.percent>=99.9) {
loadMovieNum("player2.swf", 11);
stop();
stopAllSounds();
}
It actually loaded a new player but it did work very well.
Also go her and go to Fact #25 at:
I came up with a simple way to run one song after another. Each song is only for a few seconds. There are three songs. (These could be placed inside of another movie so as to control the volume and keep it the same with all the songs). This is a simple demo with no graphics. player1.html is the only html page needed as the other two swf's will load inside of it. This works in IE and firefox. When i used this method before, I tested on several different computers and it seemed reliable. I am sure there are easier ways to do it.
My knowledge of actionscript is Zero, but i had a thought on an easier way which you may be able to help with (this all refers to the Demo001 zip i provided before).
I have changed it to 2 frames with a stopmovie function on frame 2. Then i have added more (blank for the moment) frames. If i created the bits and bobs needed for the next mp3 in frame 3 (as done previously) would i be able to add to the prevoius code (below) to tell the movie that on sound stopping goto frame 3. This would solve my problem and also make manual navigation very easy.
i know there are commands such as "onSoundComplete" , "gotoAndPlay" etc, but can't work out how to put them together.
on SoundComplete is something tyhat I learned just the other day from the sound forum. The following activates actionscript in order to load another player or you possibly could use it to load another song. This is what was in player1.swf:
onClipEvent (enterFrame) {
_root.dl4=Sound.getBytesLoaded()/1024;
_root.dl5=Sound.getBytesTotal()/1024;
//to load the next song
Sound.onSoundComplete = function() {loadMovieNum("player2.swf", 0);}
you could put a geturl or something else. I have not tried the gotoAnd Play but it is a sharp idea. That way only one player is needed. This might work. It would send the swf to frame 6. make sure the tweens are set at 0 and that there is no preloader.
onClipEvent (enterFrame) {
_root.dl4=Sound.getBytesLoaded()/1024;
_root.dl5=Sound.getBytesTotal()/1024;
//to load the next song
Sound.onSoundComplete = function() {gotoAndPlay(6)};
}
i am at work and I do not have time to see if this works. But try it out. I am no expert at actionscript but have read a lot on the different websites that are around.
Any programming language is at its best before it is implemented and used.
onClipEvent (enterFrame) {
_root.dl4=Sound.getBytesLoaded()/1024;
_root.dl5=Sound.getBytesTotal()/1024;
//to load the next song
Sound.onSoundComplete = function() {gotoAndPlay(3)};