Maybe some of you gurus can lend a brain to my plight. I have a Flash audio
player that I have created. I like the way it is set up. Basically the
organization is this:
Main movie contains 10 selection buttons, a play button, and a pause button.
When the movie loads it creates a movie clip called "Song" and loads the first
song (each song is its own .swf so that titles and the lited button can
accompany the audio.) As each song is completed it loads the next song into
the movie clip "Song".
Now the fun. I have a speaker icon on the stage and I wanted to click on the
speaker and a pop-up volume slider will appear allowing you to adjust the
volume. Well, it pops up and you can slide it up and down like a champ. It
just doesn't control the volume.
I never could find a tutorial on having a pop-up volume slider that controls
the volume on a movie clip so I have cleaned things from different tutorials
that had at least one of the elements. I'm sure it is that I am not making the
connection between the slider and the movie clip audio.
On my first frame I have the code:
this.createEmptyMovieClip("Song", 10);
Song.loadMovie("track0.swf");
on the movie clip of the volume slider I have:
onClipEvent (load) {
top = _y;
bottom = top + 50;
left = _x;
right = _x;
}
onClipEvent (enterFrame) {
if (dragging == true) {
_root.Song.setVolume(100-((_y-top) + 2));
}
}
ActionScript on the symbol is:
on (press) {
startDrag("", false, left, top, right, bottom);
dragging = true;
}
on (release, releaseOutside) {
stopDrag();
dragging = false;
}
It has been a variety of other things as I have tried to get this to work.
That is where it resides right now.
The other issue that I'm not sure of (because I haven't got over this hurdle
yet) is that when you click outside the volume slider making it go away, will
it retain the volume setting and hold that setting until you return and make a
new adjustment.
If anyone can be of any help I would be grateful. I have posted links to
download all the files below. If there are any ideas you like feel free to use
them.
http://www.ibcyouth.org/MOBplayer/MOBplayer.html (to test the player as it
is now)
http://www.ibcyouth.org/MOBplayer/MOBplayer.fla (the fla file for the
player)
http://www.ibcyouth.org/MOBplayer/track0.fla (the fla file for
the first audio track)
http://www.ibcyouth.org/MOBplayer/track0.swf (the ten audio tracks)
http://www.ibcyouth.org/MOBplayer/track1.swf http://www.ibcyouth.org/MOBplayer/track2.swf http://www.ibcyouth.org/MOBplayer/track3.swf http://www.ibcyouth.org/MOBplayer/track4.swf http://www.ibcyouth.org/MOBplayer/track5.swf http://www.ibcyouth.org/MOBplayer/track6.swf http://www.ibcyouth.org/MOBplayer/track7.swf http://www.ibcyouth.org/MOBplayer/track8.swf http://www.ibcyouth.org/MOBplayer/track9.swf