Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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"
Copy link to clipboard
Copied
use
parent.bara.gotoAndStop("ssbox1");
Copy link to clipboard
Copied
ok i'm using this now:
ss1.addEventListener(MouseEvent.CLICK, play1);
function play1(event:MouseEvent):void
{
parent.bara.gotoAndStop("ssbox1");
}
and getting this:
Symbol 'imagebarinsinde', Layer 'Actions', Frame 1, Line 6 | 1119: Access of possibly undefined property bara through a reference with static type flash.display:DisplayObjectContainer. |
Copy link to clipboard
Copied
use:
MovieClip(parent).bara.gotoAndStop('ssbox1');
Copy link to clipboard
Copied
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!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now