# How to call gotoAndPlay function activated in \_root from an external MC with AS3?

**URL:** <https://forum.kirupa.com/t/how-to-call-gotoandplay-function-activated-in--root-from-an-external-mc-with-as3/276844>\
**Category:** flash\
**Created:** [December 4, 2008, 8:36am UTC](https://forum.kirupa.com/t/how-to-call-gotoandplay-function-activated-in--root-from-an-external-mc-with-as3/276844 "2008-12-04T08:36:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michoux](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@michoux](https://forum.kirupa.com/u/michoux)\
**Post date:** [December 4, 2008, 8:36am UTC](https://forum.kirupa.com/t/how-to-call-gotoandplay-function-activated-in--root-from-an-external-mc-with-as3/276844/1 "2008-12-04T08:36:59Z")

</div>

Dear all,

I am newbie in AS3. I have a problem:

\*\*parent movieclip:  
\*\*var ldr:Loader = new Loader();  
ldr.mask = rect;  
var url:String = “yes/color\_match.swf”;  
var urlReq:URLRequest = new URLRequest(url);  
ldr.load(urlReq);  
addChild(ldr);

–\> the external MC is **color\_match.swf**  
\*\*

Problem is: \*\*how can I call \_root to gotoAndPlay(frame) in the child (which is color\_match)?  
I tried and prompt error: **color\_match.as, Line 87**  
\*\*1061: Call to a possibly undefined method gotoAndPlay through a reference with static type flash.display:DisplayObjectContainer.

\*\*Anyone can help me? It takes me quite lots of time for this stupid code.

Thanks,  
michoux
