# Variable to loaded swf issue

**URL:** https://forum.kirupa.com/t/variable-to-loaded-swf-issue/329464
**Category:** Uncategorized
**Created:** [September 1, 2012, 4:16pm UTC](https://forum.kirupa.com/t/variable-to-loaded-swf-issue/329464 "2012-09-01T16:16:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tristessa](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@tristessa](https://forum.kirupa.com/u/tristessa)
#### Post date: [September 1, 2012, 4:16pm UTC](https://forum.kirupa.com/t/variable-to-loaded-swf-issue/329464/1 "2012-09-01T16:16:38Z")

</div>

Hello

on frame 10 of my main movie I intent to load a swf which has a flv playing on the timeline + some animation.  
the loaded movie is called “external\_swf.swf”

in my complete handle this occurs:

var swf = MovieClip(loadEvent.currentTarget.content)  
swf.my\_text.text = “some text”;  
addChild(loadEvent.target.content);

this works perfectly, aka on my loaded swf the textfield states my “some text”  
and the flv (embedded on timeline) plays + all animation works as planned.

However, the moment I want to trace something out on the loaded timeline i get this error  
TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at main\_fla::MainTimeline/frame1()

the flv on the timeline does not play.

my trace is simply:  
trace("what is in the textfield: " + my\_text.text);  
my\_text is def. on the loaded movie’s timeline.  
Even with not tracing something out , but fe. declaring a var as:  
var newVar:String = “hello iam the loaded movie”

freezes the process and i get the type error.

Any ideas? This is highly weird to me.
