Load Sound
good day members
i am using FLASH MX
i am trying to load sound and i wish someone to help me if this code is right or wrong
i want to load sound by using this code
Sound.loadSound(url,is streaming)
the steps are like this;
in first frame i add this code
PHP Code:
mysound= new Sound();
mysound.Loadsound("thesound.mp3",true);
soundtotal=_root.getBytesTotal();
soundloaded=_root.getBytesLoaded();
percent=Math.round((soundloaded/soundtotal)*100);
bar._xscale=percent;
if(soundloaded== soundtotal){
_root.gotoAndPlay(3);
}
on second frame i add this code
PHP Code:
gotoAndPlay(1)
on the third frame i add stop(); action
and on the stage i add a button and i add this code on it
PHP Code:
on (release){
mysound.start();
}
my problem is when i try to test the loading bar it is not showing the bar during the loading
is there amy solution to solve this problem
hope my question is clear
thanks alot
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 11-18-2003, 02:17 PM
View Complete Forum Thread with Replies
Sponsored Links:
How Do I Load External Sound Into A Movieclip Vs. A Sound Object?
I have a sound player movie clip that is designed to play the sound loaded into the parent movie clip. In particular, it uses "_parent.gotoAndPlay(targetFrame);" to start playing the sound. And it works well for statically loaded sounds.
However, how can I use this sound player movie clip with dynamically loaded sounds? The player requires a sound to be loaded into the parent movie clip, but the only way I know of loading an external sound is instantiating a new Sound() object and then using .loadSound(...). But loadSound doesn't load the sound into a movie clip.
So, how do I load an external sound into a movie clip versus a Sound object?
Thanks!
View Replies !
View Related
Random Sound Load And Start Is Speeding Up The Sound. Any Help?
Hello,
My first post here at Kirupa. I thought I'd give it a try.
I'm trying to load sound dynamically into a clip and then play it randomly. The AS I came up with works great if the sound is embedded and I use the .attachSound() method instead of loadSound(). Now, when I load it dynamically and use the code below, the sound plays very fast and at a higher pitch.
I'm new to AS. Any help or insight into the issue would be much appreciated!
Thanks everyone!
ActionScript Code:
var crows = new Sound(this); crows.loadSound("Raven.mp3", false); crows.setVolume(100);rNum = function(){ var i = 0; var randNum = Math.round(Math.random()*500); if (i>=randNum) { crows.start(0, 1); }};randSound = setInterval(rNum, 100);
View Replies !
View Related
Load New Sound Into Existing Sound Object
I have an extremely simple AS3 mp3 player that I'm trying to create but the problem I'm running into is that I can't seem to load a new song into my sound object when I switch tracks. Here's the basic code I'm using:
Code:
var sound:Sound = new Sound();
var sControl:SoundChannel = new SoundChannel();
var isPlaying:Boolean = false;
function triggerAudio(id:Number, path:String, type:String):void {
if(isPlaying){
sControl.stop();
sound.close();
isPlaying = false;
} else {
sound.load(new URLRequest(path));
sControl = sound.play();
sControl.addEventListener(Event.SOUND_COMPLETE, completeHandler);
isPlaying = true;
}
}
Right now, playing an initial song works
Stopping a song works
But loading a new song over top of a previously loaded song doesn't.
I'm brand new to AS3, what am I missing?
View Replies !
View Related
Sound Object Attach Sound Or Load
Hi
I am wanting two sounds in my FLA one for movie clip buttons and one for background music.
In the past I have created a sound object and just loaded the file from a location on the server, but I've just seen an aletrnative method thats works very much in the same way but you import the sound files into the library and then export for action script and then attach them to the sound object.
Which is the best method to use? If I bring them into the library do they contribute the FLA size? and if they do is this worse than just loading them?
What are the pros and cons of each method? and which is best to use?
Thanks
Ricky55
View Replies !
View Related
Load Movie But Sound Doesnt Load.
i dont understand why this is. maybe im forgetting something
all i want is when the page loads it also loads an external movie clip that is the background music,
i can do this, but when i do, the sounds doesn't transfer over with it.
but if I make the bgmusic clip the main movie and load the others into it, it works [the sound that is]..but we dont want this
some help would be much appreciated. thanks bros..
View Replies !
View Related
Load Sound
ok I am trying to load a sound after my movie loads. I have a stop and play button at the bottom. i tried using this code for you know if its playing dont play it: on (press) {if (playing!=true) { _root.firstSound.start(0,999); playing=true;} but it says there are errors. I got this code from http://www.kennybellew.com/ were I was sent from this forum. If there something wrong with this code or do I just not know how to use it? Thanks for helpin me!!
View Replies !
View Related
How To Load A WAV Sound? - Not SWF
Hi everybody,
I would like to create a button that will be embedded in MMB, when clicked it will load a sound file (WAV format for example “sound1.wav”, not SWF as for non-Flash computers). Can you help me? I’m using Flash MX. Thanks a lot.
hcongthanh@yahoo.com
View Replies !
View Related
Load MP3 Sound ? Pls HELP
Hi everybody
I am using Flash MX. I want to create a button that will load an MP3 sound file when clicked. I have applied the following command:
on (release) {
loadMovieNum("soundF.MP3", 1);
}
But it does not work. Please undestand that I want it to load an MP3 sound file not SWF. Please help me. Also please advise me if Flash button can load .WAV sound file or not and kindly tell me HOW.
Thanks a lot
hcongthanh@yahoo.com
View Replies !
View Related
Load Sound
Hey everyone, I was wondering if there is any way to have sound fade in and out if I load it externally? I have one loop playing and would like to have it fade in automatically but then when the control is pressed to stop and play again, i would like to have it fade in on play and fade out on stop.
Much Appreciation
View Replies !
View Related
Load Sound Help
Hi !
Can somebody please help me ?! I need the next song ( situated on the next frame ) to start playing "on SoundComplete", but I cant get it to work ... :-(
The code is as follows:
-------------------------------------------------------------------------------
stop();
musicPosition = 0;
ljud.start();
// music always starts from 0
// ----Load sound/playbutton------
play.onPress = function() {
ljud = new Sound();
// the sound = "new Sound"
ljud.loadSound("lat1.mp3", true);
// which sound to be loaded
_root.onEnterFrame = function() {
// s fort man ppnar sidan kommer variabler A,B,C ge input om nedan
// info.
A = ljud.getBytesLoaded()/1000;
B = ljud.duration/1000;
C = ljud.position/1000;
pos2 = int(C%60);
pos3 = Math.floor(C/60);
};
ljud.start(musicPosition/1000, 0);
// start sound
nummer = ljud.getVolume();
_root.test.latnamn.gotoAndPlay(250);
// pick info for volume
ljud.onSoundComplete = function() {
//on sound complete start next ?! this is where I need help !!!!
gotoAndStop(2);
_root.test.latnamn.gotoAndPlay(188);
ljud2.start();
};
};
// ----------stoppknapp-----------
stopp.onPress = function() {
// tells what stopbutton will do
ljud.stop();
// turn of sound
musicPosition = 0;
// start music from position 0
};
// ----------pauseknapp-----------
pause.onPress = function() {
// tells what stopbutton will do
musicPosition = ljud.position/1000;
// saves what position when paused
ljud.stop();
// stop sound
};
// --------------------forward----------------------
forward.onPress = function() {
gotoAndStop(2);
ljud.stop();
_root.test.latnamn.gotoAndStop(249);
};
-------------------------------------------------------------------------------
How can I write to get the next song to play ?!?!?!
PLEASE HELP ME !!
View Replies !
View Related
How To Load Sound?
How do I load sound so that it shows up in my timeline?
I've followed the instructions by importing the mp3 file into my library. Then I dragged it onto my stage while in my audio layer. The name of the sound clip appears in my properties box, but the sound file doesn't appear in my timeline.
Any help would be appreciated. Thanks!
View Replies !
View Related
Load Another SWF With Sound
hi. I have one file that plays a sound, but when I load that SWF from another file (with loadMovie("extra.swf"); - command), the sound isn't playing..
I use
sound1 = new Sound();
sound1.attachSound("synt01");
a.onRelease = function() {sound1.start();}
in that extra.swf
help!
View Replies !
View Related
Sound Load
Hello,
I created a movie instance that whe clicked plays a sound which is loaded from the library with Actionscript. When I create the SWF everything is fine.
The problem is when I load this SWF in my main movie and click the movie instances for the sound. I hear nothing. Please help. thanks!
View Replies !
View Related
Load Sound
Hi,
while loadind a sound (mp3) if someone is using the download accelerator, it starts downloading the sould using the download accelerator ... is there any solution to bypass the download accelerator.... i have changed the extension also but..... .... Anyone there for help!!!!
Thanks
View Replies !
View Related
Load Sound
Hi everyone.
Having a spot of bother with loading a sound and js integration...
I have a flash file with two frames (nothing on them but an image that does notihng - moved image in frame 2 so I can see that something has happened).
Action script in frame 1:
stop();
Action script in frame 2:
stop();
var my_sound:Sound = new Sound();
my_sound.onLoad = function(success:Boolean) {
if (success == true)
{
my_sound.start();
}
};
my_sound.loadSound(audio, false);
my_sound.onSoundComplete=function () { gotoAndStop(1); }
and my javascript to handle this....
function f_playFile(fstring)
{
player=document.getElementById('medplayer');
player.SetVariable("audio",fstring);
player.GotoFrame(2);
}
the flash file is placed in teh page with...
<object type="application/x-shockwave-flash" data="/soundfiles/sample.swf" id="medplayer" width="60" height="60">
<param name="movie" value="/soundfiles/sample.swf" />
</object>
and there a several links all of the form...
<a href="javascript: f_playFile('
View Replies !
View Related
Trying To Load My Sound
Hi Everyone
I feel as dumb as a box-of-hammers but I just can't seem to get my sound file to play. I hope you can help me. I've been to http://www.aspirin99.com/tutorials/sound/ and also to http://kennybellew.com/tutorial/ and they are excellent but there must be something else I'm doing wrong.
Here's my set up:
I have a main Flash website (lets call it jim.fla) and I code everything with ActionScript in the first frame (within a layer called "actions") and in it I do the following:
// MovieClipLoader - Used to Load MainImage.
var MCL:MovieClipLoader = new MovieClipLoader();
// MovieClip - Main Body Image - Size 400 x 360
this.createEmptyMovieClip("MainImage",0);
MainImage._x = 240;
MainImage._y = 85;
I use the above mainly for loading images into the main section of my Flash website. Simple stuff and it works great. Now then, I also use the above to load external swf files which also works great except when the external swf file has a sound file in it.
To load the external swf file the jim.fla code does this:
MCL.loadClip("h t t p://my-url.com/bob.swf",MainImage);
I use the loadClip statement so that I can use the built-in functions to display the load progress and that works great. Also, the new swf file loaded does play nicely but without any sound.
The mp3 sound file is part of bob.swf file. It's linkage identifier is "VowsSong". The source code within for bob.fla (within a layer called "wedding") for the sound logic looks like this.
WeddingSong = new Sound();
WeddingSong.attachSound("VowsSong");
WeddingSong.start();
My guess is that I do not have the object path correctly coded for the ".start()" statement but I'm not sure what to code there. I've tried the following:
_root.WeddingSong.start();
_root.MainImage.WeddingSong.start();
_root.MCL.WeddingSong.start();
None of the above statements work. Does anyone have any ideas? Any help would be greatly appreicated.
Thank You!
JimVision
View Replies !
View Related
Load Sound
Hi
I have a problem in loading some sound file in my flash intro
the intro is a song that keeps on playing and while lyrics of the song appears simultaneously with the song,
the problem is when i play the intro online ,"even though i used a preloader and used the stopAllSounds(); function on the preloader scene/frame ",
the sound loads before the lyrics so it ends up with a very big mess in the synchronization between the lyrics and the song,
does any one have any suggestion?
View Replies !
View Related
Load Different Sound
I'm having trouble in manipulating the sounds in flash..i have created 2 different swf file the first one is that i put 5 diff sounds and the second one is the button that controls the sound on the first swf file. My problem is that i dont know how to load diff sound on the first swf file, do you know any tutorial on this?
View Replies !
View Related
Load Sound
good day members
i am using FLASH MX
i am trying to load sound and i wish someone to help me if this code is right or wrong
i want to load sound by using this code
Sound.loadSound(url,is streaming)
the steps are like this;
in first frame i add this code
PHP Code:
mysound= new Sound();
mysound.Loadsound("thesound.mp3",true);
soundtotal=_root.getBytesTotal();
soundloaded=_root.getBytesLoaded();
percent=Math.round((soundloaded/soundtotal)*100);
bar._xscale=percent;
if(soundloaded== soundtotal){
_root.gotoAndPlay(3);
}
on second frame i add this code
PHP Code:
gotoAndPlay(1)
on the third frame i add stop(); action
and on the stage i add a button and i add this code on it
PHP Code:
on (release){
mysound.start();
}
my problem is when i try to test the loading bar it is not showing the bar during the loading
is there amy solution to solve this problem
hope my question is clear
thanks alot
View Replies !
View Related
Trying To Load My Sound
Hi Everyone
I feel as dumb as a box-of-hammers but I just can't seem to get my sound file to play. I hope you can help me. I've been to http://www.aspirin99.com/tutorials/sound/ and also to http://kennybellew.com/tutorial/ and they are excellent but there must be something else I'm doing wrong.
Here's my set up:
I have a main Flash website (lets call it jim.fla) and I code everything with ActionScript in the first frame (within a layer called "actions") and in it I do the following:
// MovieClipLoader - Used to Load MainImage.
var MCL:MovieClipLoader = new MovieClipLoader();
// MovieClip - Main Body Image - Size 400 x 360
this.createEmptyMovieClip("MainImage",0);
MainImage._x = 240;
MainImage._y = 85;
I use the above mainly for loading images into the main section of my Flash website. Simple stuff and it works great. Now then, I also use the above to load external swf files which also works great except when the external swf file has a sound file in it.
To load the external swf file the jim.fla code does this:
MCL.loadClip("h t t p://my-url.com/bob.swf",MainImage);
I use the loadClip statement so that I can use the built-in functions to display the load progress and that works great. Also, the new swf file loaded does play nicely but without any sound.
The mp3 sound file is part of bob.swf file. It's linkage identifier is "VowsSong". The source code within for bob.fla (within a layer called "wedding") for the sound logic looks like this.
WeddingSong = new Sound();
WeddingSong.attachSound("VowsSong");
WeddingSong.start();
My guess is that I do not have the object path correctly coded for the ".start()" statement but I'm not sure what to code there. I've tried the following:
_root.WeddingSong.start();
_root.MainImage.WeddingSong.start();
_root.MCL.WeddingSong.start();
None of the above statements work. Does anyone have any ideas? Any help would be greatly appreicated.
Thank You!
JimVision
View Replies !
View Related
Load Sound
How would you use the command "mysong.loadSound("your.mp3", true);" without using a button to trigger the event. I would like to put the comand on the main time line.
:o
View Replies !
View Related
Load Sound
i've a mc which has only one frame. i load a mp3(eg,bird sound) which has only a few second externally using below code
mySound = new Sound();
mySound.loadSound("bird.mp3",true);
mysound.start();
now, how can i do, so that the sound will repeat again after sometimes(can be randomly), not pressing any button, just like bird chirping randomly.
And also, how can i load another sound (eg, insect sound) and want it to play only after few second,because i don't want all sounds play at the same time. This sound can also repeating like above case.
notice that all sound must be loaded externally.
Thanks.
View Replies !
View Related
Load Sound
Can anyone help with this bit of code it's causing errors and making flash crash on preview and export.
cheers
Steve
ActionScript Code:
firstSound = new Sound(mc_eq);
firstSound.attachSound("firstSound01");
firstSound.setVolume(0);
firstSound.setVolume(firstSoundVolume);
this.onEnterFrame = function ()
}
if (fadeIn01 == 1)
{
_root.firstSound.setVolume(firstSoundVolume);
firstSoundVolume = firstSoundVolume + 1;
if (firstSoundVolume > 70)
{
fadeIn01 = 0;
}
View Replies !
View Related
Sound In Load Movie
i need a bit of help,
I have a movie which loads in lots of different swf files.
These work fine - perfect in fact.
The problem is that i have done another movie to load in which is the sound control - you can change tracks, stop them etc. I have exported this to test it and it works great. However when i try and import it into the main fla i get no sound. I have checked the exporting preferences and the sound is enabled in it - im completely stumped!
Please help!!
View Replies !
View Related
Load Movie & Sound
Kind of new at this- my swf audio controller works fine
on it's own- but when loaded into a main movie using load movie- the sound won't work? How do I get a loaded movie sound like a audio controller with audio tracks in the swf
within the main movie swf? Has me kind of baffled... hmmmm
View Replies !
View Related
Load Sound Swf Problems
I,ve got a flash folio that loads external flash swf sound loops into my main movie with a preloader attached to each swf.They load onto the same level as ther main soundtrack (level 1) of the main movie. it works at home but not on the internet unless u click on the buttons a few times slowly .please help[http://www.geocities.com/chriswarr2003[/url]
View Replies !
View Related
How To Load Sound Into A Level
I have a flash file and evertime I go to a new page I load a new movie into level 0.
I want sound to continue throught the web site, so I want to load sound into level 1 and have it play continuously.
How do I do this? Or should I say, "can this be done?"
View Replies !
View Related
Load Sound Problem In Mx
hi,,,,,,,
thanks for ur help actually the problem has been solved but new problem is there that when i publish the html file by publish settings in html file sound does'nt play but as a separate swf the sound plays.......i don't know whats the problem something weird............
thanks a lot
View Replies !
View Related
Play Sound On Load? How...
i am using this xml driven mp3 player for my project, but i cannot get it to begin playing the first song after it has been loaded. It will play the audio only when the play button is pushed. Anyone have any ideas?
http://www.flashkit.com/movies/Sound...8416/index.php
View Replies !
View Related
Sound Load Time
I created a button toggle that starts and stops an audio clip. The load time for the sound takes too long. Is there a way I can get the audio to load quickly...streaming? I figured the load time is taking longer because the MP3 clip is embedded. Is there some way to fix this? For example, I have created a page where a user can listen to audio clips and I used M3U files, which downloads immediately and starts playing the actual MP3 file, but that is with HTML and not Flash. Is there something similar I can do within Flash?
Here is the code for the button toggle to play the audio clip in Flash:
bgSound = new Sound(this);
bgSound.attachSound("sound1");
bgSound.start(0, 99);
stopB._visible=false;
stopB.onRelease = function() {
bgSound.start(0, 99);
playB._visible=true;
stopB._visible=false;
};
playB.onRelease = function() {
bgSound.stop();
playB._visible=false;
stopB._visible=true;
};
stop();
Referring URL:
http://www.dwayneepps.com/MHM/index.htm
I appreciate any help! Thanks in advance.
-Dman100-
View Replies !
View Related
Load External Sound
Hello,
I'm trying to load a large external sound file (currently a .swf) to play when a button is in the "OVER" state. I am using the "load Movie" code but it only seems to play when I roll off the button.
Any ideas?
Thanks
View Replies !
View Related
Load Sound From Library
I have created an Slide show with 40 frames and speech.
I'm trying to Load sound from Library and i made an generic button and place it on each frame that if you click should play the speech and if you click again it should stop..
here is the Problem:
can someone help please..
Code:
on (release) {
//Play Internal Sound Behavior
_root.Sound.PAGE3.attachSound("SPEECH3");
if (true) {
_root.Sound.PAGE3.start(0,1);
} else {
//Stop Sound Behavior
_root.Sound.PAGE3.stop("SPEECH3");
//End Behavior
}
}
Thanks guys
View Replies !
View Related
Help With Load.sound - Mp3 File
Hey everyone,
So I have assigned a play button a load.sound - Im able to load the sound and stop it when the stop button is pushed. Is there a way I can loop the sound using a streaming mp3?
Quote:
mySound = new Sound();
_root.play_button2.onRelease = function() {
mySound.loadSound("pearl_jam.mp3",true);
gotoAndPlay(2);
}
The flash movie can be viewed here:
http://www.musikube.com/banner/banner.html
any help would be much appreciated!!!
Jake
View Replies !
View Related
Load Sound Progressively
Hi,
I have this Flash web template with 5 pages, and there is a sound loop in it. How can I load the sound loop in the background, while being able to navigate the 5 pages? A good tutorial maybe? Or some source file to start from?
Thanks.
View Replies !
View Related
Sound Load Question
I have a sound identified as "mysound"
The script:
s = new Sound( );
s.attachSound("mysound");
s.setVolume(100);
s.start( 0 , 50000 );
this is located on the first frame of a movie which is on the 25 frame of the main timeline.
Unless I use "load of first frame' it will not load. I need it to work with my preloader which is on frames 1, 2
I tried using a loadSound ("mysound") , on frame 3 but to no avail. It still does not play.
any ideas ?
View Replies !
View Related
[F8] Load External Swf With Sound
I have a site im making, and created the site sounds/music in a seperate swf.
I wanted to know how do I load this into my site in the first frame, and then have it play looped without restarting should someone go back to the first frame? (you know so the sound doesnt play again over whats playing already)
View Replies !
View Related
DYnamicaly Load Sound
So here is my actionscript. When the movie begins to play it should load this sound to and begin playing it. Yet it does not. This was done in Flash 8 with actionscript 1.0
_root.soun = new Sound();
_root.soun.loadSound("flash/bkgsound.wav", true);
_root.soun.start(0, 300);
i = 100;
Im not sure what I am missing. Hopefully one of you guys can fill in the blanks.
View Replies !
View Related
Sound Load Progress
I'm having issues getting the progress of an externally loading mp3.
I can load it, but what code should I be using to get the amount loaded, and amount total of the file?
Here's my current code, and I want to keep this as simple as I can....
ActionScript Code:
track = new Sound();
track.loadSound("music/track1.mp3", true);
percent = (track.getBytesLoaded() / track.getBytesTotal()) * 100;
setProperty(loadBar, _xscale, percent);
track.onLoad = function() {
_root.info = "Song has loaded";
};
track.onSoundComplete = function() {
_root.info = "Song complete";
};
Like I said, the song loads and will play, but I can't get the bar to show the load progress.
Also, I want to get just a text field that displays the elapsed and total time of the song.
Any help would be great!
Sean
View Replies !
View Related
How Do I Load A Sound Into Flash Via XML?
Hey everyone!
I have posted this topic on 24-7media.de forums, kirupa and othes and NO one has been able to answer me. Is this THAT hard to do? I have seen it done a million times!
So hopefully some of the gurus here can help:
Hey everyone
Ok so i have a XML that looks like:
Code:
<Music>
<song>http://thisthesong.mp3</song>
</Music>
I have tried calling the xml and streaming the value of this xml file but i cant make it work
I REALLY NEED TO FIGURE THIS OUT!!!
Can anyone help me?
View Replies !
View Related
Start On Sound On Load
I have this script that loads a audio file but only starts it after hitting the play button. What do I need to add to this script in order for this to start when the movie loads?
ActionScript Code:
//----CODED BY CRAIG CAMPBELL AT SCHOOL OF FLASH--------//
//-------- [url]http://www.schoolofflash.com----------//[/url]
var music:Sound = new Sound(new URLRequest("walk.mp3"));
var sc:SoundChannel;
var isPlaying:Boolean = false;
var pos:Number = 0;
var soundVolume:Number = 1;
var muted:Boolean = false;
mute_mc.buttonMode = true;
volume_mc.slider_mc.buttonMode = true;
pause_btn.addEventListener(MouseEvent.CLICK, pauseMusic);
function pauseMusic(e:Event):void
{
if (isPlaying)
{
pos = sc.position;
sc.stop();
isPlaying = false;
}
}
stop_btn.addEventListener(MouseEvent.CLICK, stopMusic);
function stopMusic(e:Event):void
{
if(sc != null)
{
sc.stop();
pos = 0;
isPlaying = false;
}
}
play_btn.addEventListener(MouseEvent.CLICK, playMusic);
function playMusic(e:Event):void
{
if (!isPlaying)
{
sc = music.play(pos);
isPlaying = true;
}
}
//---VOLUME SLIDER---//
var dragging:Boolean = false;
var rectangle:Rectangle = new Rectangle(0,0,100,0);
volume_mc.slider_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragIt);
stage.addEventListener(MouseEvent.MOUSE_UP, dropIt);
function dragIt(e:Event):void
{
volume_mc.slider_mc.startDrag(false,rectangle);
dragging = true;
volume_mc.slider_mc.addEventListener(Event.ENTER_FRAME, adjustVolume);
}
function dropIt(e:Event):void
{
if (dragging)
{
volume_mc.slider_mc.stopDrag();
volume_mc.slider_mc.removeEventListener(Event.ENTER_FRAME, adjustVolume);
dragging = false;
}
}
function adjustVolume(e:Event):void
{
mute_mc.gotoAndPlay("On");
soundVolume = volume_mc.slider_mc.x / 100;
var st:SoundTransform = new SoundTransform(soundVolume);
if (sc != null)
{
sc.soundTransform = st;
muted = false;
}
}
mute_mc.addEventListener(MouseEvent.CLICK, mute);
function mute(e:MouseEvent):void
{
if (sc != null)
{
var st:SoundTransform;
if (muted)
{
st = new SoundTransform(soundVolume);
sc.soundTransform = st;
mute_mc.gotoAndStop("On");
muted = false;
}
else
{
st = new SoundTransform(0);
sc.soundTransform = st;
mute_mc.gotoAndStop("Mute");
muted = true;
}
}
}
View Replies !
View Related
Load Sound Problem
hi all
I had written a flash mini mp3 player. It load mp3 files from other website. it it can works in flashplayer9 but flash player 10.
you can check the page here:http://www.laaan.cn/?p=351
View Replies !
View Related
|