# Mc on loaded swf timeline controling mc on main swf timeline

**URL:** https://forum.kirupa.com/t/mc-on-loaded-swf-timeline-controling-mc-on-main-swf-timeline/284495
**Category:** Uncategorized
**Created:** [March 19, 2009, 5:27pm UTC](https://forum.kirupa.com/t/mc-on-loaded-swf-timeline-controling-mc-on-main-swf-timeline/284495 "2009-03-19T17:27:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![moldero](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@moldero](https://forum.kirupa.com/u/moldero)
#### Post date: [March 19, 2009, 5:27pm UTC](https://forum.kirupa.com/t/mc-on-loaded-swf-timeline-controling-mc-on-main-swf-timeline/284495/1 "2009-03-19T17:27:17Z")

</div>

AS2, no problem 🙂 but this AS3 learning curve is like a wall! slowly but surely, hair by pulled out hair!!

In short, this is what im trying to do: [COLOR=Blue][COLOR=Red]Communicate from externally loaded swf to main/parent .swf.[/COLOR]  
[/COLOR]

on my main .swf i have this code on my main timeline to import and center an external .swf:

```auto

import flash.display.*;
import flash.net.URLRequest;

//turn off stage auto resizing
stage.scaleMode=StageScaleMode.NO_SCALE;
stage.align=StageAlign.TOP_LEFT;

//load SWF
//your swf width
var swfWidth:int=1024;
//your swf height 
var swfHeight:int=768;
var loader:Loader = new Loader();
addChild(loader);
var url:String="content.swf";
var urlReq:URLRequest=new URLRequest(url);
loader.load(urlReq);

```

and in that (main or parent) .swf I have an MC called “Indy”  
which I am attempting to do a gotoAndPlay(‘playOn’);  
from an mc in the externally loaded .swf called “content.swf”  
that mc is named “nav\_mc”

here is my code on the first frame of “nav\_mc” which lives on the externally loaded .swf “content.swf”

```auto

//start MOUSE_DOWN play
import flash.events.MouseEvent;
hitPlay.addEventListener(MouseEvent.MOUSE_DOWN, clickPlay);
function clickPlay(event:MouseEvent):void {
    trace("play was hit");
    //parent.loader.Indy.gotoAndPlay("playOn");
}
//end MOUSE_DOWN play

```

as you can see, ive tried this code below in an attempt to comunicate to the main or parent .swf, but its been guided out since its no workie.

```auto
//parent.loader.Indy.gotoAndPlay("playOn");

```

ide love to use AS2 on this since I would have been done months ago, but this file contains mostly inverse kinematics, so in this case, i have no choice but to learn AS3, but its been great so far, i have learned a lot from the adobe docs and you guys here.

Thanks in Advance with tons of appreciation to anyone who can help,

-Moldy
