# Referecing main movie variables inside an external swf

**URL:** <https://forum.kirupa.com/t/referecing-main-movie-variables-inside-an-external-swf/244012>\
**Category:** Uncategorized\
**Created:** [November 13, 2007, 3:37pm UTC](https://forum.kirupa.com/t/referecing-main-movie-variables-inside-an-external-swf/244012 "2007-11-13T15:37:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ywenz](https://avatars.discourse-cdn.com/v4/letter/y/edb3f5/32.png) [@ywenz](https://forum.kirupa.com/u/ywenz)\
**Post date:** [November 13, 2007, 3:37pm UTC](https://forum.kirupa.com/t/referecing-main-movie-variables-inside-an-external-swf/244012/1 "2007-11-13T15:37:57Z")

</div>

I’m having some issues referencing variables in the main movie.

On the 1st frame of the main movie I have: **var testvar=“testing123”;**

On the main movie I have a movieclip with an onRelease event handler that is defined with:

**loadMovie(“Slideshow.swf”,1);**

Slidwshow.swf contains:

**trace("From the main movie: " + \_parent.testvar);**

however the trace statement prints “undefined” instead of “testing123”

Any ideas why?
