# Loading external swfs and dynamically fading them in and out

**URL:** <https://forum.kirupa.com/t/loading-external-swfs-and-dynamically-fading-them-in-and-out/35119>\
**Category:** Uncategorized\
**Created:** [November 10, 2003, 7:57pm UTC](https://forum.kirupa.com/t/loading-external-swfs-and-dynamically-fading-them-in-and-out/35119 "2003-11-10T19:57:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bugjuice](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bugjuice](https://forum.kirupa.com/u/bugjuice)\
**Post date:** [November 10, 2003, 7:57pm UTC](https://forum.kirupa.com/t/loading-external-swfs-and-dynamically-fading-them-in-and-out/35119/1 "2003-11-10T19:57:23Z")

</div>

loading external swfs fade in fade out  
ok i have a main movie im loading one swf then when i click a button want it that old swf to fade out and the new swf to fade in heres my code also how can i have a loadbar each time i load the external swfs does the loadbar have to be in the external swfs or on the main timeline  
or can someone just point me to a tutorial tahnks

for the buton i have–  
but.onPress = function () {  
\_root.createEmptyMovieClip(“container”, 1);  
\_root.container.fadeOut = true;  
\_root.container = “loaded3.swf”  
loadMovie(“loaded3.swf”, “container”);  
container.\_x = 130 ;  
container.\_y = 76 ;  
}

on a blank frame i have–  
but.onPress = function () {  
if (fadeOut == true){  
if (\_alpha \> 0){  
\_alpha -= 5  
} else {  
\_alpha = 0  
unloadMovie(“loaded3.swf”);  
loadMovie (who, this)  
fadeOut = false //this part to prevent the fadeout/load action from being repeated  
}  
}  
but.onPress = function () {  
function (out) {}  
if (fadeIn == true){  
if (\_alpha \< 100){  
\_alpha += 5  
} else {  
\_alpha = 100  
fadeIn = false
