Available for download at http://qualitylessons.net/downloads
Flash Tutorial: Play Pause Toggle Button with actionscript 3; cs5 / cs5.5
Playing sounds using ActionScript 3.0 is not as simple as we hoped it to be as it requires using more than one class to perform even the simplest of tasks relating to sound such as pausing or changing the sound volume. This tutorial will teach you all the basics you need to learn how to start playing local sound.
Sounds in ActionScript 3.0 are manipulated through the collaborative work of several classes together. This is a much more complex structure than previous versions of ActionScript, but it is argued that this format will provide you with greater control and the ability to micro manage sounds. Here are the relevant classes related to sounds: Sound Class - This is the main class in which a sound will actually reside. This class is the starting point of any sound related program and is used to start playing a sound. SoundChannel Class - A sound can be played through a sound channel which provides additional controls over a sound object, the most basic of these additional controls is the ability to stop the playback of a sound.
Stopping A Sound
In addition the ability to play a sound, you will obviously also want to know how to stop your sound after you play it. The Sound Class does not have a method for stopping a sound. The SoundChannel Class must be used to perform that task. A SoundChannel is a class that is used to hold a raw sound object and then manipulate it using the methods and properties of the SoundChannel Class. The methods and properties you should be aware of are: .stop() - this method stops the sound playing through the channel. .position - this property is used to retrieve the current playback position of the sound playing through the channel.
Mohit Manuja
http://adobecs5.in
http://FlashLessons.Info
mohitsmail@yahoo.com
+91-9022995952
Trainer for Adobe Products Dreamweaver and Flash ( cs 5 / cs 5.5 ), round the Globe
Awesome tutorial. Thank you very much, I have been looking for a long time to find a good AS3 tutorial. Are you going to upload anymore Flash tuts?
paranoi4en 2 weeks ago
@paranoi4en of course i don't think im gonna stop in the near future , out of my 160 odd tuts 100 plus must be on as 3 , most of them on the sound class ...btw thanks
zorro30mum 2 weeks ago
error..
yoramzeeman 5 months ago in playlist Fash Website
@yoramzeeman all my files get tested 10 times and i work on them for hours before i post them..its very easy to pass in your verdict in seconds..comment negated and neglected !
zorro30mum 5 months ago 2
Hi can you pls send me that script to my email on youtube? i need it today if you could send it :-) plsss thx you so much.
And you should also post to another people in the description it will be fine for you :-)
janya171 6 months ago
@janya171 i tried to send u a msg but its says u have enabled friend lock ..
how else can i send u an email ? ..all i know is how to send a msg thru yr channel.
i dont like to post the code here , ppl will avoid watching and understanding the tutorial
zorro30mum 6 months ago