# Manipulating the Childs timeline (external SWF) from the Parent

**URL:** <https://forum.kirupa.com/t/manipulating-the-childs-timeline-external-swf-from-the-parent/287671>\
**Category:** flash\
**Created:** [May 5, 2009, 2:06am UTC](https://forum.kirupa.com/t/manipulating-the-childs-timeline-external-swf-from-the-parent/287671 "2009-05-05T02:06:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grjd](https://avatars.discourse-cdn.com/v4/letter/g/5e9695/32.png) [@grjd](https://forum.kirupa.com/u/grjd)\
**Post date:** [May 5, 2009, 2:06am UTC](https://forum.kirupa.com/t/manipulating-the-childs-timeline-external-swf-from-the-parent/287671/1 "2009-05-05T02:06:40Z")

</div>

I have been racking my brain for hours trying to get this to work! If someone out there can give me a hand I would REALLY appreciate it.

Essentially, i have loaded an external SWF (area-home.swf) w/in a MC (mc\_loader) of the main SWF (base.swf). This is simple, not a problem, works like a charm. What I want to do from here is have the main SWF (base.swf) tell the external SWF (area-home.swf) to gotoAndStop at a certain frame (42). Below is the code that I have, and can’t quite figure out why it won’t work:

```php
var loader1:Loader=new Loader();
loader1.contentLoaderInfo.addEventListener(Event.COMPLETE, myFunction);

loader1.load(new URLRequest("area-home.swf"));

function myFunction(event:Event):void{
    addChild(loader1);
    MovieClip(loader1.content).gotoAndStop(42);
    trace(MovieClip(loader1.content).totalFrames);
}

```

When i trace the total frames, it does bring back the actual frame count from area-home.swf, so I know that it is communicating. It simply does not stop on the 42nd frame (even have a stop(); command on that frame in area-home.swf’s timeline)

I might just be making a very simple mistake, I just can’t see it.

I’ll owe a beer to anyone who helps me! Of course you’ll have to come to Chicago to get it 😉

Thanks,

Greg.
