# Accessing a varible in master swf

**URL:** <https://forum.kirupa.com/t/accessing-a-varible-in-master-swf/236807>\
**Category:** Uncategorized\
**Created:** [August 23, 2007, 6:57pm UTC](https://forum.kirupa.com/t/accessing-a-varible-in-master-swf/236807 "2007-08-23T18:57:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andysteve](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@andysteve](https://forum.kirupa.com/u/andysteve)\
**Post date:** [August 23, 2007, 6:57pm UTC](https://forum.kirupa.com/t/accessing-a-varible-in-master-swf/236807/1 "2007-08-23T18:57:55Z")

</div>

i have a custom preloader that i have in the master.swf.  
loaded into the master.swf is my mainmovie.swf.  
in my mainmovie i have a button that i want to trigger the loader specified in the master swf, which in turn will show the custom preloader animation  
the purpose of the button is to display an image and therefore, i need the preloader to show whilst the image loads. I also want this preloader to be called with any other object inside any other swf.

iv tried calling the preloader within mainmovie.swf using -

stage.myLoader.load(img);

but error with myLoader cannot be found.

the preloader works when i load mainmovie.swf into master.swf. But i cant seem to call this from outside the master.swf

So i guess my question is how do i access ‘myLoader’ variable from a different swf other than that which the variable resides in?
