Skip to main content
March 21, 2014
Question

Button functionality in a movieclip within another movieclip for another movieclip

  • March 21, 2014
  • 2 replies
  • 774 views

Ok so i have this looping thumbnails bar that goes like this:
Scene1-imagebar-imagebarinside
The buttons symbols are in the "imagebarinside" movieclip and i am using this code:

ss1.addEventListener(MouseEvent.CLICK, play1);

function play1(event:MouseEvent):void
{
gotoAndStop("ssbox1");
}

...in this movieclip to play another labeled frame in another movieclip (Scene1-Bara)
Problem is it wont work :-< if anyone has a better ideea i'll really apreciate it

This topic has been closed for replies.

2 replies

Participating Frequently
March 24, 2014

Hey!

So, trying to understand the distribution of your MovieClips inside the flash file, this is what I understand:

Scene1 contains a movieclip with the instance name "imagebar" and another movieclip with the instance name "bara".

"imagebar" contains a movieclip with the instance name "imagebarinside". If that is the case (And the code being on the first frame of "imagebarinside"), I would use something like:

function play1(event:MouseEvent):void

{

     Object(this.parent).parent.bara.gotoAndStop("ssbox1");

}

Hope this works!

kglad
Community Expert
Community Expert
March 21, 2014

where is that code?

ie, if it's on a timeline which timeline, imagebarinside?

and Scene1 is not the name of a movieclip, but is the name of the scene that contains bara and imagebar, correct?

March 21, 2014

the code is on the first frame of "imagebarinside"

the frame label i want to target is inside "bara"

and yes correct scene1 is the main scene wich contains "imagebar"-"imagebarinside" and "bara"

kglad
Community Expert
Community Expert
March 21, 2014

use

parent.bara.gotoAndStop("ssbox1");