Pls help me to change code as2 to as3

// Folder interaction/placement
function SetAtBottomOfParent(below_mc){
if (below_mc._parent._height) {
below_mc._y = below_mc._parent.getBounds(below_mc._parent).yMax;
}
}
function SetBelow(below_mc, top_mc){
if (top_mc != undefined) {
below_mc._y = top_mc.getBounds(top_mc._parent).yMax;
}
}
function ArrangeContents(directory_mc){
var item = directory_mc.firstChild;
if (item != undefined){
while (item = item.nextSibling){
SetBelow(item, item.previousSibling);
}
var parent_container = directory_mc._parent._parent;
if (parent_container != undefined) ArrangeContents(parent_container);
}
}
function Fold(){
if (this._parent.directory_mc._visible){
this._parent.directory_mc._visible = false;
this._parent.directory_mc._yscale = 0;
}else{
this._parent.directory_mc._visible = true;
this._parent.directory_mc._yscale = 100;
}
ArrangeContents(this._parent._parent);
scrollbar.contentChanged();
}
function open(){
//_root.userName = “Tim”;
//load_here.loadMovie(“moon.swf”);
}
// define basic variables for setting up the menu
var item_indent = 15;

function GenerateFileListing(directory_node, target_mc){
var directory_mc = target_mc.createEmptyMovieClip(“directory_mc”, 1);
SetAtBottomOfParent(directory_mc);
directory_mc._x += item_indent;
directory_mc.depth = 0;

var contents = directory_node.childNodes;

var item_mc, last_item_mc;
for (var k=0; k<contents.length; k++) {

	item_mc = directory_mc.attachMovie("directory_item","item"+directory_mc.depth, directory_mc.depth);
	directory_mc.depth++;
	
	item_mc.name_txt.text = contents[k].attributes.name;
	item_mc.icon_mc.gotoAndStop(contents[k].attributes.type);
	
	if (last_item_mc == undefined) directory_mc.firstChild = item_mc;
	else item_mc.previousSibling = last_item_mc;
	last_item_mc.nextSibling = item_mc;
	last_item_mc = item_mc;
	
	if (contents[k].attributes.type == "directory"){
		item_mc.select_btn.onPress = Fold;
		GenerateFileListing(contents[k],item_mc);
	}
	if (contents[k].attributes.type == "actionscript"){
		item_mc.select_btn.onPress = open;
		GenerateFileListing(contents[k],item_mc);
	}
	
	ArrangeContents(directory_mc);
}

}