Problems In My Audio Player (Tween)
I want to make a smooth movement when i click on anywhere in my seek bar. So i come up with an tween which is below. I have a mask called tbMask which is stays beside timeBar.
ActionScript Code:
Code: new mx.transitions.Tween(timeBar, "_xscale", mx.transitions.easing.None.easeOut, 0 , tbMask._xmouse, 2, true);
So basically this would make timebar stretch to tBmask's _xmouse which has same x (170). But it dont! It exceeds about 50% where i clicked and go back to _xmouse.
Far from this problem, the anothers are; I call this swf from my main swf. Tween function works when i try to view my main.swf but it dont work when i call player.swf from browser.
Any opinion appreciated. Thanks K
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 08-11-2008, 01:25 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Audio Player That Requires Access Codes To Play Audio Files. Possible ?
LINK
I've just uploaded this rough piece of website for an upcoming band. If you click LINK you will see two flash movies. The one on the bottom is the audio player. What they want instead of JUST an audio player, is a player that plays certain "secret" audio files if you enter the correct 6 digit number. So imagine a text field and a submit button next to the < || > controls. I'm still getting to know Flash and I have no idea how to create something like this. Anyone have any advice? Any tutorials out there? Info? and finally...this IS possible right?
Thanks
Audio Player That Requires Access Code To Play Audio Files. Possible ?
http://www.theafternoontears.com/monitor.html
I've just uploaded this rough piece of website for an upcoming band. If you visit the URL above you will see two flash movies. The one on the bottom is the audio player. What they want instead of JUST an audio player, is a player that plays certain "secret" audio files if you enter the correct 6 digit number. So imagine a text field and a submit button next to the < || > controls. I'm still getting to know Flash and I have no idea how to create something like this. Anyone have any advice? Any tutorials out there? Info? and finally...this IS possible right?
Thanks
Audio Player/playing Audio Files Externally (mp3)
I've designed the audio player with all of the necessary buttons. I'm trying to play the mp3 files in an consecutive order. I am having trouble stopping or pausing, rewinding and fast-forwarding the mp3 file. I also have a next button and a back button and I don't know how to get them to work either. I have a slider, but can't get it to work either. Please help! I tried to follow the tutorial on flash kit, but wasn't quite understanding it. I would greatly appreciate this if someone could lend their knowledge and support.
Thanks in advance!
PR Gip
CD With Projector And Audio Track For Conventional Audio CD Player
hey guys,
I'm creating a CD that contains an auto-executable flash profector but, I want the option of putting the CD into a conventional audio CD player and hearing an audio track.
Is this possible, creating an audio and data cd? If so, how?
Thank you very much!
artane
CD With Projector And Audio Track For Conventional Audio CD Player
hey guys,
I'm creating a CD that contains an auto-executable flash profector but, I want the option of putting the CD into a conventional audio CD player and hearing an audio track.
Is this possible, creating an audio and data cd? If so, how?
Thank you very much!
artane
Flash Audio Player For Streaming Audio
I am working on our church's website and am trying to add mp3 sermons for our visitors to listen to. I have a player that I downloaded but is has some problems, for some reason it will play 2 files at the same time, sometimes it says file not found and I am not sure why. I do not have the FLA file just the SWF that was on the website for download so I can't make any changes. Can anyone tell me how to make a flash audio player with play, stop, pause, rewind and fast forward buttons. Or if anyone has a sample player that I could use for my church, I need it as small as possible and do not need a playlist. Any help would be great.
[F8] 2 Flash Objects - Audio Player Passes Pause To Video Player
I have 2 flash objects on my html page.
One is a video player and the other is an audio player.
The video player starts playing by default.
I'd like to somehow set this up so that if someone clicks on the audio player, it automatically pauses the video player.
Please note that these are 2 SEPARATE FLASH OBJECTS on my HTML website. I'm not developing an all Flash driven website.
The audio player was added as an afterthought, originally there was only going to be a video player on the page.
How can I send a pause command from the Audio Player to the Video Player?
FOO
Pop Up Audio Player Silencing Page Player
I recently added a pop up player to my site, which pops up the audio player in a new window if you care to listen while navigating other pages (or want to listen without having the songs start over each time you change a page, because i'm working primarily html, and only using a flash player, so each time you load a new page it starts over). What i'm wondering is if there is some kind of global function that will have the media player on the page check if the pop up player is playing, and if it is, then not to start the audio. I'm not sure if that makes sense or not, but basically i want one audio player to be playing at a time, so you don't have songs clashing against each other.
Audio Player/MP3 Player Class
Hello,
Below is my MusicPlayer class. Feel free to use it however you see fit. The sources are attached so you can see a working example. I striped my graphics since I'm so sexy at PhotoShop...
I know leaving objects in a class as public is bad karma, but I though it this case it warrants it. Notice public var sound:Sound is public. If you want to add more method/function without changing the class you can directly access the variable.
ActionScript Code:
import mx.utils.Delegate;
import com.FlashGordon.utils.TimeFormat;
class com.FlashGordon.media.MusicPlayer {
public var sound:Sound;
private var duration:Number;
private var travelDistance:Number;
// vars used to display the current time in txt field
private var displayTime:Boolean = false;
private var txt:TextField;
// vars used in buttons of sound
private var is_paused:Boolean = false;
private var restartAt:Number;
public function MusicPlayer(_duration:Number, _soundObj:MovieClip) {
// set the total duration of the music file in milliseconds
// if duration is defined
if (_duration != undefined) {
duration = _duration;
// if duration is not defined
} else {
// make an onLoad function to get the actual duration
sound.onLoad = function() {
duration = sound.duration;
};
}
// create a sound object
if (_soundObj != undefined) {
sound = new Sound(_soundObj);
} else {
sound = new Sound();
}
}
// load the file to play
public function play(file:String):Void {
sound.loadSound(file, true);
}
// track the progress of the song and scrub the sound postion
public function progress(bar:MovieClip, preloader:MovieClip, scrub:MovieClip):Void {
// the total distance the scrub will travel. Used to set restart value
travelDistance = bar._width;
// track the loading of the song
preloader.onEnterFrame = Delegate.create(this, pre_onEnterFrame);
function pre_onEnterFrame() {
preloader._xscale = sound.getBytesLoaded()/sound.getBytesTotal()*100;
// once the sound object has been completely loaded
if (sound.getBytesLoaded() == sound.getBytesTotal()) {
delete preloader.onEnterFrame;
preloader._visible = false;
}
}
// move the progress bar length
bar.onEnterFrame = Delegate.create(this, bar_onEnterFrame);
function bar_onEnterFrame() {
bar._xscale = (sound.position/duration)*100;
scrub._x = bar._x+bar._width-(scrub._width/2);
if (displayTime) {
txt.text = TimeFormat.format(sound.position/1000)+"/"+TimeFormat.format(duration/1000);
}
}
// set up scrubbing
scrub.onPress = Delegate.create(this, scrub_onPress);
function scrub_onPress() {
sound.stop();
// set up draging for scrub
var left:Number = bar._x-(scrub._width/2);
var right:Number = preloader._x+preloader._width-(scrub._width/2);
scrub.startDrag(false, left, scrub._y, right, scrub._y);
// make progressbar follow scrub
delete bar.onEnterFrame;
scrub.onEnterFrame = Delegate.create(this, scrub_onEnterFrame);
function scrub_onEnterFrame() {
bar._width = scrub._x+(scrub._width/2)-bar._x;
// display the current time for the scrub head
if (displayTime) {
var percent:Number = (scrub._x+(scrub._width/2)-bar._x)/travelDistance;
// Math.floor is used here instead of Math.round because
// of dealing with time and not play position.
var restart:Number = Math.floor(percent*duration/1000);
txt.text = TimeFormat.format(restart)+"/"+TimeFormat.format(duration/1000);
}
}
}
scrub.onRelease = scrub.onReleaseOutside=Delegate.create(this, scrub_onRelease);
function scrub_onRelease() {
delete scrub.onEnterFrame;
scrub.stopDrag();
var percent:Number = (scrub._x+(scrub._width/2)-bar._x)/travelDistance;
var restart:Number = Math.round(percent*duration/1000);
sound.start(restart, 1);
bar.onEnterFrame = Delegate.create(this, bar_onEnterFrame);
is_paused = false;
}
}
// display the time of the audio file
public function display_time(_txt:TextField):Void {
txt = _txt;
displayTime = true;
}
// Control the volume
public function scrub_volume(scrub:MovieClip, scrubOrientation:String, lowerLimit:Number, upperLimit:Number):Void {
scrub.onPress = Delegate.create(this, onPress);
function onPress() {
if (scrubOrientation == "horizontal") {
scrub.startDrag(false, lowerLimit, scrub._y, upperLimit, scrub._y);
} else if (scrubOrientation == "vertical") {
trace("vertical");
scrub.startDrag(false, scrub._x, upperLimit, scrub._x, lowerLimit);
}
scrub.onEnterFrame = Delegate.create(this, onEnterFrame);
function onEnterFrame() {
if (scrubOrientation == "horizontal") {
var percent:Number = (scrub._x-lowerLimit)/(upperLimit-lowerLimit);
} else {
var percent:Number = (scrub._y-lowerLimit)/(upperLimit-lowerLimit);
}
sound.setVolume(Math.round(percent*100));
}
}
scrub.onRelease = Delegate.create(this, onRelease);
function onRelease() {
scrub.stopDrag();
delete scrub.onEnterFrame;
}
}
// Set up the Play, Stop, and Pause buttons/movieclips
public function buttons(play:Object, stop:Object, pause:Object):Void {
// play button
//if (play != undefined) {
play.onRelease = Delegate.create(this, play_onRelease);
function play_onRelease() {
if (is_paused) {
sound.start(restartAt, 1);
is_paused = false;
} else {
sound.start(0, 1);
}
}
//}
// stop button
//if (stop != undefined) {
//trace( "defined");
stop.onRelease = Delegate.create(this, stop_onRelease);
function stop_onRelease() {
sound.start(0, 0);
sound.stop();
is_paused = false;
}
//}
// pause button
//if (pause != undefined) {
pause.onRelease = Delegate.create(this, pause_onRelease);
function pause_onRelease() {
if (!is_paused) {
is_paused = true;
restartAt = Math.round(sound.position/1000);
sound.stop();
}
}
//}
}
}
ActionScript Code:
class com.FlashGordon.utils.TimeFormat {
//
static function format(n:Number):String {
var N:Number = Math.floor(n%60);
if (!isNaN(N)) {
if (N<10) {
return Math.floor(n/60)+":0"+N;
}
return Math.floor(n/60)+":"+N;
} else {
return "0:00";
}
}
}
ActionScript Code:
stop();
import com.FlashGordon.media.MusicPlayer;
var player:MusicPlayer = new MusicPlayer(132781);
player.play("mp3s/con alma.mp3");
player.progress(progressBar_mc, preloaderBar_mc, scrub_mc);
player.display_time(time_txt);
player.scrub_volume(volScrub_mc, "horizontal", 30, 100);
player.buttons(play_mc, stop_mc, pause_mc);
Here is my only question:
Why does this not work:
ActionScript Code:
public function buttons(play:Object, stop:Object, pause:Object):Void {
// play button
if (play != undefined) { // I CAN'T DO THIS
play.onRelease = Delegate.create(this, play_onRelease);
function play_onRelease() {
if (is_paused) {
sound.start(restartAt, 1);
is_paused = false;
} else {
sound.start(0, 1);
}
}
}
Loading External Video And Audio In Tween Menus
Hi guys I'm new to Actionscript.org I have a major issue. My website is http://www.ctournis.com and where I will talk about is on the projects section of my website. As you can see for each one of the events I have a tween fly out menu come out on roll over. The way I have done this is by creating a movie which I drop into the over section of the button. So far so good. I then create a separate movie which is embedded in tween which acts as my loader. I use action script to load the external elements into the loader. The reason I use an other movie is because if I don't the element uploads as the tween is happening. If you look at the "Tech Team Teaching" you can see this in action with the picture. How ever on some of the other tween menus I need to do the same with audio or video. The problem I have is that when I do this the video plays and sound play as soon as you enter the projects page....without rolling over the button it just plays in the back ground. I have tried all sorts of code combinations.
For video1:
var fs4Connect:NetConnection = new NetConnection();
fs4Connect.connect(null);
var fs4Stream:NetStream = new NetStream(fs4Connect);
fs4Stream.play("fs4.flv");
var fs4metaListener:Object = new Object();
fs4metaListener.onMetaData = onMetaData;
fs4Stream.client = fs4metaListener;
var fs4video:Video = new Video();
fs4video.attachNetStream(fs4Stream);
addChild(fs4video);
function onMetaData(data:Object):void
{
}
fs4video.x = 1;
fs4video.y = 1;
For Video 2:
var fs4Req:URLRequest = new URLRequest("fs4.flv");
var fs4Video:Video = new Video();
fs4Video.load(fs4Req);
fs4Video.addEventListener(Event.COMPLETE, onComplete);
function onComplete(event:Event):void
{
fs4Video.play();
}
fs4Video.x = 1;
fs4Video.y = 1;
Thanks in advance for you help and any suggestions....Cheers guys..Flash on!
CD Audio Player
Does anyone know where I can get a tutorial on building a Flash based CD player?
Audio Player
I just made my playback buttons, now i want to have 3 mp3s.. or midis, and When the user clicks >>| it goes to the next song, and i want the play to loop the current playing song, and then the stop, stops the song alltogether, could somehelp please help me with this?
Audio Player
Hey guys,
Was hoping someone could help me out here. I'm looking for a nice audio player that will be used for about 3 or 4 tracks that is not over the time design wise, but similar if not identical to the audio player on www.iso50.com
Also, if anyone knows of a script that is like 24-7 media where you mouseover a navigation button and the rest of the navigation disappears, that would be cool. I love the effect and i want to give it a shot. Example here: http://www.24-7media.de/Cannonball/
If someone could point me in the direction to a simlar script or give me some direction as to where i can go with this i would much appreciate it. Thanks for your time.
Help With Audio Player Plz
I am trying to make an audio player with flash 2 (I know - but it's the full version and I have it on cd (mx is too big to download with a 56k!)) but I can't get it to work at all. Could somebody please help me by running through the steps needed to make an audio player. All I want is a play and a stop button on a background colour! It sounds stupid but I really can't do this. I haven't used flash very much before. Please help...
Audio Player
What I want is a small media player that will have a drop-down menu, a small progress bar, and finally a play and a pause/stop button. Anyone have any tutorials to help me get started on this? BTW, I have Flash MX 2004 Pro.
Audio Player
Hello,
I want to make a small separate .swf file containing a music player to place next to my movie. Preferably it would have on, off, forward, and back buttons for 3 separate tracks. Unless there is a way to have the music player inside my existing movie and have it play over all scenes without stopping, then I guess this is my best option.
Audio Player?
ehy could someone please help me out with a tutorial or something to make one of these audio players.
It can be found at this link
It's in the bottom right hand corner, ok thanks.
Audio Player
Hi
Im trying to put an mp3 file into this player:
http://www.flashkit.com/board/showth...hreadid=606569
the problem is that with my sound file the player doesnt function properly anymore; the song starts playing automatically, the "play" button does not work.
As instructed I put my mp3 file in the correct fla file and output it as sound_file.swf
heres the instruction in the fla:
"place your audio file here, and set the sync to event make sure the frames in this movie are the same length as the audio in the clip"
Heres what I do exactly:
file>import>import to stage> mysong.mp3
then you see the blue song info in the layer with the instruction label on it.
I leave the sync on event."
Does anyone see what I do wrong??
thanx
Help With My Audio Player
Hello, I've got an audio player on my site that streams an mp3 when you select it and push play. Unfortunately, it's a very basic set up (basically declaring mySound as a new sound and then having a button load that mp3). I would like to have a bar that shows buffering process and song length/title etc. and i'd also like to make it play a random song upon loading. Anyone have ideas how to do this? Thanks in advance!
Audio Player Help...
Regarding this link:
http://www.shootingblanks.net/TEMP/ANIXTER/radio.html
There are supposed to be audio files playing. I'm sure I'm doing something wrong in my AS. Can someone please take a look at my code, and see if you can think of something? I'm not the best with AS, so I may have WAY overcomplicated things in the code! Here's a link to a ZIP file with the .FLA and the .XML file that the .FLA references:
http://www.shootingblanks.net/TEMP/ANIXTER/radio.zip
THANKS!!!..
Audio Player Help.
I have an audio player in my flash movie. the audio player is hidden at first except for a button that you can press in order for the player to move down and become visible. inside this audio player is another symbol that is the actual player with the buttons and sound and such. you press the button for the player to move down. then you press is to move up. but when you press it to come down again, the music starts playing again, even though its already playing... i know why it does it, but i dont know how to fix it.
Audio Player Help
Hello all, I've been working on an interface that contains an xml fed audio player. Problem is whenever I return to the first frame in the movie the audio starts to overlay over the audio that is already playing. I'm sure this is probably a simple fix but sometimes the easiest stuff is the hardest to find. Please someone help me with this issue so that I may move on! Thanx.
Audio Player
Ok I used this Tutorial to help me get started in making my own media player.
http://www.flashkit.com/tutorials/Au...1008/index.php
I completed the player but have one problem. See I made the player in order to put it on www.myspace.com. I dont know how to publish the .fla. The tutorial teaches me to make a Master .fla file in which will get its song and play options (rew,play,pause) from another .fla. PLease help I have been working on this for more than three days and this is the only thing that is stoping me. Thanks for any advise.
~free~
Audio Player
How can I make a audio player that links to streaming server on the net ?
something like default player but skin it .. so i can have volume and other controls.
thanx
Audio Player Help
I tried two different tutorials for this style of audio player, and both had the same error. Here are the two tuts:
http://www.flashkit.com/movies/Sound...1160/index.php
http://www.tutorialized.com/tutorial...controls/14673
The error message is : Error opening URL "file:///C|/Documents%20and%20Settings/Christian/My%20Documents/My%20Pictures/Songs/songs/1.mp3"
Ofcourse the file desination URL is different on your comp, but it has an error opening the file when its clearly there. Also in the first tut, I played the audio file where it said and renamed it accordingly, and still nothing.
I use Flash Pro 8. Help would be very appreciated. Thanks.
[F8] Audio Player
Hi guys,
I need some help creating and embedding an mp3 player with invisible list very simillar to this:
http://www.vlatkostefanovski.com.mk/
Any examples, tutorials, suggestions are greatly appreciated.
Thank you for your help.
[F8] Audio Player?
i've been ridiculously tasked with building a audio player in flash for my cousin's website.
it's something like the audio player in www.johnmayer.com but without the video/image bits at the top.
it basically should list out the tracks n allow users to select which track to play, with play/pause/forward buttons.
can someone point me to the right directions? are there such players for sale on the net?
Audio Player
I've created an audio player script the only problem is that it need the music to stop if the user leaves the frame which contains the player.
I'm sure this is pretty simple to do but I really don't have much of a clue when it comes to flash.
_root.mySound = new Sound();
_root.mySound.loadSound(music.mp3", true);
_root.mySound.stop();
function soundComplete() {
_root.soundPlaying = false;
}
_root.mySound.onSoundComplete = soundComplete;
[F8] Audio Player
Hello,
I'm a newbie in flash and am having trouble figuring out how to create an audio player. I would like it to have a on/off button (maybe a speaker icon) and a few track buttons (numbers 1-4) that the viewer can choose from. I have been able to get the on/off button working, but I'm not sure how to change from track to track. I would greatly appreciate your help! Thanks in advance.
[F8] Audio Player
Hello,
I'm a flash newbie and I am having trouble creating a flash audio player. I would like it to have an on/off button (a speaker icon) and a few track buttons (numbers 1-4). I have been able to get the on/off button working, but can't seem to change from track to track. Any suggestions? Thanks in advance!
Audio Player
I asked something similar to this a month or so back. I'm going to ask something slightly different now.
I've created an audio player in flash cs3. Audio is applied to frame 1 of the main timeline to stream. Then, the created "media controller" movie clip controls playback of the main timeline.
1st, I want to change this so that rather than re-publishing for each audio file all the time, I can pass a variable to my swf to tell it which external audio file to load in. Anyone know how I'd go about doing this?
2nd, in the last version of my audio player, I tried my hand at using actionscript 3. Should I be planning on making a permanent switch to as3 and keep programming in it, or is browser support still an issue at this point?
lastly, whichever AS version is recommended, how do I perform the audio import portion in it, and access its load progress?
MANY thanks in advance!
[CS3] Audio Player
Hello People,
I went on Skillet's (a Band) website, and want to know how to make something like there Audio player:
Go to: http://www.skillet.com/home and the audio player is on the top right hand corner of the page.
I want to know how to do this:
-Control the music (With play, pause, next track, etc..)
-And the fact that the Audio player is drop down, and it's hidden unless you hover your mouse over it
Thank you!
Audio Player
Hello everyone. I just started working with Flash and I need some direction. Does anyone know where I could find a tutorial on how to make a Flash audio player? I'm looking to create something that allows you to choose multiple audio clips (one at a time obviously). This script would be able to play the audio clip, pause it or stop it. Any help would be appreciated!
Audio Player
hi everybody
I would like to build an audio player that plays what you drag in.
Is it possible with flash mx 2004?
I looked on the net for a tutorial or information but I found out nothing.
In my little knowledge about flash, I think I can load the audio file when I drag it on the stage and write the information on a xml external file.
anyone know how can I do or where can I find some information?
thanx
Audio Player Lag
Hello everyone. I have a flash music player on the website that I am developing. I am going to have splash page that offers an option to a page without the player for people who have slow connections.
The problem is this: In an IE browser, if the song isn't buffering fast enough, it will skip. However, in a FF browser, if the song isn't buffering fast enough, it lags the browser, and none of my pages will load. The songs skipping in IE is not a big deal because you can just mute it. But when my pages won't load, I consider it a big problem.
The website is http://beta.pixelbox.cc
I know that the music player is the reason for the pages not loading in FF, because they will load fine if I remove the playlist from the website.
Is there a way that I can limit the bandwidth to my flash music player? I believe that FF won't load my pages because the player is using all of the resources trying to buffer the song.
Pb With AS In My Audio Player
Hi,
I created my audio player with your tutorial few days ago. http://www.actionscript.org/tutorial...er/index.shtml
But, with your tutorial, when the soundmovie is loaded, you have to press the play button to play the sound.
In my animation, I would like the sound begins when the movie is loaded, without pressing the play button.
So, in the media-controls movie, I have erased the action "-parent.stop();". So, my sound begins like I want. But, because there is a but, how can I do to see my stop button instead of my play button when the sound begins ?
Thanks for your help and sorry for my English.
Thanks a lot for your tutorial. I am a beginner in Flash and I succeed in creating my audio player !
Gwen
Audio Player
Hi Group
Anyone know of a place to purchase an audio player like the one's used for
the following sites
http://www.energy69.com/main.html
www.hedkandi.com
Really need help on this... Cheers
R
Audio Player
Hello. I have an audio player which you can see at http://www.thereversenoise.com/flash/sitemenu.html . It's on that little menu type thing there. Everything works fine, except I want the audio player to go to the next song after one song is done.
How would I go about making it transition to the next frame (which contains the next streaming mp3 code) after the song in the current frame is finished?
Thanks.
Help With Audio Player
I am using an audio player that I learned from a tut on this site. There's one change I'd like to make. When the page loads, the slider (for the volume) is set at 0. I'd like it set at about 40 (not quite half volume).
I've pasted the code I used for the slider and the link to look at the finished product.
Any help would be greatly appreciated.
Jamie
Actionscript for the slider:
this.ratio = 0;
dragger.onPress = function() {
this.startDrag(true, 0, 0, line._width, 0);
this.onEnterFrame = function() {
ratio = Math.round(this._x*100/line._width);
_root.volume = ratio;
};
};
dragger.onRelease = dragger.onreleaseOutside=stopDrag;
link for the site
http://64.226.7.185/newtiffany/tiff.html
Audio Player Woe's
hey guys i have this audio player and it worked great until I put my whole site within a movie clip so I could getthat fullscreen centered flash look. for some reason the forward and back buttons work, but the display txt became disabled aswell as the stop/play buttons. Im not too good with AS does anysee anything wrong this code: check this out for a visual: http://www.matchmakerrock.com/test
stop();
playlist = new XML();
playlist.ignoreWhite = true;
playlist.onLoad = function(success) {
if (success) {
_global.songname = [];
_global.songfile = [];
for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
_global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
_global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file;
// trace(songname[i]+" "+songfile[i]+" "+songband[i]);
}
}
_root.createEmptyMovieClip("sound_mc", 1);
_global.song_nr = random(songfile.length);
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
function timer(sound_obj) {
time = sound_obj.position/1000;
min = Math.floor(time/60);
min = (min<10) ? "0"+min : min;
sec = Math.floor(time%60);
sec = (sec<10) ? "0"+sec : sec;
timeDisplay_txt.text = min+":"+sec;
}
MovieClip.prototype.songStarter = function(file, name) {
if (this.sound_obj) {
this.sound_obj.stop();
delete this.sound_obj;
}
this.sound_obj = new Sound(this);
this.sound_obj.loadSound(file, true);
this.onEnterFrame = function() {
if (this.sound_obj.position>0) {
delete this.onEnterFrame;
this._parent.display_txt.text = name;
timeInterval = setInterval(timer, 1000, this.sound_obj);
} else {
this._parent.display_txt.text = "loading...";
}
};
this.sound_obj.onSoundComplete = function() {
clearInterval(timeInterval);
this._parent.timeDisplay_txt.text = "00:00";
(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
this._parent.volume1.dragger.onPress = function() {
startDrag(this, true, 0, this._y, this._parent.volBG._width, this._y);
this.onEnterFrame = function() {
var p = (this._x/this._parent.volBG._width)*100;
this._parent._parent.sound_mc.sound_obj.setVolume( p);
};
};
this._parent.volume1.dragger.onRelease = function() {
delete this.onEnterFrame;
stopDrag();
};
this._parent.volume1.dragger.onReleaseOutside = function() {
stopDrag();
};
};
btn_play.onRelease = function() {
clearInterval(timeInterval);
this._parent.timeDisplay_txt.text = "00:00";
this._parent.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
btn_stop.onRelease = function() {
clearInterval(timeInterval);
this._parent.timeDisplay_txt.text = "00:00";
this._parent.sound_mc.sound_obj.stop();
};
btn_fw.onRelease = function() {
clearInterval(timeInterval);
this._parent.timeDisplay_txt.text = "00:00";
(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
btn_rev.onRelease = function() {
clearInterval(timeInterval);
this._parent.timeDisplay_txt.text = "00:00";
(song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr--;
_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
playlist.load("playlist.xml");
Thanks all any help is greatly appreciated
*Audio Player Help
I am looking to add a audio player control onto my website
I want the button to say like "Turn music off" and when you click that the button changes to "Turn music on" also want the music to automatically start once you enter my website
Any help would be great Thanks
Audio Player
I am building upon a tutorial that I followed on Flashkit regarding sound. I have built a .swf that contains an 11-track "media player." It relies entirely upon actionscript to call the mp3 files for playback. My vision for this, was to load the .swf .into the main timeline for a site that I am building. The media player functions in terms of the functionality of the buttons for next and previous tracks. However, the actionscript isn't calling the sounds.
Do I need to import the sounds into the main timeline that I am using for the site navigation and change the linkages? I think that I have tried this and it didn't work...can anyone help?
Thanks.
Audio Player
Hello. I have an audio player which you can see at http://www.thereversenoise.com/flash/sitemenu.html . It's on that little menu type thing there. Everything works fine, except I want the audio player to go to the next song after one song is done.
How would I go about making it transition to the next frame (which contains the next streaming mp3 code) after the song in the current frame is finished?
Thanks.
Help With Audio Player
I am using an audio player that I learned from a tut on this site. There's one change I'd like to make. When the page loads, the slider (for the volume) is set at 0. I'd like it set at about 40 (not quite half volume).
I've pasted the code I used for the slider and the link to look at the finished product.
Any help would be greatly appreciated.
Jamie
Actionscript for the slider:
this.ratio = 0;
dragger.onPress = function() {
this.startDrag(true, 0, 0, line._width, 0);
this.onEnterFrame = function() {
ratio = Math.round(this._x*100/line._width);
_root.volume = ratio;
};
};
dragger.onRelease = dragger.onreleaseOutside=stopDrag;
link for the site
http://64.226.7.185/newtiffany/tiff.html
Audio Player
Hello everybody,
I am looking for a easy to configure audio player. For a website i want a little player where visitors can choose from maybe 3 songs and they can stop the audio from playing. (if it plays only one song i am also very happy :-))
Any suggestions??
I Need A Swf Audio Player?
i'm developing a music steaming site.... i need a player to play swf audio files with controls ... any idea???
|