# Help converting this as2 to as3

**URL:** <https://forum.kirupa.com/t/help-converting-this-as2-to-as3/271548>\
**Category:** flash\
**Created:** [September 24, 2008, 3:35pm UTC](https://forum.kirupa.com/t/help-converting-this-as2-to-as3/271548 "2008-09-24T15:35:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wuzzi2ya](https://avatars.discourse-cdn.com/v4/letter/w/e79b87/32.png) [@wuzzi2ya](https://forum.kirupa.com/u/wuzzi2ya)\
**Post date:** [September 24, 2008, 3:35pm UTC](https://forum.kirupa.com/t/help-converting-this-as2-to-as3/271548/1 "2008-09-24T15:35:37Z")

</div>

I have used this code (as2) before, but I am much more versed in as3. How would I convert this to as3? Code below:

b1.onRelease = function() {  
if (\_root.section != “profile.swf”) {  
\_root.section = “profile.swf”;  
\_root.transition.gotoAndPlay(“closing”);  
}  
};  
b2.onRelease = function() {  
if (\_root.section != “gallery.swf”) {  
\_root.section = “gallery.swf”;  
\_root.transition.gotoAndPlay(“closing”);  
}  
};  
b3.onRelease = function() {  
if (\_root.section != “printGallery.swf”) {  
\_root.section = “printGallery.swf”;  
\_root.transition.gotoAndPlay(“closing”);  
}  
};  
b4.onRelease = function() {  
if (\_root.section != “photos.swf”) {  
\_root.section = “photos.swf”;  
\_root.transition.gotoAndPlay(“closing”);  
}  
};

Also if anyone has a better way of creating an intro and outro transition for manuvering through content, I would be open to it…

Thanks in advance…
