PDA

View Full Version : Media Component keeps on playing...


darthmahon
12-21-2004, 02:55 PM
Hey,

Posted this in the wrong place first off, so posting again to the correct place.

Ok I am using Flash MX 2004 to play a flv video file for a clients interview. Now, having a slight problem.

I am loading the video into a new level, using this on the button:


on (release) {
// unload anything in gallery
unloadMovieNum(2);

// load new movies
loadMovie("interview_play.swf", 2);
}


Now, this starts playing the interview using the media component etc, that works fine. Thing is, if I go to another section within the site I obviously want to remove this video, I don't want it to play anymore. So I use the following on the other menu buttons.


unloadMovieNum(2);


Now, this remove the interview from being seen, but the audio keeps playing!

I thought I could just stop the sound but this doesn't do anything:


_level2.stopAllSounds();


What's going on? How can I completely remove this video interview?

Cheers,
Chris

The Emporor
12-21-2004, 02:59 PM
I've got the same problem...is there a solution to it?

Someboday?

darthmahon
12-21-2004, 03:15 PM
hope so, it seems a bit odd that it keeps playing when the movie has been unloaded, perhaps you need to unload the actual movie itself, but I don't know where to start with it...

The Emporor
12-21-2004, 03:24 PM
me neither and I asked this question already on several forums...hope the answer will come soon

darthmahon
12-22-2004, 04:36 PM
Still nobody with any ideas?

Bosworth
12-22-2004, 07:02 PM
UGH - -
I spent two full days of work a couple weeks ago dicking arround with this -
it is a glaring bug in the component and I ended up not being able to use it.

Try the NetStream/NetConnection classes with and embedded video object for better results...

check my (unresolved) thread on the subject here (http://www.actionscript.org/forums/showthread.php3?t=60351):

good luck
b()X

mrand01
12-22-2004, 08:29 PM
unload a movie with mediaComponent.setMedia(""). Just set the media to nothing, that will unload the previous movie.

Bosworth
12-23-2004, 01:02 AM
I'll try that tomorrow morning - it would be totatlly painful if it was that easy...

;-)

b()X

The Emporor
12-23-2004, 10:04 AM
Could you please be more specific? I'm a complete newby at Media components. :(

What action do I give a button to unload an flv?

Bosworth
12-23-2004, 07:00 PM
look up the setMedia class in the help to see the syntax and use.
you could attach this to a button - or run it as a function...