# Untitled

**URL:** <https://forum.kirupa.com/t/untitled/229660>\
**Category:** random\
**Created:** [June 19, 2007, 10:39am UTC](https://forum.kirupa.com/t/untitled/229660 "2007-06-19T10:39:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flesh](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@flesh](https://forum.kirupa.com/u/flesh)\
**Post date:** [June 19, 2007, 10:39am UTC](https://forum.kirupa.com/t/untitled/229660/1 "2007-06-19T10:39:09Z")

</div>

**[SIZE=3][FONT=Times New Roman]Hi there![/FONT][/SIZE]**

**[SIZE=3][FONT=Times New Roman]I’ve got one AS 3 swf called “B” and it works fine, no compiler errors of any sort. [/FONT][/SIZE]**  
**[SIZE=3][FONT=Times New Roman]But when I try to load “B” into another swf “A”, the compiler says:[/FONT][/SIZE]**

[SIZE=3][FONT=Times New Roman]TypeError: Error #1009: Cannot access a property or method of a null object reference.[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]at Main/Main::init()[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]at Main$iinit() [/FONT][/SIZE]

**[SIZE=3][FONT=Times New Roman]I can also load any other swf into “A” without the compiler complaining![/FONT][/SIZE]**

**[SIZE=3][FONT=Times New Roman]Timeline script in “A”:[/FONT][/SIZE]**

[FONT=Times New Roman]import flash.display.Loader;[/FONT]  
[FONT=Times New Roman]import flash.events.Event;[/FONT]

[FONT=Times New Roman]var ldr:Loader = new Loader();[/FONT]  
[FONT=Times New Roman]var urlReq:URLRequest = new URLRequest(“ToBeLoaded.swf”);[/FONT]  
[FONT=Times New Roman]addChild(ldr);[/FONT]

[FONT=Times New Roman]ldr.load(urlReq );[/FONT]

[FONT=Times New Roman]ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);[/FONT]

[FONT=Times New Roman]function loaded(event:Event):void {[/FONT]  
[FONT=Times New Roman]trace(“LOADED”);[/FONT]  
[FONT=Times New Roman]}[/FONT]

**[SIZE=3][FONT=Times New Roman]So to conclude. There is no indication (no compiler warnings )that there is something wrong with either A nor B, exept when B is loaded into A.[/FONT][/SIZE]**  
**[SIZE=3][FONT=Times New Roman]Then A finds out that there is something wrong with B all of a sudden.[/FONT][/SIZE]**  
**[FONT=Times New Roman][SIZE=3]Is there a way to make sure the swf’s arent so dependent on each other.[/SIZE][/FONT]**
