Stop all sounds or unload SWFs in Spry Tabbed Pages

Hello
I am using the Dreamweaver Spry Tabbed pages for a project.
On several of the tabbed pages I have flash content running in iFrames.
If the user does not stop the movie before clicking on another tab the sound will continue and the movie will keep running in the background.
How do I script the tabbed panel code to unload the swf content before going to another tab? And to reload the content when returning to pages with swf content again?
Thank you on beforehand.
ggaarde

Hi Sudarshan
Please go to:
http://gggraphic.com/t-mobile/tab_flash_test/
Tab 1 shows a flv by embedding the code right in the HTML
Tab 2 just shows text: Content 2
Tab 3 shows a flv imported from another HTML page in a iFrame
None of the movies are set to autoplay - you have to click the arrow to start them.
This is what I found:
On the Mac:
In Safari, Chrome and Firefox:
When playing the movie in Tab 1 (embedded flash object) > start the movie > then click tab 2 = the movie readily stops as desired, and loads the text on tab 2.
When playing the movie in Tab 3 (iFrame version)  > start the movie > then click tab 2 = the movie keeps playing, and the sound will continue.
On the PC:
In IE 8 (which is my main audience) It makes no difference if the flash content is embedded or iFramed in = when clicking tab 2 the movies continues playback no matter which one (tab 1 or tab 3) is playing.
Chrome: (takes longer to load) Same as on the Mac = the embedded verion provides the desired function.
Firefox: (takes longer to load) Surprise!  It does not matter is the Flash is embedded or iFramed in = When tab 2 is clicked the playback of either of the Flash versions stop.
What I would like:
Ideally I would love a fix for IE 8 that would allow stop playback of the iFrame version, since it offers many advantages over the embedded version.
Can you help me?
Thanks on beforehand.
ggaarde
The automatically generated standard Spry Assets are unchanged from your default.
This is my code for the tabbed system:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script src="../../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<script src="../../Scripts/swfobject_modified.js" type="text/javascript"></script>
<link href="../../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="TabbedPanels1" class="TabbedPanels">
  <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab" tabindex="0">Tab 1</li>
    <li class="TabbedPanelsTab" tabindex="0">Tab 2</li>
    <li class="TabbedPanelsTab" tabindex="0">Tab 3</li>
</ul>
  <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent">Flash Content - flash object embedded in code<br>
      <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="640" height="360">
        <param name="movie" value="TreeRemoval.swf" />
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="6.0.65.0" />
        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
        <param name="expressinstall" value="../../Scripts/expressInstall.swf" />
        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="TreeRemoval.swf" width="640" height="360">
          <!--<![endif]-->
          <param name="quality" value="high" />
          <param name="wmode" value="opaque" />
          <param name="swfversion" value="6.0.65.0" />
          <param name="expressinstall" value="../../Scripts/expressInstall.swf" />
          <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
          <div>
            <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
          </div>
          <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>
    </div>
    <div class="TabbedPanelsContent">Content 2</div>
    <div class="TabbedPanelsContent">Content 3 - Flash content in iFrame <br>
    <iframe src="http://gggraphic.com/t-mobile/tab_flash_test/iFrame_source.html    " style="border:0px #FFFFFF none;" name="myiFrame" scrolling="no" frameborder="0" marginheight="0px" marginwidth="0px" height="360px" width="640px"></iframe>
    </div>
</div>
</div>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
swfobject.registerObject("FlashID");
</script>
</body>
</html>

Similar Messages

  • Stop all sounds

    Hi everybody,
    i load external swf to the main movie. They all have sound. Have no problem to stop sound of the main movie (by the behaviors), but it doesn’t stop the sound of the external one. What AC should be used to stop all sound, external and internal?
    Thanks
    S

    believe it or not, you nearly hit it right on the head!  lol   under AS2 the line is:  stopAllSounds();

  • Global volume control for all sounds in a swf

    Does anyone know of a way to adjust the volume of all the sounds in a swf?  I'm looking to build a volume controller that changes the audio level of the swf.
    Thanks!

    I used:
    SoundMixer.soundTransform = new SoundTransform(0);
    and that mutes all sounds in my swf.

  • LOVE LOVE LOVE my iPhone so far, but ringer switch doesn't stop all sounds?

    With exception of a few concerns like somewhat low speakerphone and earpiece volume, no non-pinch zooming in maps, not being able to expand email contacts (to see the actual address), not having any auto-fill in Safari, and some stability issues (a couple Safari crashes on complex sites - to be expected until they collect enough bug data and make a patch)... I love my iPhone! After updating my OS & iTunes, activation took only a few minutes (early evening of the 29th) since I was an existing account holder. I did have a corporate discount on my plan and was worried I would be denied, but it went through just fine - fwew!
    So then, I'm in a movie theatre today during a dramatic, quiet passage, with the ringer switch off (I'm so polite! <bg>), and low and behold, here comes a clever marimba roll. Having not heard this other than in the ringer setup area, I wasn't sure what it was (still not). Hitting the sleep button on top didn't do anything... it bleeped 3 times, almost sending me out of the theatre in embarrassment. I don't have to go into the settings and turn off all the notices do I? The ringer off is supposed to stop ALL sounds, per Apple's site. Anyone experience this or have a solution?
    PM G5-Quad 2.5GHz | eMac G4 1.25GHz | PM G4 800MHz | PB G4 1GHz 17 | PM G4 400MH   Mac OS X (10.4.5)  

    Per the manual, the switch doesn't stop the alarm clock from going off. Which is set to marimba by default.

  • How to stop all sounds in root

    Sorry I am a newvby to Actionscript.  I found the following script for a button which let me  stop all mc inside the root but I need to stop all sounds in the root as well.
    Any help is appreciated.
    Thanks
    on (press) {
    getAllMc(_level0);
    function getAllMc(mc) {
        for (var i in mc) {
            if (typeof mc[i] == "movieclip") {
    mc[i].stop();
                    getAllMc(mc[i]);

    You can use the stopAllSounds() function

  • How can I remove a child swf and stop all sounds when parent closes?

    Hi All,
    I am new to actionscript 3 and trying to learn as I go. The problem I am having is the following:
    I have a carousel of images that load an external swf movie with a FLVPlayback component on it. The problem is that when the external swf unloads the sound of the FLVPlayback component continues to play. I am using a carousel component I found online to load the images and each image loads an external swf file. here is the code for it.
    import com.carousel.DegreeCarousel;
    import com.carousel.data.CarouselDO;
    import com.carousel.data.AngleDO;
    import com.carousel.data.ItemDO;
    // DEFINING THE CAROUSEL OBJECT
    var carouselSettings:CarouselDO = new CarouselDO();
    carouselSettings.radiusX = 300;
    carouselSettings.radiusY = 0;
    carouselSettings.fov = 50;
    carouselSettings.transitionTime = 1;
    carouselSettings.ease = "easeInOutQuint";
    carouselSettings.useToolTip = 0;
    carouselSettings.useBlur = 1;
    carouselSettings.maxBlur = 8;
    carouselSettings.reflectionAlpha = 0.2;
    // DEFINING ANGLES SETTINGS
    var angleSettings_arr:Array = new Array();
    angleSettings_arr[0] = new AngleDO({angle:0,alpha:1,scale:0.5});
    angleSettings_arr[1] = new AngleDO({angle:90,alpha:1,scale:1});
    angleSettings_arr[2] = new AngleDO({angle:180,alpha:1,scale:0.5});
    // DEFINING THE ITEMS
    var prefix = "content/thumbs/"
    var galleryItems:Array = new Array();
    galleryItems[0] = new ItemDO({thumb:prefix + "image_1.jpg", content:prefix + "swf1.swf", contentType: "flash"});
    galleryItems[1] = new ItemDO({thumb:prefix + "image_2.jpg", content:prefix + "swf1.swf", contentType: "flash"});
    galleryItems[2] = new ItemDO({thumb:prefix + "image_3.jpg", content:prefix + "swf1.swf", contentType: "flash"});
    // PLACING THE CAROUSEL TO STAGE
    var carousel:DegreeCarousel = new DegreeCarousel(carouselSettings,angleSettings_arr,galleryItems);
    carousel.x = stage.stageWidth * .5;
    carousel.y = stage.stageHeight * .5;
    this.addChild(carousel);   
    // KEYBOARD NAVIGATION
    // KEYBOARD EVENTS
    stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);   
    function keyDownHandler(e:KeyboardEvent):void
        // left
        if(e.keyCode == 37)
            carousel.left(1);
        // right
        if(e.keyCode == 39)
            carousel.right(1);
        // top
        if(e.keyCode == 38)
            carousel.prevCycle();
        // Down
        if(e.keyCode == 40)
            carousel.nextCycle();
        // Space
        if(e.keyCode == 32)
    The external movie loads fine. Then the external swf calls for a second swf containing a video. This is the code that is used to load the swf:
    import flash.net.URLRequest;
    import flash.display.Loader;
    import flash.events.Event;
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    var myVideo:URLRequest = new URLRequest("myvideo.swf");
    var video:Loader = new Loader();
    video.load(myVideo);
    this.addChild(video);
    When the carousel unloads, it unloads both movies but the sound keeps on playing.
    Is there any way to stop the sound from keep playing?
    Thank you very much!!
    -M

    You want to stop the audio from playing and also downloading more video/audio if it is still downloading when you go to a new keyframe where the video display/component or mp3 player is removed from the stage because it's keyframe ended or do not exist anymore but you still hear the audio.
    Add an event listener to your video playback component that calls a function when the flash player tries to remove the video plaer from the stage that stops the netstream or at least stops/pauses the video playback.
    [link removed]
    //sample NetConnection and NetStream classes when the video player is removed from the stage tell the NetStream to stop playing or downloading the content with .close();
    var connection:NetConnection = new NetConnection();
    connection.connect(null);
    var stream:NetStream = new NetStream(connection);
    addEventListener(Event.REMOVED_FROM_STAGE, videoRemovedFromStage);
    function videoRemovedFromStage(e:Event){
       stream.close();

  • How can I stop timeline sounds in external swf files from playing during loading?

    I am having a problem with timeline sounds in external swf files playing during loading in a main swf. Can anyone help me?
    Here is some of the code from the main swf. I hope I have included enough.
    Thanks.
    import flash.events.MouseEvent;
    import flash.display.MovieClip;
    import flash.display.Loader;
    import flash.events.ProgressEvent;
    import flash.events.Event;
    import flash.net.URLRequest;
    import fl.events.SliderEvent;
    import flash.media.SoundTransform;
    preloader_mc.fill_mc.scaleX = 0;
    var swfA:Array = ["part1.swf","part2.swf"];
    var frameA:Array = [];
    var currentLoader:Loader;
    var swfTotalFrames:int;
    var tl:MovieClip = this;
    var st:SoundTransform = new SoundTransform()
    var index:int = 0;
    loadNextF();
    play_slider.enabled = false;
    function loadNextF():void{
                    tl["loader_"+index] = new Loader();
                    tl["loader_"+index].name = index.toString();
                    tl["loader_"+index].contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,progressF);
                    tl["loader_"+index].contentLoaderInfo.addEventListener(Event.COMPLETE,completeF);
                    tl["loader_"+index].load(new URLRequest(swfA[index]));
    function progressF(e:ProgressEvent):void{
                    var fractionLoaded:Number = index/swfA.length+e.bytesLoaded/(e.bytesTotal*swfA.length);
                    preloader_mc.fill_mc.scaleX = fractionLoaded;
                    preloader_mc.tf.text = (100*fractionLoaded)+"% Loaded";
    function completeF(e:Event):void{
                    tl["loader_"+index].contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,progress F);
                    tl["loader_"+index].contentLoaderInfo.removeEventListener(Event.COMPLETE,completeF);
                    SoundMixer.stopAll();
                    var mc:MovieClip = MovieClip(tl["loader_"+index].content);
                    mc.gotoAndStop(1);
                    frameA.push(mc.totalFrames);
                    index++;
                    if(index<swfA.length){
                                    loadNextF();
                    } else {
                                    // all loads complete.  start play.
                                    restart_mc.buttonMode = true;
                                    restart_mc.alpha = 1;
                                    tl.addEventListener(Event.ENTER_FRAME,playUpdateF);
                                    tl.removeChild(preloader_mc);
                                    preloader_mc = null;
                                    play_slider.enabled = true;
                                    playpause_mc.alpha = 1;
                                    currentLoader = tl["loader_0"];
                                    tl.addChild(currentLoader);
                                    MovieClip(currentLoader.content).play();
                                    sliderParamsF();

    import flash.events.MouseEvent;
    import flash.display.MovieClip;
    import flash.display.Loader;
    import flash.events.ProgressEvent;
    import flash.events.Event;
    import flash.net.URLRequest;
    import fl.events.SliderEvent;
    import flash.media.SoundTransform;
    preloader_mc.fill_mc.scaleX = 0;
    var swfA:Array = ["part1.swf","part2.swf"];
    var frameA:Array = [];
    var currentLoader:Loader;
    var swfTotalFrames:int;
    var tl:MovieClip = this;
    var st:SoundTransform = new SoundTransform()
    var index:int = 0;
    loadNextF();
    play_slider.enabled = false;
    function loadNextF():void{
        tl["loader_"+index] = new Loader();
        tl["loader_"+index].name = index.toString();
        tl["loader_"+index].contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,progressF);
        tl["loader_"+index].contentLoaderInfo.addEventListener(Event.COMPLETE,completeF);
        tl["loader_"+index].load(new URLRequest(swfA[index]));
    function progressF(e:ProgressEvent):void{
        var fractionLoaded:Number = index/swfA.length+e.bytesLoaded/(e.bytesTotal*swfA.length);
        preloader_mc.fill_mc.scaleX = fractionLoaded;
        preloader_mc.tf.text = (100*fractionLoaded)+"% Loaded";
    function completeF(e:Event):void{
        tl["loader_"+index].contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,progress F);
        tl["loader_"+index].contentLoaderInfo.removeEventListener(Event.COMPLETE,completeF);
        SoundMixer.stopAll();
        var mc:MovieClip = MovieClip(tl["loader_"+index].content);
        mc.gotoAndStop(1);
        frameA.push(mc.totalFrames);
        index++;
        if(index<swfA.length){
            loadNextF();
        } else {
            // all loads complete.  start play.
            restart_mc.buttonMode = true;
            restart_mc.alpha = 1;
            tl.addEventListener(Event.ENTER_FRAME,playUpdateF);
            tl.removeChild(preloader_mc);
            preloader_mc = null;
            play_slider.enabled = true;
            playpause_mc.alpha = 1;
            currentLoader = tl["loader_0"];
            tl.addChild(currentLoader);
            MovieClip(currentLoader.content).play();
            sliderParamsF();
    ///////////////// start sliders /////////////////////////////////
    sound_slider.addEventListener(SliderEvent.CHANGE,soundSliderF);
    function soundSliderF(e:SliderEvent):void{
        st.volume = e.value/100;
        tl.soundTransform = st;
    play_slider.addEventListener(SliderEvent.CHANGE,playSliderF);
    play_slider.addEventListener(MouseEvent.MOUSE_DOWN,playSliderDownF);
    //play_slider.addEventListener(MouseEvent.MOUSE_UP,playSliderUpF);
    function playSliderDownF(e:MouseEvent):void{
        tl.removeEventListener(Event.ENTER_FRAME,playUpdateF);
        stage.addEventListener(MouseEvent.MOUSE_UP,playSliderUpF);
    function playSliderUpF(e:MouseEvent):void{
        tl.addEventListener(Event.ENTER_FRAME,playUpdateF);
    function playSliderF(e:SliderEvent):void{
        SoundMixer.stopAll();
        var frameNum:int = Math.ceil(swfTotalFrames*e.value/100);
        var partialTotalFrames:int = 0;
        for(var i:int=0;i<frameA.length;i++){
            partialTotalFrames += frameA[i];
            if(partialTotalFrames>=frameNum){
                break;
        partialTotalFrames -= frameA[i];
        //trace(i,frameNum,frameNum-partialTotalFrames);
        if(currentLoader!=tl["loader_"+(i)]){
            tl.removeChild(currentLoader);
            MovieClip(currentLoader.content).stop();
            currentLoader = tl["loader_"+(i)];
            tl.addChild(currentLoader);
        if(playpause_mc.currentFrame==1){
            MovieClip(currentLoader.content).gotoAndPlay(frameNum-partialTotalFrames);
        } else {
            MovieClip(currentLoader.content).gotoAndStop(frameNum-partialTotalFrames);
    function sliderUpdateF(e:Event):void{
        var playedFrames:int = 0;
        for(var i:int=0;i<Number(currentLoader.name);i++){
            playedFrames += frameA[i];
        playedFrames += MovieClip(currentLoader.content).currentFrame;
        play_slider.value = Math.round(100*playedFrames/swfTotalFrames);
    function sliderParamsF():void{
        swfTotalFrames = 0;
        for(var i:int=0;i<swfA.length;i++){
            swfTotalFrames += MovieClip(tl["loader_"+i].content).totalFrames;
    ///////////////// end  sliders //////////////////////////////////
    ///////////////// start playpause restart ///////////////////////
    playpause_mc.addEventListener(MouseEvent.CLICK,playpauseF);
    playpause_mc.alpha = .2;
    restart_mc.addEventListener(MouseEvent.CLICK,restartF);
    restart_mc.buttonMode = false;
    restart_mc.alpha = .2;
    function playpauseF(e:MouseEvent):void{
        if(!e.currentTarget.toggle){
            MovieClip(currentLoader.content).stop();
            tl.removeEventListener(Event.ENTER_FRAME,playUpdateF);
            e.currentTarget.gotoAndStop(2);
        } else {
            MovieClip(currentLoader.content).play();
            tl.addEventListener(Event.ENTER_FRAME,playUpdateF);
            e.currentTarget.gotoAndStop(1);
        e.currentTarget.toggle = !e.currentTarget.toggle;
    ///////////////// end playpause //////////////////////////////
    function playUpdateF(e:Event):void{
        sliderUpdateF(e);
        var playingFrame:int = MovieClip(currentLoader.content).currentFrame;
        if(playingFrame==frameA[Number(currentLoader.name)]){
            // next loader
            MovieClip(currentLoader.content).stop();
            SoundMixer.stopAll();
            MovieClip(currentLoader.content).mute();
            var nextIndex:int = Number(currentLoader.name)+1;
            if(nextIndex<swfA.length){
                tl.removeChild(currentLoader);
                currentLoader = tl["loader_"+nextIndex];
                tl.addChild(currentLoader);
                MovieClip(currentLoader.content).gotoAndPlay(1);
            } else {
                tl.removeEventListener(Event.ENTER_FRAME,playUpdateF);
                playpause_mc.gotoAndStop(2);
                playpause_mc.toggle = !playpause_mc.toggle;
                //playpause_mc.alpha = .2;
                // all swfs have completed play
    function restartF(e:MouseEvent):void{
        MovieClip(currentLoader.content).stop();
        tl.removeChild(currentLoader);
        SoundMixer.stopAll();
        MovieClip(currentLoader.content).mute();
        currentLoader = tl["loader_"+0];
        tl.addChild(currentLoader);
        if(playpause_mc.currentFrame==1){
            MovieClip(currentLoader.content).gotoAndPlay(1);
        } else {
            MovieClip(currentLoader.content).gotoAndStop(1);

  • My iphone 5 stopped all sounds cant get it to ring or any sounds at all

    MY I 5 PHONE STOPPED RINGING ALL SOUNDS ARE GONE , I FLIP THE MUTE SWITCH AND TURN PHONE OFF I TRIED EVERY THING HOW CAN I GET SOUND BACK ?

    Make sure the Side Switch is in the correct "up" position, meaning pushed closer toward the face of the phone (the side with the screen), then try pushing your volume buttons see if the ringer volume changes, if that doesnt work go into your Settings>Sounds and check all of those settings

  • Stop All Sounds and goToAndPlay Label

    Can someone aide me with a simple solution in AS3 to allow a
    movie clip to stop a Sound Object as well as going to a label and
    playing it. I'm a graphic designer trying to get a handle on AS3.
    Any assistance is greatly appreciated.

    fiveflightsup,
    > Thanks for your help.
    Sure thing.
    > Here's what I came up with other a little research
    > ,studying your instructions and pulling out a few
    > hairs. It works but question is it correct :-)
    Before I continue replying, I should point out there are two
    ways to
    visit this forum. One way is to visit the adobe.com website
    with a browser
    and select Support > Forums. My guess is that you're using
    this approach.
    Another way is to use a news client like Thunderbird or
    Outlook Express and
    read Adobe's NNTP feeds. That's the way I'm using. What's the
    difference?
    There are many differences, but the important one is that the
    browser
    version lets you edit your replies, while the news client
    approach does not.
    That said, I have to be open to the possibility that you've
    edited some
    of your posts. Maybe there's something I'm just not seeing.
    Bear that in
    mind if my reply doesn't match up with what you've written.
    You're saying you've studied my suggestions, researched this
    topic, and
    come up with this variation:
    > var soundReq:URLRequest = new
    URLRequest("flashgame_intro_extended.mp3");
    > var sound:Sound = new Sound();
    > var channel:SoundChannel;
    >
    > sound =new Sound ();
    >
    > sound.load(soundReq);
    >
    > sound.addEventListener(Event.COMPLETE, onComplete);
    >
    > function onComplete(event:Event):void
    > {
    > sound.play();
    > }
    While slightly different, this still doesn't make practical
    use of the
    SoundChannel class, so I'll spell it out this time and try to
    explain a bit
    more while I do.
    > var soundReq:URLRequest = new
    URLRequest("flashgame_intro_extended.mp3");
    > var sound:Sound = new Sound();
    > var channel:SoundChannel;
    These lines are fine. In ActionScript, when you need an
    object, you
    instantiate it. The way you communicate with an object,
    often, is to
    declare a variable typed to that kind of object, and then set
    that variable
    to the object in question. That lets you refer to the object
    by way of an
    arbitrary variable name. You're doing exactly that:
    var soundReq:URLRequest = new
    URLRequest("flashgame_intro_extended.mp3");
    In that line, you declare an arbitrarily named variable,
    soundReq, type
    it as a URLRequest object, and then set it to an instance of
    the URLRequest
    class. Once you do that, the variable soundReq gives you a
    convenient "nick
    name" or "handle" you can use to refer to that URLRequest
    instance. In
    fact, you use this reference a few lines later.
    > sound = new Sound();
    >
    > sound.load(soundReq);
    In this pair of lines, you don't need the first line. You
    already
    instantiated the Sound class earlier. No need to do it again.
    The second
    in this pair of lines is useful, though, because you're
    putting that
    previously-instantiated Sound object to work. How? By
    invoking the
    Sound.load() method on your object (aka instance). And this
    is where you're
    making use of that URLRequest instance created earlier.
    > sound.addEventListener(Event.COMPLETE, onComplete);
    Here, you're wiring up your Sound instance -- referred to by
    the
    arbitrary variable name, sound -- so that it performs the
    onComplete()
    function when the Event.COMPLETE event occurs (that is, when
    the requested
    MP3 file fully loads).
    Finally ...
    > function onComplete(event:Event):void
    > {
    > sound.play();
    > }
    ... which is where you need to actually use your SoundChannel
    instance, if
    you plan to eventually stop the MP3 from playing. I did show
    this in a
    previous reply, but I'll repeat it here:
    function onComplete(event:Event):void {
    channel = sound.play();
    The play() method returns a value, which happens to be a
    SoundChannel
    instance. You declared a SoundChannel-typed variable earlier,
    named
    channel, and all you're doing here is setting channel to a
    SoundChannel
    instance. Not just *any* SoundChannel instance, but the one
    associated with
    the playing of this particular sound, which is an MP3 file.
    With me?
    Doing what I just showed lets you stop the music later by
    invoking the
    SoundChannel.stop() method on your channel instance.
    e.g.
    // in later code ...
    channel.stop();
    Before you move forward, you should make sure you understand
    100% what's
    going on here. There shouldn't be any pulling of hair -- at
    least not until
    you dig into something new. ;) In order to be able to stop
    sound in the
    way I've been describing, you have to associate that sound
    with a sound
    channel.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Stopping All Sound

    Is there a way to block an IMAC from making or playing any sound. I am trying to block other users not just the mute button.

    Well to stop all the sound (but not the start up tone) you can get an old headphone and connected it on the rear of the iMac audio output automatically all the sound from any user will go to the headphones (a old iPod headphone) and if it is broken no sound at all, if you hide the headphones on the rear of the iMac with the other cables a regular user will not find out about this trick easily.....normally they will look for the volume control or some kind of control on the keyboard or front or the side of the iMac.
    Good luck

  • Stop all sounds as3? Help

    When the game starts. I have toggle button. I can play a sound or stop sound. When i play the sound, of course its not muted so even if i go to the next page. I can reason out that the sounds will still play.
    But if i press the no sound,so it means it must be muted.. on the first screen, the sound stops. But when I go the next frames and to others. The sounds are playing. The sound on the starting screen
    was like
    var test:Sound = new NameOfSound();
    but in the next frames.. the sound is in the frame itself.. no declaring like the first screen..
    and also some sounds is playing when something happens or for example if the bullet hits the target collsion..sound play..
    i tried to have solution like on the first screen if for example it is muted.. ill set it to trueStop.. then on the next frames.. i would put:
    if(trueStop == true){
         SoundMixer.stopAll();
    that way the frame sounds stopped and working.. but the sounds attach to the function when like i said if a collision happens,, the sound is still playing.. arrgghh i cant explain clearly.. i hope you understand my problem..
    any ideas?

    if you need to stop individual sounds, assign a soundchannel to the instance returned by your play method and apply a stop method to that soundchannel.
    for example:
    var s1:Sound=new S1();
    var sc1:SoundChannel=s1.play();
    // now at any time you can use:
    sc1.stop();  // to stop s1 only.

  • Spry Tabbed Pages Keep Shifting

    I have built a page using the Spry Tabbed Panels. I have one
    set inside of another. The problem is when you click a main tab and
    then a secondary tab and then roll over the main tabs again the
    width changes on the secondary tab. I have no idea why it does
    this. Here is the link: Thanks in advance.
    http://www.pco2.com/v/vspfiles/downloadables/spry/Tabbed_Page_3.html

    I would have to say that I am not sure it is a good idea to
    be using the tabs spry function as a navigation system. It is not
    what it was intended for. This puts your entire web site on one
    HTML page. If you lots of images, this could be a rather large
    download. Downloading an entire web site before you can see just
    one page is not very efficient. You are better off, IMHO, to use
    the SPRY tabs sparingly and where they are conducive to the content
    and not as site navigation.
    My $0.02

  • Want to stop all sounds and start them up too

    Hi.
    I have a flash website that is entirely based on videos. It
    loads and starts with an intro. Then a scene where a loop movie
    plays, and depending on which objects from the scene you press on a
    different videos start playing and then back to the scene.
    The problem si that, as with all videos, the sound is
    incorporated into the different videos that load.
    I want to stop or set the volume to zero by pressing on a
    button and to restore the sound by pressing again. How can i do
    that and have the sound stopped even if i load different movies all
    with their sound incorporated?
    Thank you.

    I do not recommend reformatting your harddrive and reloading your software.  This is a Windows thing. On an older mac it may be difficult to find all your software again.
    Best to have greater than 2gig of free space.  Many posters to these forums state that you need much more free space: 5 gig to 10 gig or 10 percent of you hd size.
    (0)
    Be careful when deleting files. A lot of people have trashed their system when deleting things. Place things in trash. Reboot & run your applications. Empty trash.
    Go after large files that you have created & know what they are.  Do not delete small files that are in a folder you do not know what the folder is for. Anything that is less than a megabyte is a small file these days.
    (1)
    Run
    OmniDiskSweeper
    "The simple, fast way to save disk space"
    OmniDiskSweeper is now free!
    http://www.omnigroup.com/applications/omnidisksweeper/download/
    This will give you a list of files and folders sorted by size. Go after things you know that are big.
    (2)
    These pages have some hints on freeing up space:
    http://thexlab.com/faqs/freeingspace.html
    http://www.macmaps.com/diskfull.html
    (3)
    Buy an external firewire harddrive.
    For a PPC computer, I recommend a firewire drive.
    Has everything interface:
    FireWire 800/400 + USB2, + eSATA 'Quad Interface'
    save a little money interface:
    FireWire 400 + USB 2.0
    This web page lists both external harddrive types. You may need to scroll to the right to see both.
    http://eshop.macsales.com/shop/firewire/1394/USB/EliteAL/eSATA_FW800_FW400_USB
    (4)
    Buy a flash card.

  • Soundboard Help! - Convert AS2 to AS3 - Stop All Sounds On button release

    Im making a soundboard and I chose AS3 by accident.  What I need the code to do is STOP the CURRENT sound from playing
    if another is pressed.
    the code that worked for AS1 and AS2 was
    onMouseDown = function () {
    stopAllSounds();
    I tried messing around with this in AS3:
    import flash.media.SoundMixer;
    "mouseUp" (MouseEvent.MOUSE_UP), "click" (MouseEvent.CLICK)
    SoundMixer.stopAll();
    but It doesnt do anything.
    import flash.media.SoundMixer;
    SoundMixer.StopAll();
    ^^^
    plays the sound once and messes the sound up after playing for only half  a second or not at all
    thanks a lot for help

    this as2 code:
    onMouseDown = function () {
    stopAllSounds();
    // would be the following in as3:
    this.addEventListener(MouseEvent.MOUSE_DOWN,f);
    function f(e:Event):void{
    SoundMixer.stopAll();

  • Skype stops all sounds from working.

    Lately I have been having a problem, where everytime I am in a skype call my sound stops working after a randomamount of time.
    It is getting really annoying and every possible fix I could find is not working.
    Does anybody know what I can do to fix this problem?

    (my internet was broken last night so sorry for not replying)
    No that is not it my symbols exist on all frames.
    am i suppost to include any framework for it to work? if so, on what level on the timeframe?

Maybe you are looking for

  • Office Integration in flex

    Hi, For simple xls we have the inbuilt library "as3xls" through which we can read and write data in excel or csv file but for xlsx do we have any inbuilt liberary or component or code through which we can read and write the xlsx file. Please help me

  • Contact person Number range in ERP and CRM - Middleware settings

    Dear SDN team, We have currently integrated SAP CRM 5.2 and SAP R/3 4.6 c using Middleware . The contact persons are maintained in SAP R/3 system and also downloaded into CRM system . Currently the Number range is different in both the systems Going

  • Photo Booth problem solved--sort of

    Photo Booth hasn't been working on my new 24" iMac for weeks--at least 5 or 6 of the last 7 or 8 weeks that I've owned it. I've floundered for answers and have looked everywhere and never found a single answer to why it didn't work. At first it didn'

  • How to print out answers using the form I created

    I created an application form for my company. People have submitted their applications, but I do not know how to print them out. Is there a way to copy the answers into the form and print that? Or something like that? I cannot just print the answers

  • Transferring music to new mac air using external drive: next steps after copying iTunes file to music folder?

    I've followed instructions to consolidate, copy to external drive, then copy iTunes folder to Music folder on new mac air.  so... 1. what do I do with original iTunes folder? 2. how do I get iTunes to read/ingest playlist and songs?