Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Member my_name_is_kurt's Avatar
    Join Date
    Aug 2004
    Location
    Phoenix, Arizona
    Posts
    97
    Member #
    6963
    I have a Flash project that I am building using external SWF files. Each page is a separate SWF that is loaded into a main SWF file using loadMovie("file.swf",_root.target);

    The homepage, which is loaded into a target movie clip when the movie loads using the script above, contains a Flash video (FLV) file, which is also loaded externally.

    The problem I am having is that when I replace the homepage, for some reason the audio from the FLV file continues to play, even though the SWF file it resides in had been replaced with another SWF file. Does anyone know what the problem could be? I have no idea why it would still play the audio if the video is unloaded.

    Any help would be greatly appreciated.
    Kurt Sprinzl
    Eternal Studios Web Development

    www.eternalstudios.net

  2.  

  3. #2
    Member my_name_is_kurt's Avatar
    Join Date
    Aug 2004
    Location
    Phoenix, Arizona
    Posts
    97
    Member #
    6963
    If anyone has any idea what the problem is, please let me know, but for now I am just going to use the stopAllSounds function to make the background music stop playing.
    Kurt Sprinzl
    Eternal Studios Web Development

    www.eternalstudios.net

  4. #3
    Junior Member
    Join Date
    Mar 2005
    Posts
    4
    Member #
    9503
    Find your audio clip that is continuously playing and make sure its is not setp to "loop" or "repeat". I dont have flash open in the properties dialogue box make sure it is on "play once" ....see if that help..

    Regards,

    Al

  5. #4
    Member my_name_is_kurt's Avatar
    Join Date
    Aug 2004
    Location
    Phoenix, Arizona
    Posts
    97
    Member #
    6963
    The audio is coming from an FLV file, so I have no control over how it is looped. In fact it is not looped, but I still want the audio from the video to stop playing when the SWF file is changed out.
    Kurt Sprinzl
    Eternal Studios Web Development

    www.eternalstudios.net

  6. #5
    Senior Member
    Join Date
    Mar 2004
    Posts
    241
    Member #
    5465
    you need to first unload the movie
    on(press) {
    unloadMovie(_root.target)
    loadMovie("file.swf", _root.target)
    }

  7. #6
    Member my_name_is_kurt's Avatar
    Join Date
    Aug 2004
    Location
    Phoenix, Arizona
    Posts
    97
    Member #
    6963
    Thanks, but I have done that already. I already use that exact code. It still plays the audio from the FLV file, even after the movie has been unloaded. Weird huh?
    Kurt Sprinzl
    Eternal Studios Web Development

    www.eternalstudios.net

  8. #7
    Senior Member
    Join Date
    Mar 2004
    Posts
    241
    Member #
    5465
    try throwing a:

    stopallsounds();

    in there (im not sure which letters are capitalized by the way)

  9. #8
    Member my_name_is_kurt's Avatar
    Join Date
    Aug 2004
    Location
    Phoenix, Arizona
    Posts
    97
    Member #
    6963
    Yeah, I did that too. It is stopAllSounds(); but if I want to have background music playing, it stops that too.
    Kurt Sprinzl
    Eternal Studios Web Development

    www.eternalstudios.net

  10. #9
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Sounds like a bug. I'm guessing that when you set the load a new clip into your MC, it's not properly purging the child FLV.

    Try this - first declare a variable in your _root like so:
    Code:
    var movieHolder:MovieClip = null;
    when you load a movie, instead of loading it into an existing clip, do something like this:
    Code:
    loadNewClip("foo.swf");
    
    funciton loadNewClip(clipName) {
        _root.movieHolder.removeMovieClip();  // 86 that sucker
        _root.movieHolder = null; // just in case!
        _root.createEmptyMovieClip("movieHolder", 0);
        _root.movieHolder._x = 100;  // or whatever
        _root.movieHolder._y = 100;  // or whatever
        _root.movieHolder.loadMovie(clipName);
    }
    What that should do is nullify the holder object, killing its instance in memory (and everything it holds).

    If that doesn't work, write to Macromedia and tell them to fix their crap.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:26 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com