# Assets of external Swf

**URL:** <https://forum.kirupa.com/t/assets-of-external-swf/281684>\
**Category:** flash\
**Created:** [February 12, 2009, 5:35am UTC](https://forum.kirupa.com/t/assets-of-external-swf/281684 "2009-02-12T05:35:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![evokenz](https://avatars.discourse-cdn.com/v4/letter/e/b2d939/32.png) [@evokenz](https://forum.kirupa.com/u/evokenz)\
**Post date:** [February 12, 2009, 5:35am UTC](https://forum.kirupa.com/t/assets-of-external-swf/281684/1 "2009-02-12T05:35:02Z")

</div>

hi i am loading an external swf and need to access the assets within it heres my basic code:

i can access fine through the onComplete function of the loader but cannot access from anywhere else…

```auto
stop();

import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
import flash.events.ProgressEvent;

var mc:MovieClip = new MovieClip();
var mLoader:Loader = new Loader();
var mRequest:URLRequest=new URLRequest("external.swf");

addChild(mLoader);

function startLoad() {
    mLoader.load(mRequest);
    mLoader.contentLoaderInfo.addEventListener(Event.INIT, onCompleteHandler);
    mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
}

function onCompleteHandler(loadEvent:Event) {
    mc = MovieClip(mLoader.content);
    
    //THIS WORKS FINE
    mc.main_txt.text = "adsa";
    
}

function onProgressHandler(mProgress:ProgressEvent) {
    var percent:Number=mProgress.bytesLoaded/mProgress.bytesTotal;
    trace(percent);
    
}

startLoad();

//THIS GIVES ERROR #1010: A term is undefined and has no properties.
mc.main_txt.text = "adsa";

```
