# \[AS1 to AS3\] Transitions Between External SWFs

**URL:** <https://forum.kirupa.com/t/as1-to-as3-transitions-between-external-swfs/280873>\
**Category:** Uncategorized\
**Created:** [February 2, 2009, 1:24pm UTC](https://forum.kirupa.com/t/as1-to-as3-transitions-between-external-swfs/280873 "2009-02-02T13:24:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smallDot](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@smallDot](https://forum.kirupa.com/u/smallDot)\
**Post date:** [February 2, 2009, 1:24pm UTC](https://forum.kirupa.com/t/as1-to-as3-transitions-between-external-swfs/280873/1 "2009-02-02T13:24:21Z")

</div>

I am trying to convert the source in this tutorial from AS1 to AS3

[http://www.kirupa.com/developer/mx2004/transitions.htm](http://www.kirupa.com/forum/../developer/mx2004/transitions.htm)

i think i am doing good 🙂  
but i am missing something. i do not know what is it?  
see the attachment please

the AS3 code is:

[AS]  
//Load Sec1  
var requestDefSec1:URLRequest = new URLRequest(“section1.swf”);  
var loadDefSec:Loader = new Loader();  
loadDefSec.load(requestDefSec1);  
addChild(loadDefSec);  
//----------------------------  
var container:URLRequest = new URLRequest(root.currMovie+".swf");  
var loadContainer:Loader = new Loader();  
loadContainer.load(container);  
addChild(loadContainer);

//BUTTON1-----------------------------------------  
sec1\_btn.addEventListener(MouseEvent.CLICK, loadSec1);  
function loadSec1(evt:MouseEvent):void {  
if (root.currMovie == undefined) {  
root.currMovie = “section1”;  
//Load the swf  
var request:URLRequest = new URLRequest(“section1.swf”);  
var loader:Loader = new Loader();  
loader.load(request);  
addChild(loader);  
//----------------------  
} else if (root.currMovie != “section1”) {  
if (container.currentFrame \>= evt.target.midframe) {  
root.currMovie = “section1”;  
container.play();  
}  
}  
}

//BUTTON2-----------------------------------------  
sec2\_btn.addEventListener(MouseEvent.CLICK, loadSec2);  
function loadSec2(evt:MouseEvent):void {  
if (root.currMovie == undefined) {  
root.currMovie = “section2”;  
//Load the swf  
var request:URLRequest = new URLRequest(“section2.swf”);  
var loader:Loader = new Loader();  
loader.load(request);  
addChild(loader);  
//----------------------  
} else if (root.currMovie != “section2”) {  
if (container.currentFrame \>= evt.target.midframe) {  
root.currMovie = “section2”;  
container.play();  
}  
}  
}  
[/AS]

any help  
Thanks
