# Animate movie clip of external SWF file

**URL:** <https://forum.kirupa.com/t/animate-movie-clip-of-external-swf-file/260037>\
**Category:** flash\
**Created:** [May 12, 2008, 12:17am UTC](https://forum.kirupa.com/t/animate-movie-clip-of-external-swf-file/260037 "2008-05-12T00:17:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![damonlee](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@damonlee](https://forum.kirupa.com/u/damonlee)\
**Post date:** [May 12, 2008, 12:17am UTC](https://forum.kirupa.com/t/animate-movie-clip-of-external-swf-file/260037/1 "2008-05-12T00:17:48Z")

</div>

ok,

using AS3 and “Tweener”, I want to animate a movie clip of a loaded SWF.

However, i want to do this from the code of the main movie, no code in external SWF.

Here is my loader:

```auto
var _swfContainer:Loader = new Loader()
var _url1:URLRequest = new URLRequest("about.swf")
var _url2:URLRequest = new URLRequest("portfolio.swf")

var _externalMovie:MovieClip;

//Start loading and add the loader to the stage
stage.addChild(_swfContainer);
_swfContainer.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, finishedLoading);

// This is done after the swf is loaded
function finishedLoading (e:Event)
{
    _externalMovie = MovieClip(_swfContainer.content);
}

function loadAbout(e:Event){
	
		_swfContainer.load(_url1)
}

function loadPortfolio(e:MouseEvent){
	
		_swfContainer.load(_url2)
}

```

Here is the Tweener code:

```auto
Tweener.addTween(_externalMovie.ip, {x:244, time:0.4, delay:0.3, transition:"easeOutExpo"});

```

the “\_externalMovie.ip” would refrence any external SWF that has been loaded with the movie clip “ip”, at least that is what I want

This is the error i get:  
Error #1009: Cannot access a property or method of a null object reference.  
at main\_fla::MainTimeline/frame1()

Yes, i have my flash prefrences set up to access the Tweener class.
