This content has been marked as final. Show 9 replies
This was such a popular topic a while ago, hard to believe that we haven't seen it for awhile.
If you are playing a video (by video you mean FLV, right?) then you should Media.stop() the video. I don't think stopAllSounds will work since you aren't directly using the Sound class.
If you don't know how to target _level2, how are you unloading it?
I am using code like this
So would I do this??
because I need to stop it as well as unload the swf it is playing in on level 2
and yes it is an FLV..
Thanks a lot... everyone on this forum is so helpful.. I have learned so much just from reading all the posts..
Ah. I forgot about using unloadMovie in that way. I think If you are unloading a level you should use unloadMovieNum(2).
To reference any level, you start the reference to object with _levelX (where X is the number of the level.)
Should do it, assuming Media is on the main timeline of the swf that is loaded into level 2.
I tried this
but still nothing
the media is on the first frame of the main timeline in the SWF on level2
I'm sorry but I am really a novice at code and mainly do design..
if my code looks retarded please excuse it.
WHAT AM I DOING WRONG???????????
Thanks sooooooo much for your help... you ever have an after FX photoshop or 3dmax question you let me know.
And you are sure that you have given the Media playback component the instance name of "Media" because if you have it should work.
Also, please read my posts a bit more carefully. If you are using levels, you should use unloadMovieNum().
Are you sure that the back button is working as well? Add this line just before the stop line.
trace("Back button pressed.");
It finally works... I had somehow messed up and named it "meedia"
You said I should use this "unloadMovieNum()." instead of "unloadMovie(2);" they both work...
Just curious what the difference is... I just can't tell
Rothrock.... YOU ROCK
The loadMovieNum and unloadMovieNum (notice the word Num at the end) should be used whenever you are using _level. While they will sometimes work with the non-Num versions, it can also cause subtle problems that will make you crazy. So it is good to use the correct version.
Glad that worked out for you. So the big lesson learned is that YOU DO KNOW what you are doing! Have confidence in your code and check for the silly obvious mistakes that we all make from time to time. We have all had the "instance name isn't what we thought, how could that have happened" trouble more than we can count. The trick is to learn from it after the 1000th time!