Skip to main content
June 20, 2011
Answered

pause movie clip from inside another movie clip

  • June 20, 2011
  • 1 reply
  • 823 views

Hi there,

Question: Can you pause a movie clip, let's say movie clip A,  from inside a seperate movie clip, let's say movie clip B.  B is not a parent of A.

Essentially, I have a background slideshow running that I want to stop when a menu item is clicked, and an external swf file is loaded.

I attached a jpg which diagrams how the movie clips are organized within each other and what I want to pause from within which movie clip:

If this is not feasible, I'd love if anyone could reccomend a better way to structure the movieclips.

Many thanks,

Rachel

This topic has been closed for replies.
Correct answer kglad

from project1's scope, this.parent.parent is content so this.parent.parent.slideshow will give you the reference you want.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
June 20, 2011

from project1's scope, this.parent.parent is content so this.parent.parent.slideshow will give you the reference you want.

June 20, 2011

Hi kglad:

Wow! Thanks for the speedy response.   So would this.parent.parent.slideshow.stop(); go as an event listener within the actions layer of the "menu" movieclip?

Could I do Under the actions layer of the "menu movieclip", with "proj_one" being the instance name for the project 1 movie clip:

proj_one.addEventListener(MouseEvent.CLICK, stopSlideshow1);

function stopSlideshow1 (event:MouseEvent):void{
    this.parent.parent.slideshow.stop();
}

?

Thanks!

Edited:  updated a more accurate jpg.

kglad
Community Expert
Community Expert
June 20, 2011

if project 1 is a child of projects and that code is on the projects timeline, that will work