# Interaction between external swf and movieClip \[F8\]

**URL:** https://forum.kirupa.com/t/interaction-between-external-swf-and-movieclip-f8/256407
**Category:** flash
**Created:** [April 2, 2008, 7:12pm UTC](https://forum.kirupa.com/t/interaction-between-external-swf-and-movieclip-f8/256407 "2008-04-02T19:12:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![MrHmer](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@MrHmer](https://forum.kirupa.com/u/MrHmer)
#### Post date: [April 2, 2008, 7:12pm UTC](https://forum.kirupa.com/t/interaction-between-external-swf-and-movieclip-f8/256407/1 "2008-04-02T19:12:52Z")

</div>

Hi guys,

I already found a lot of help in reading others posts on this site here. I’m relatively new to Flash and Actionscript and I think It’s time now to look for some assistance. I can’t wrap my head around the following problem:

**Description:**

In this project I have 6 buttons which target a moviecliploader to load swfs, which play animations corresponding to the content areas.

The button itself onRelease triggers a button animation and the moviecliploader to load the swf, this works out fine.

\*\* Problem:\*\*

[LIST]  
I want the button animations to be invisible as soon as they and the corresponding swf finished playing.  
[/LIST]

[LIST]  
I would also like to prevent the button from loading the same swf, when released another time and when the swf is still active.  
[/LIST]

**Tested remedy:**

Tried the getProgress function to check the loading progress of the moviecliploader and then used the setInterval function for the moviecliploader to make the button animation disappear after a certain time. (maybe not correctly)

Tried several other thing, but what I suspect to be an obstackle is to get the connection between the end of the the playing swf. and the mc inside of the button.

I also thought about setting things up differently as described in the following tutorial … [http://http](http://http)://www.kirupa.com/developer/mx2004/transitions.htm

This would make up for my 2nd problem as I experienced in a previous project, but doesn’t give an answer to problem No. 1

😕

**Script on buttons:**

stop();  
this.onEnterFrame = function() {  
if (rewind == true) {  
prevFrame();  
}  
};  
this.onRollOver = function() {  
rewind = false;  
play();  
};  
this.onRollOut = function() {  
rewind = true;  
};

**Script on main timeline:**

/\*

- This frame we will build the navigation  
\*/  
stop();  
this.createEmptyMovieClip(“mcCharry”, this.getNextHighestDepth());  
var mcCharryLoader:MovieClipLoader = new MovieClipLoader();

var charryListener:Object = new Object();  
mcCharryLoader.addListener(charryListener);

var warpSound:Sound = new Sound();  
[//warpSound.attachSound](https://warpSound.attachSound)(‘warp1’);

mcCharry.\_x = 20;  
mcCharry.\_y = 130;

var charryArray:Array = new Array(“gangx.swf”, “fioteen.swf”, “peteTiger.swf”, “coolScull.swf”, “bellyMan.swf”, “larsBen.swf”);

var nCounter = i;  
for (var i:Number = 1; i\<7; i++) {  
\_root.navBar[“navBtn”+i].ID = i;  
//Zählvariable zwischenspeichern  
\_root.navBar[“navBtn”+i].onRelease = function() {  
mcCharryLoader.loadClip(charryArray[this.ID-1], mcCharry);  
warpSound.start();  
this.gotoAndPlay(11);  
};  
};

I would be so thankful if someone could help me. I have already spend 2 days trying to find a solution, but I can’t come up with one.
