Copy link to clipboard
Copied
target a movieclip from inside another movieclip
i want gotoandplay symbol timeline from main time line
Clicking 1 , i want to goto inside 5 . not 5 timeline . it is main timeline . but i want to go symbol timeline of 5
So the code i am using is :
stop();
movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene);
function fl_ClickToGoToScene(event:MouseEvent):void
{
MovieClip(circle).gotoAndPlay(1);
}
here i wan to go
if inside5 is the object on the same timeline as movieClip_1 and you want to target circle is a child of inside5, use:
inside5.circle.gotoAndPlay(1);
Copy link to clipboard
Copied
if inside5 is the object on the same timeline as movieClip_1 and you want to target circle is a child of inside5, use:
inside5.circle.gotoAndPlay(1);
Copy link to clipboard
Copied
Scene 1, Layer 'Actions', Frame 1, Line 7 | 1120: Access of undefined property inside5. |
yes. here is the way i made inside5 symbol timeline from circle . inside5 symbol is inside the circle . i want to go inside5 symbol timeline clicking 1 rect
stop();
movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToScene);
function fl_ClickToGoToScene(event:MouseEvent):void
{
inside5.circle.gotoAndPlay(1);
}
it shows error : acess of undefined property inside5
Copy link to clipboard
Copied
inside5 and circle must be instance names (in the properites panel).
in addition, they must both exist when the code executes.
Copy link to clipboard
Copied
certainly this code is working fine but reverse shows error
btn1.addEventListener(MouseEvent.CLICK, btn1Down);
function btn1Down(event:MouseEvent):void {
MovieClip(parent).salma.text = "You pressed button 1";
}
// means textfield salma is instace name situated in parent timeline. here your btn1 situated in child timeline .
//My question is what is the reverse of it ?
btn1 will be situated in parent timeline and textfield salma is situated child
apply this code you will get error . but anyway to fix the issue ?
Copy link to clipboard
Copied
check your duplicate message.
Copy link to clipboard
Copied
we access child using dot operator . here is the source .fla for begineers
Find more inspiration, events, and resources on the new Adobe Community
Explore Now