# External swf works but problem when load to another file

**URL:** <https://forum.kirupa.com/t/external-swf-works-but-problem-when-load-to-another-file/318790>\
**Category:** Uncategorized\
**Created:** [January 30, 2011, 7:47pm UTC](https://forum.kirupa.com/t/external-swf-works-but-problem-when-load-to-another-file/318790 "2011-01-30T19:47:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![straris](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@straris](https://forum.kirupa.com/u/straris)\
**Post date:** [January 30, 2011, 7:47pm UTC](https://forum.kirupa.com/t/external-swf-works-but-problem-when-load-to-another-file/318790/1 "2011-01-30T19:47:33Z")

</div>

i have this premade image scroller that works but when im trying to load it to my file it throws this:

\*\*TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at onn\_fla::MainTimeline/frame1()  
\*\*

i load it to my main file with this code

var fileRequest:URLRequest=new URLRequest(“onn.swf”);  
var imageload:Loader = new Loader();

imageload.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaderReady);

imageload.load(fileRequest);

function onLoaderReady(e:Event):void {

addChild(imageload);  
}

**Here is the image scroller location (at the bottom)**

\*\*[http://www.flashperfection.com/tutorials/Vertical-Photo-Scrolling-animation-41427.html](http://www.flashperfection.com/tutorials/Vertical-Photo-Scrolling-animation-41427.html)

\*\*
