# Calling functions in another swf

**URL:** <https://forum.kirupa.com/t/calling-functions-in-another-swf/177074>\
**Category:** flash\
**Created:** [January 30, 2006, 2:22am UTC](https://forum.kirupa.com/t/calling-functions-in-another-swf/177074 "2006-01-30T02:22:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tedc](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tedc](https://forum.kirupa.com/u/tedc)\
**Post date:** [January 30, 2006, 2:22am UTC](https://forum.kirupa.com/t/calling-functions-in-another-swf/177074/1 "2006-01-30T02:22:22Z")

</div>

Hi. I’m trying to do something very simple and I’ve searched the forums but the answer to my question doesn’t seem to work for me…

I’m trying to call a function that is on another SWF that I am loading into a container on the root of my main swf. The function I will call will be

```auto
intervalId = setInterval(this, "executePixelation", duration, photoNum);

```

But for now I can’t seem to pass anything over to the loaded swf.

I am using this method to load the swf:

```auto
on (release){
	loadMovie("project1.swf",_root.Content);
             _root.Content.happyVar = "niceness";
}

```

And this method to call a variable in the first frame of project1.swf:

```auto
trace(_root.Content.happyVar);

```

Before I start calling functions I’d at least like to be able to trace a simple variable…

This has got to be so easy :ear: … !! 🙂
