Help converting this as2 to as3

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…