Skip to main content
Inspiring
March 4, 2016
Answered

target a movieclip from inside another movieclip

  • March 4, 2016
  • 1 reply
  • 3794 views

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


This topic has been closed for replies.
Correct answer kglad

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);

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
March 4, 2016

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);

Inspiring
March 4, 2016
Scene 1, Layer 'Actions', Frame 1, Line 71120: 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

kglad
Community Expert
Community Expert
March 4, 2016

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 ?


check your duplicate message.