A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: sound shut down

  1. #1
    Senior Member
    Join Date
    Oct 2002
    Location
    belgium
    Posts
    611

    sound shut down

    on my site I have a soundloop.It stops when hitting the sound button but when the sound plays and I close my window the sound is still playing.I have to shut down my explorer to stop the sound what is quate anoying how solve?

  2. #2
    Registered User
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    this is a bug in the MacIE player. make sure you upgrade to the latest player and repord a bug if the problem persists.

    here is a solution:
    1) create a simple SWF with the following code in frame 1:
    stopAllSounds(); // stop the persisting sound
    getURL("javascript:self.close()"); // close pop up window
    stop(); // prevent timeline looping

    2) add an onunload javascript event to the HTML page containing your SWF.

    <body onunload="popUpWindow()">

    3) create a function to pop up a small window containing the SWF from step one. The SWF will automatically close the window after it stops all sound.

  3. #3
    Senior Member
    Join Date
    Oct 2002
    Location
    belgium
    Posts
    611
    Thanks for the reply.Is it possible to make a .fla with the html and place some comments in the actionscript because all actionscript is very new to me.I would really appriciate this.

    Grtzz

  4. #4
    Registered User
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    If I solved the problem for you, then you would not learn anything, which is counter to the purpose of these forums. The best way to learn is to try something new and ask for help as you have specific problems.

  5. #5
    Senior Member
    Join Date
    Oct 2002
    Location
    belgium
    Posts
    611
    Itried to put some code and this seems to crash my explorer.On restarted my computer and same thing happend.
    The structure of my site is as following.In index.swf there is an emty mc this load a new swf that then becomes the main swf where other swf can be loaded.In the main swf the navigation is animated and on frame say 150 for instance the sound start and make the loop.
    So the code point1 I placed in the first frame of the main swf because there is the sound.Is this wright.Also when going from index.Swf to the main. there is a code that tells to go to frame2.
    Frame1 has a stopaction and makes the empty mc visible in this file.
    There must be problems already here otherwise my computer would not crash.

    can you help me out a bit.

    Grtzz

  6. #6
    Registered User
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    place the code in a different SWF than you main movie. embed this SWF in its own html document. use javascript to launch a new window when the user leaves the page containing your main swf. The new window should contain the html document of the SWF containing code to stop all sounds.

  7. #7
    Senior Member
    Join Date
    Oct 2002
    Location
    belgium
    Posts
    611
    So I place the code in my index.swf?As for the javascript to open up an new wendow containing the html(html of index?) how make this.Sorry don't know much about actionscript.

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