A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [CS3] sound mute on and off tuts?

  1. #1
    Member
    Join Date
    Sep 2005
    Posts
    78

    [CS3] sound mute on and off tuts?

    how would i code a MC to turn the sound on and off. just want to stream a simple mp3 in. no payer controls. just mute button on and off.

    is there any tuts someone canpoint me to ?

    any one know?

    thanks in advance if u do.

  2. #2
    Member
    Join Date
    Jun 2008
    Location
    Ludhiana,Punjab
    Posts
    90
    PHP Code:
    var snd:Sound = new Sound(new URLRequest("bigSound.mp3"));
    var 
    channel:SoundChannel snd.play(); 

    While the sound plays, the SoundChannel.position property indicates the point in the sound file that is currently being played. Your application can store the position value before stopping the sound from playing, as follows:

    PHP Code:
    var pausePosition:int channel.position;
    channel.stop(); 
    To resume playing the sound, pass the previously stored position value to restart the sound from the same point it stopped at before.

    PHP Code:
    channel snd.play(pausePosition); 

    please try this and revert the reply...
    MannPohir
    <span style="font-family: Verdana">m...ail.com</span>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center