Flash Tutorial: Play Pause Toggle Button with actionscript 3; cs5 / cs5.5

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ต.ค. 2024
  • Available for download at qualitylessons....
    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
    qualitylessons.net
    mohitsmail@yahoo.com
    +91-9022995952
    Trainer for Adobe Products Dreamweaver and Flash ( cs 5 / cs 5.5 ), round the Globe

ความคิดเห็น • 39

  • @miguelsantillan5791
    @miguelsantillan5791 11 ปีที่แล้ว

    You´re a master... this is the best control of sound than I´ve find, and function perfectly in only 2 layers. Greetings from Lima - Perú.

  • @carolynjanette
    @carolynjanette 12 ปีที่แล้ว

    I wanted to play the audio sounds I created in class. My plan was to create a frame for each sound then have a play and stop button before going to the next sound file, which I have buttons for. But only one file would ever play the others wouldn't. I have had several sleepless nights. You have helped with one issue I was testing it on the current flash player version 11 something and at class it is around version 10!

  • @freeflyingdragongip
    @freeflyingdragongip 12 ปีที่แล้ว

    Very useful and excellent instruction. Thank you so much, you save the day!

  • @TMohan786
    @TMohan786 11 ปีที่แล้ว

    hi, you are a very good teacher.I have observed your many videos.Your pronunciation is very clear and slow. You teach very nicely and slowly. Your video is full of neat ,detailed explanation of every action. Very good work. Hope to have many such videos. keep it up.

  • @harrywright7521
    @harrywright7521 10 ปีที่แล้ว

    thank god someone who makes sense

  • @carolynjanette
    @carolynjanette 12 ปีที่แล้ว

    Oh I feel like a right dummy!! It works perfectly in version 9! maybe this why I was having issues with my own project! I am creating a flash website for a portfolio of my work.

  • @hourihamma5798
    @hourihamma5798 11 ปีที่แล้ว

    You are a very good professor!!!!
    Can you tell me how I can put a nextbutton and previousbutton to next scene ans stop sound in the previous scene like a book.
    I have an animation witha button to next scene , but the sound continue in the next scene. How can I stop it?
    Thank you for all your courses

  • @MohitManuja
    @MohitManuja  12 ปีที่แล้ว

    @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

  • @ICanCYourHalo
    @ICanCYourHalo 12 ปีที่แล้ว

    thank you so much. It took me lots of time finding sth that actually works. The only thing wich didn't work was downloading the file from your homepage with the safari browser( it worked with firefox)

  • @APRILMAY80
    @APRILMAY80 9 ปีที่แล้ว +4

    can you type down the script on here? so i can copy and paste it over?
    it's saying error
    var isPlaying:Boolean = true;

  • @MohitManuja
    @MohitManuja  12 ปีที่แล้ว

    its not about versions ...there must have been some typo.. also make sure you drop the flash player version to 9 before u test it..not 11.3 ot 11.5 , chk for any duplicate names ..tell me how it went

  • @nwaartdady9093
    @nwaartdady9093 11 ปีที่แล้ว +1

    thank you so much but I have one question if I want the sound play when I click on play button not when start directly ???
    anybody can help me
    thank you so much

  • @MohitManuja
    @MohitManuja  13 ปีที่แล้ว

    @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

  • @janya171
    @janya171 13 ปีที่แล้ว +1

    I did the same as you and i copy and paste all you sent me but no function :(
    error: Symbol 'Symbol 1', Layer 'Layer 1', Frame 1, Line 21 1120: Access of undefined property btn.
    Symbol 'Symbol 1', Layer 'Layer 1', Frame 1, Line 41 1120: Access of undefined property btn.
    Symbol 'Symbol 1', Layer 'Layer 1', Frame 1, Line 50 1120: Access of undefined property btn.
    Symbol 'Symbol 1', Layer 'Layer 1', Frame 1, Line 61 1120: Access of undefined property btn.

  • @comasutra69
    @comasutra69 11 ปีที่แล้ว

    Hey,
    I need this but with Pause as initial position. I would appreciate your help!
    Thank you

  • @threeinone313131
    @threeinone313131 11 ปีที่แล้ว

    please can you tell me how can i make electronic magazine by using action script at flash cs5 thanks

  • @MattDiMichele
    @MattDiMichele 9 ปีที่แล้ว

    I had the same question, I am looking to put the play button in front also.

  • @nikibray
    @nikibray 11 ปีที่แล้ว

    I had to change the flash player to 9 - it was set on 11.5. However, it plays when I click the button. When I click the button again, the button changes to the play icon but the music continues to play as opposed to pausing. ??? The music does not stop. What could I be doing wrong?

  • @arakwar
    @arakwar 13 ปีที่แล้ว

    I wanted to make an infinite loop with my sound, so I just make it play again in the SOUND_COMPLETE event, and register the SOUND_COMPLETE event again. Not sure if this is a good way thought... any advice anyonw ? ^^

  • @adeaprilia7300
    @adeaprilia7300 11 ปีที่แล้ว

    many videos i've seen.... no one worked for my flash actionscript 3 T.T i hope this one will working out... Sir, could you make a video that show how to make a play pause stop button and volume controller at once, please? :(

  • @luanabee9723
    @luanabee9723 11 ปีที่แล้ว

    Please, how can you change the action script so it has Pause as the first position, as I need to be able to start the music when I want, and not for it to start automatically when I open the web page.
    Some help would be appreciated as I need this for a web project, and I am not a coder.

  • @carolynjanette
    @carolynjanette 12 ปีที่แล้ว

    I got this error in Flash version CS6.
    Scene 1, Layer 'as3', Frame 1, Line 5 1152: A conflict exists with inherited definition flash.display:MovieClip.isPlaying in namespace public.
    However a good tutorial.

  • @MohitManuja
    @MohitManuja  13 ปีที่แล้ว

    @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 !

  • @fridadayan4530
    @fridadayan4530 11 ปีที่แล้ว

    if i want it to play in loop what i need to do?

  • @oliverleal5820
    @oliverleal5820 8 ปีที่แล้ว

    mr. mohit please give me your code for this actionscript i really need this. I copy and do all the steps on how to do this but i end up not playing the sound on my flash presentation why ?

    • @MohitManuja
      @MohitManuja  8 ปีที่แล้ว

      +Oliver Leal see if it can be downloaded from my website, if not pls share email ill send across when free.

    • @oliverleal5820
      @oliverleal5820 8 ปีที่แล้ว

      Mr. Mohit your code is already working thank you so much :)

  • @MohitManuja
    @MohitManuja  11 ปีที่แล้ว

    Answer to all your question in the much Improved tutorial which is also the Video response to this Tutorial

  • @MohitManuja
    @MohitManuja  12 ปีที่แล้ว

    sorry replace "videoevent" with event" "soundevent" with "event" too

  • @MohitManuja
    @MohitManuja  12 ปีที่แล้ว

    the link to d/l this project is in the description

  • @derisseptian3857
    @derisseptian3857 4 ปีที่แล้ว

    please, minta skrip ?

  • @janya171
    @janya171 13 ปีที่แล้ว

    Symbol 'Symbol 1', Layer 'Layer 1', Frame 1, Line 21 1120: Access of undefined property btn.
    Symbol 'Symbol 1', Layer 'Layer 1', Frame 1, Line 41 1120: Access of undefined property btn.
    Symbol 'Symbol 1', Layer 'Layer 1', Frame 1, Line 50 1120: Access of undefined property btn.
    Symbol 'Symbol 1', Layer 'Layer 1', Frame 1, Line 61 1120: Access of undefined property btn.
    Symbol 'Symbol 1', Layer 'Layer 1', Frame 1, Line 33 1120: Access of undefined property btn.

  • @yoramzeeman
    @yoramzeeman 13 ปีที่แล้ว

    error..

  • @InTenZeGamingHD
    @InTenZeGamingHD 11 ปีที่แล้ว

    pm me and i will send you my script.

  • @jejeng100
    @jejeng100 4 ปีที่แล้ว

    link die

  • @MohitManuja
    @MohitManuja  12 ปีที่แล้ว

    no dnt flw u( don't follow you)