Removing Key listener from parent movie created by child movie

Removing Key listener from parent movie created by child movie

Post by RNH » Wed, 23 Mar 2005 10:14:55


I have a parent movie that contains the mx.controls.Loader for loading external
SWF files. I have one file for slide shows that contains a Key listener used
to update the screen position and slide numbers. If I load this file into the
main movie it runs perfectly. If I then load it in again during the course of
my session it seems to create a second key listener object so that each time
the key is pressed it performs the Object method twice. These objects are
typed within the loaded SWF with- var myListener:Object= new Object(); so it
should be scoped to the SWF timeline. My menu allows other movies to be
loaded into the same mx.controls.Loader which I thought would remove the
existing loaded movie (loading into level 0) wiping out the associated
variables/listeners. This doesn't seem to be the case since, if I load the
slideshow with the listener, then load a video, then a quiz, then reload the
slideshow with the listener I will now have 2 listeners that perform the method
2 times for every key press.

My problem is that each time the SWF loads it adds a listener even if several
other movies have been loaded into the same mx.controls.Loader in the interim.
Do new movies that load into the Loader unload prior movies?? Or is there an
undocument method for unloading prior movies in the mx.controls.Loader
component? Or is there a way of removing the Key listener after the movie is
no longer in the Loader component?
 
 
 

1. manipulating a movie clip which is outside the stage area of the parent movie

2. Controlling parent movie from a loaded movie

> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.


Hi!

I have a swf file which I call "Stage" and it contains 3 scenes.

In scene 1 of Stage, I have another swf- "Info1." loaded on level 10. I know
how to get Info1 to unload and load Info2 but what I am trying to accomplish
is when I click on Info1, it loads Info2 and it also go to Scene 2 of Stage.
Is there anyway I can do this?

I appreciate any input.

Thank you.

K.

<HTML>
<HEAD>
<TITLE>Controlling parent movie from a loaded movie</TITLE>
</HEAD>
<BODY>
<FONT FACE="Arial"><SPAN STYLE='font-size:12.0px'>Hi!<BR>
<BR>
I have a swf file which I call "Stage" and it contains 3 scenes. <BR>
<BR>
In scene 1 of Stage, I have another swf- "Info1." loaded on level 10. I know how to get Info1 to unload and load Info2 but what I am trying to accomplish is when I click on Info1, it loads Info2 and it also go to Scene 2 of Stage. Is there anyway I can do this? <BR>
<BR>
I appreciate any input. <BR>
<BR>
Thank you.<BR>
<BR>
K. </SPAN></FONT>
</BODY>
</HTML>

3. Drawing a dynamic movie clip into a parent movie clip

4. this.attachMove not loading movie from a child movie

5. Multi-part unique key including parent key and child key

6. Adding listener to dynamically created empty movie clip.

7. movie within movie within movie

8. Movie within a movie with in another movie

9. Properties of load movie in relation to library movies/exterior movies

10. Buttons in Movie Clips, Movie Clips in Movie Clips

11. movie within a movie (with movies in it)

12. Movie makers-finish movie+save movie as freezes 60% before finishe

13. Passing information from a movie loaded in a movie clip holder to the main movie

14. Windows Movie Maker 2 Create Movie File Problem

15. Movie Maker Error When Creating a Movie