perdon esk no le habia publicado el AS ok aclaro el codigo del script no es mio solo necesito saber k parte necesito para k me cargue el xml y para cargar los swf externos gracias espero k aya algun samaritano k me ayude
Código ActionScript :
function Compose()
{
menu._y = Stage.height - menu_bg_height;
menu._x = 0;
if (menu_shadow == "true")
{
var _loc1 = new flash.filters.DropShadowFilter(2, 270, 0, 2.000000E-001, 5, 5, 1, 3, false, false, false);
menu.filters = [_loc1];
} // end if
myTween = new mx.transitions.Tween(menu.menu_bg, "_width", mx.transitions.easing.Strong.easeOut, getProperty(menu.menu_bg, _width), Stage.width, 1.500000E+000, true);
new mx.transitions.Tween(menu, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(menu, _alpha), menu_bg_alpha, 2, true);
myTween.onMotionFinished = function ()
{
buildMenu();
if (menu_line_visibility == "true")
{
menu.menu_line._height = menu_line_height;
menu.menu_line._y = menu_line_y;
menu.menu_line._x = menu_line_x;
new mx.transitions.Tween(menu.menu_line, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(menu.menu_line, _alpha), 100, 2, true);
} // end if
if (socials == "true")
{
footer.socials_loader._y = 8;
footer.socials_loader.loadMovie("data/swf/socials.swf");
} // end if
console._alpha = 0;
console._x = Stage.width - 80;
new mx.transitions.Tween(console, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(console, _alpha), 100, 2, true);
new mx.transitions.Tween(console, "_y", mx.transitions.easing.Strong.easeOut, getProperty(console, _y), 20, 2, true);
buildAreaText();
};
} // End of the function
function buildMenu()
{
if (i < numProj)
{
var container = menu.menu_loader.createEmptyMovieClip("container" + i, i + 1);
var _loc2 = new TextFormat();
_loc2.font = "trebuchet";
_loc2.size = 12;
_loc2.color = Home.childNodes[i].attributes.color;
var my_txt = container.createTextField("my_txt", i + 50, i * menuColumnsWidth, 0, 0, 240);
my_txt.antiAliasType = "advanced";
my_txt.autoSize = "left";
my_txt.embedFonts = true;
my_txt.selectable = false;
my_txt.setNewTextFormat(_loc2);
my_txt.multiline = false;
my_txt.wordWrap = false;
my_txt.text = Home.childNodes[i].attributes.title;
my_txt.active = Home.childNodes[i].attributes.active;
my_txt.colorOut = Home.childNodes[i].attributes.color;
my_txt.colorOver = Home.childNodes[i].attributes.colorOver;
my_txt.file = Home.childNodes[i].attributes.file;
my_txt.bg = Home.childNodes[i].attributes.bg;
my_txt.Type = Home.childNodes[i].attributes.typology;
var _loc3 = new mx.transitions.Tween(container, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 1, true);
e = 0;
buildItems_SI = setInterval(buildItems, 100);
container.enabled = false;
++i;
if (my_txt.active == "true")
{
container.onRollOver = function ()
{
container.my_txt.textColor = my_txt.colorOver;
s.start();
};
container.onRollOut = function ()
{
container.my_txt.textColor = my_txt.colorOut;
};
container.onRelease = function ()
{
if (my_txt.Type == "link")
{
getURL(my_txt.file, "_blank");
}
else
{
typology = my_txt.Type;
bgToLoad = bgPath + my_txt.bg;
sectionLoading = my_txt.text;
Section(swfPath + my_txt.file);
disableFunction(this);
colorText = my_txt.colorOver;
} // end else if
};
} // end if
}
else if (i == numProj)
{
btnSelect = menu.menu_loader.container0;
colorText = Home.childNodes[0].attributes.colorOver;
enableFunction();
} // end else if
} // End of the function
function disableFunction(Selected)
{
var _loc3 = 250;
for (var _loc1 = 0; _loc1 < Home.childNodes[_loc1].childNodes.length; ++_loc1)
{
menu.menu_loader["container" + _loc1].enabled = false;
menu.menu_loader["container" + _loc1].my_txt.textColor = Home.childNodes[_loc1].attributes.color;
for (var _loc2 = 0; _loc2 < 5; ++_loc2)
{
menu.menu_loader["item" + _loc3].enabled = false;
menu.menu_loader["item" + _loc3].item_txt.textColor = Home.childNodes[_loc1].childNodes[_loc2].attributes.color;
++_loc3;
} // end of for
} // end of for
btnSelect = Selected;
} // End of the function
function enableFunction()
{
var _loc3 = 250;
for (var _loc1 = 0; _loc1 < itemsNumber; ++_loc1)
{
menu.menu_loader["container" + _loc1].enabled = true;
menu.menu_loader["container" + _loc1].my_txt.textColor = Home.childNodes[_loc1].attributes.color;
for (var _loc2 = 0; _loc2 < Home.childNodes[_loc1].childNodes.length; ++_loc2)
{
menu.menu_loader["item" + _loc3].enabled = true;
menu.menu_loader["item" + _loc3].item_txt.textColor = Home.childNodes[_loc1].childNodes[_loc2].attributes.color;
++_loc3;
} // end of for
} // end of for
btnSelect.enabled = false;
btnSelect.my_txt.textColor = colorText;
btnSelect.item_txt.textColor = colorText;
} // End of the function
function buildItems()
{
category = i - 1;
total = Home.childNodes[category].childNodes.length;
if (e < total)
{
var item = menu.menu_loader.createEmptyMovieClip("item" + Level, Level + 1);
var _loc2 = new TextFormat();
_loc2.font = "ronda";
_loc2.size = 8;
_loc2.color = Home.childNodes[category].childNodes[e].attributes.color;
item._y = int(menuSpace_title_item);
var item_txt = item.createTextField("item_txt", level + 50, int((i - 1) * menuColumnsWidth), int(menu_item_distance * e), 0, 240);
item_txt.autoSize = "left";
item_txt.embedFonts = true;
item_txt.selectable = false;
item_txt.setNewTextFormat(_loc2);
item_txt.multiline = false;
item_txt.wordWrap = false;
item_txt.text = Home.childNodes[category].childNodes[e].attributes.title;
item_txt.colorOut = Home.childNodes[category].childNodes[e].attributes.color;
item_txt.colorOver = Home.childNodes[category].childNodes[e].attributes.colorOver;
item_txt.file = Home.childNodes[category].childNodes[e].attributes.file;
item_txt.bg = Home.childNodes[category].childNodes[e].attributes.bg;
item_txt.Type = Home.childNodes[category].childNodes[e].attributes.typology;
item.onRollOver = function ()
{
item.item_txt.textColor = item_txt.colorOver;
s.start();
};
item.onRollOut = function ()
{
item.item_txt.textColor = item_txt.colorOut;
};
item.onRelease = function ()
{
if (item_txt.Type == "link")
{
getURL(item_txt.file, "_blank");
}
else
{
typology = item_txt.Type;
bgToLoad = bgPath + item_txt.bg;
sectionLoading = item_txt.text;
Section(swfPath + item_txt.file);
disableFunction(this);
colorText = item_txt.colorOver;
} // end else if
};
++e;
++Level;
}
else
{
clearInterval(buildItems_SI);
buildMenu();
} // end else if
} // End of the function
function buildAreaText()
{
if (text1_menu_area != "no" && text2_menu_area != "no")
{
var _loc4 = new TextFormat();
_loc4.font = "trebuchet";
_loc4.size = 11;
_loc4.color = text1_menu_area_color;
var _loc1 = menu.text_loader.createTextField("text1", 1, text1_menu_x, text1_menu_y, text_menu_area_width, 0);
_loc1._alpha = 0;
new mx.transitions.Tween(_loc1, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(_loc1, _alpha), 100, 2, true);
_loc1.antiAliasType = "advanced";
_loc1.autoSize = "left";
_loc1.embedFonts = true;
_loc1.selectable = false;
_loc1.setNewTextFormat(_loc4);
_loc1.multiline = true;
_loc1.wordWrap = true;
_loc1.text = text1_menu_area;
var _loc3 = new TextFormat();
_loc3.font = "ronda";
_loc3.size = 8;
_loc3.color = text2_menu_area_color;
var _loc2 = menu.text_loader.createTextField("text2", 2, text2_menu_x, text2_menu_y, text_menu_area_width, 0);
_loc2._alpha = 0;
new mx.transitions.Tween(_loc2, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(_loc2, _alpha), 100, 2, true);
_loc2.autoSize = "left";
_loc2.embedFonts = true;
_loc2.selectable = false;
_loc2.setNewTextFormat(_loc3);
_loc2.multiline = true;
_loc2.wordWrap = true;
_loc2.text = text2_menu_area;
} // end if
} // End of the function
function organize()
{
footer._y = Stage.height - footer._height;
footer.footer_bg._width = Stage.width;
footer.line._width = Stage.width;
footer.footer_bg._alpha = footer_alpha;
loading_bar._x = 0;
loading_bar._y = Stage.height - menu_bg_height - loading_bar._height;
menu.menu_bg._width = Stage.width;
menu._y = int(Stage.height - menu_bg_height);
menu._x = 0;
footer.socials_loader._x = Stage.width - socials_x - 10;
console._x = Stage.width - 80;
console._y = 25;
} // End of the function
function reImageBG()
{
bg_holder._xscale = 100;
bg_holder._yscale = 100;
rap0 = Math.max(Stage.width / bg_holder._width, Stage.height / bg_holder._height);
if (rap0 == null || rap0 == 0 || rap0 == Infinity)
{
rap0 = 1;
} // end if
bg_holder._xscale = 100 * rap0;
bg_holder._yscale = 100 * rap0;
} // End of the function
function PageAlign()
{
page_holder._x = Math.round(Stage.width / 2 - page_holder._width / 2);
page_holder._y = Math.round(Stage.height / 2 - page_holder._height / 2 - 50);
} // End of the function
function loadBGSmoothed(url)
{
var _loc5 = target.createEmptyMovieClip("bmc", target.getNextHighestDepth());
var _loc2 = new Object();
_loc2.tmc = target;
_loc2.onLoadInit = function (mc)
{
var _loc2 = new flash.display.BitmapData(mc._width, mc._height, true);
this.tmc.attachBitmap(_loc2, this.tmc.getNextHighestDepth(), "auto", true);
_loc2.draw(mc);
reImageBG();
bg_holder._alpha = 0;
new mx.transitions.Tween(bg_holder, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(bg_holder, _alpha), bgAlpha, 30, false);
enableFunction();
new mx.transitions.Tween(loading_bar, "_width", mx.transitions.easing.Strong.easeOut, getProperty(loading_bar, _width), 0, 2, true);
new mx.transitions.Tween(loading_bar, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(loading_bar, _alpha), 0, 2, true);
};
_loc2.onLoadProgress = function (mc, bytesLoaded, bytesTotal)
{
new mx.transitions.Tween(loading_bar, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(loading_bar, _alpha), 100, 2, true);
loading_bar._width = int(bytesLoaded / bytesTotal * Stage.width + 10);
};
var _loc4 = new MovieClipLoader();
_loc4.addListener(_loc2);
_loc4.loadClip(url, bg_holder);
} // End of the function
function Section(sectionToLoad)
{
if (typology == "home")
{
homeSection = true;
clearInterval(loadSlide_SI);
new mx.transitions.Tween(menu_bg, "_y", mx.transitions.easing.Strong.easeInOut, getProperty(menu_bg, _y), menu_y, 1.500000E+000, true);
new mx.transitions.Tween(menu_bg.base, "_width", mx.transitions.easing.Strong.easeInOut, getProperty(menu_bg.base, _width), widthMenu, 1.500000E+000, true);
new mx.transitions.Tween(gallery_holder, "_alpha", mx.transitions.easing.Strong.easeInOut, getProperty(gallery_holder, _alpha), 0, 1.500000E+000, true);
new mx.transitions.Tween(page_holder, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(page_holder, _alpha), 0, 30, false);
new mx.transitions.Tween(pattern_loader, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(pattern_loader, _alpha), grill_alpha, 30, false);
var _loc1 = new mx.transitions.Tween(bg_holder, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(bg_holder, _alpha), 0, 30, false);
_loc1.onMotionFinished = function ()
{
bg_holder.unloadMovie();
page_holder.unloadMovie();
gallery_holder.unloadMovie();
loadBG(sectionToLoad);
};
}
else if (typology == "gallery")
{
homeSection = false;
clearInterval(loadSlide_SI);
new mx.transitions.Tween(gallery_holder, "_alpha", mx.transitions.easing.Strong.easeInOut, getProperty(gallery_holder, _alpha), 0, 1.500000E+000, true);
new mx.transitions.Tween(pattern_loader, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(pattern_loader, _alpha), 0, 30, false);
_loc1 = new mx.transitions.Tween(bg_holder, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(bg_holder, _alpha), 0, 30, false);
new mx.transitions.Tween(page_holder, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(page_holder, _alpha), 0, 30, false);
menuAlign();
_loc1.onMotionFinished = function ()
{
clearInterval(loadSlide_SI);
bg_holder.unloadMovie();
bg_holder.removeMovieClip();
page_holder.unloadMovie();
loadGallery(sectionToLoad);
loadBGSmoothed(bgToLoad, bg_holder);
};
}
else if (typology == "video")
{
homeSection = true;
clearInterval(loadSlide_SI);
new mx.transitions.Tween(menu_bg, "_y", mx.transitions.easing.Strong.easeInOut, getProperty(menu_bg, _y), menu_y, 1.500000E+000, true);
new mx.transitions.Tween(menu_bg.base, "_width", mx.transitions.easing.Strong.easeInOut, getProperty(menu_bg.base, _width), widthMenu, 1.500000E+000, true);
new mx.transitions.Tween(gallery_holder, "_alpha", mx.transitions.easing.Strong.easeInOut, getProperty(gallery_holder, _alpha), 0, 1.500000E+000, true);
new mx.transitions.Tween(page_holder, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(page_holder, _alpha), 0, 30, false);
new mx.transitions.Tween(pattern_loader, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(pattern_loader, _alpha), grill_alpha, 30, false);
_loc1 = new mx.transitions.Tween(bg_holder, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(bg_holder, _alpha), 0, 30, false);
_loc1.onMotionFinished = function ()
{
bg_holder.unloadMovie();
page_holder.unloadMovie();
gallery_holder.unloadMovie();
loadBG(sectionToLoad);
};
}
else
{
clearInterval(loadSlide_SI);
homeSection = false;
new mx.transitions.Tween(gallery_holder, "_alpha", mx.transitions.easing.Strong.easeInOut, getProperty(gallery_holder, _alpha), 0, 1.500000E+000, true);
new mx.transitions.Tween(pattern_loader, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(pattern_loader, _alpha), 0, 30, false);
_loc1 = new mx.transitions.Tween(bg_holder, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(bg_holder, _alpha), 0, 30, false);
new mx.transitions.Tween(page_holder, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(page_holder, _alpha), 0, 30, false);
menuAlign();
_loc1.onMotionFinished = function ()
{
bg_holder.unloadMovie();
page_holder.unloadMovie();
gallery_holder.unloadMovie();
loadPage(sectionToLoad);
loadBGSmoothed(bgToLoad, bg_holder);
new mx.transitions.Tween(bg_holder, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(bg_holder, _alpha), bgAlpha, 30, false);
};
} // end else if
} // End of the function
function toggleFullScreen()
{
if (Stage.displayState == "normal")
{
Stage.displayState = "fullScreen";
console.fullscreen.gotoAndStop("selected");
}
else
{
Stage.displayState = "normal";
console.fullscreen.gotoAndPlay(1);
} // end else if
} // End of the function
Stage.showMenu = false;
Stage.align = "TL";
getURL("FSCommand:showmenu", false);
Stage.scaleMode = "noScale";
stop ();
footer._alpha = 0;
var footer_alpha;
var footer_color;
var loading_bar_color;
var i = 0;
var e = 0;
var titleHeigth = 40;
var menuColumnsWidth;
var menuSpace_title_item;
var menu_item_distance;
var itemsNumber;
var htmlPageTitle;
var socials_x;
var btnSelected;
menu._alpha = 0;
var posY = 0;
menu.menu_line._alpha = 0;
footer.footer_bg._width = Stage.width;
footer.line._width = Stage.width;
new mx.transitions.Tween(footer, "_alpha", mx.transitions.easing.Strong.easeInOut, getProperty(footer, _alpha), 100, 2, true);
new mx.transitions.Tween(footer, "_y", mx.transitions.easing.Strong.easeInOut, Stage.height + 30, Stage.height - 35, 2, true);
preloader.loader.text = "Loading xml ";
menuXML = new XML();
menuXML.ignoreWhite = true;
menuXML.onLoad = function (success)
{
if (success)
{
new mx.transitions.Tween(preloader, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(preloader, _alpha), 0, 24, false);
Home = this.firstChild;
itemsNumber = Home.childNodes.length;
numProj = this.firstChild.childNodes.length;
logoHolder._y = Home.attributes.logo_y;
logoHolder._x = Home.attributes.logo_x;
loadLogo(Home.attributes.logo);
footer.footer_text.htmlText = Home.attributes.footerText;
footer.footer_text.textColor = Home.attributes.footer_text_color;
footer_color = Home.attributes.footer_color;
footer_alpha = Home.attributes.footer_alpha;
var _loc3 = new Color("footer.footer_bg");
_loc3.setRGB(footer_color);
menu_bg_color = Home.attributes.menu_bg_color;
menu_bg_height = Home.attributes.menu_bg_height;
menu_bg_alpha = Home.attributes.menu_bg_alpha;
var _loc4 = new Color("menu.menu_bg");
_loc4.setRGB(menu_bg_color);
menu.menu_bg._height = menu_bg_height;
menu.menu_bg._alpha = menu_bg_alpha;
menu.menu_loader._x = Home.attributes.menu_items_x;
menu.menu_loader._y = Home.attributes.menu_items_y;
titleHeigth = Home.attributes.titleHeigth;
menuColumnsWidth = Home.attributes.menuColumnsWidth;
menuSpace_title_item = Home.attributes.menuSpace_title_item;
menu_item_distance = Home.attributes.menu_item_distance;
menu_line_color = Home.attributes.menu_line_color;
menu_line_height = Home.attributes.menu_line_height;
menu_line_x = Home.attributes.menu_line_x;
menu_line_y = Home.attributes.menu_line_y;
menu_line_visibility = Home.attributes.menu_line_visibility;
var _loc2 = new Color("menu.menu_line");
_loc2.setRGB(menu_line_color);
loading_bar._alpha = 0;
loading_bar._x = 0;
loading_bar._y = Stage.height - menu_bg_height - loading_bar._height;
loading_bar_color = Home.attributes.loading_bar_color;
var _loc5 = new Color("loading_bar");
_loc5.setRGB(loading_bar_color);
socials = Home.attributes.socials;
swfPath = Home.attributes.swfPath;
introfile = Home.attributes.introfile;
menu_shadow = Home.attributes.menu_shadow;
text1_menu_x = Home.attributes.text1_menu_x;
text1_menu_y = Home.attributes.text1_menu_y;
text1_menu_area = Home.attributes.text1_menu_area;
text1_menu_area_color = Home.attributes.text1_menu_area_color;
text2_menu_x = Home.attributes.text2_menu_x;
text2_menu_y = Home.attributes.text2_menu_y;
text2_menu_area = Home.attributes.text2_menu_area;
text2_menu_area_color = Home.attributes.text2_menu_area_color;
text_menu_area_width = Home.attributes.text_menu_area_width;
bgPath = Home.attributes.bgPath;
bgAlpha = Home.attributes.bgAlpha;
grill_alpha = Home.attributes.grill_alpha;
pattern_loader._alpha = grill_alpha;
i = 0;
loadBG(swfPath + introfile);
} // end if
};
menuXML.load("data/xml/home.xml");
_global.loadLogo = function (path)
{
var _loc1 = new Object();
_loc1.onLoadInit = function (target_mc)
{
new mx.transitions.Tween(logoHolder, "_alpha", mx.transitions.easing.Strong.easeInOut, 0, 100, 2, true);
Compose();
};
_loc1.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal)
{
};
var _loc2 = new MovieClipLoader();
_loc2.addListener(_loc1);
_loc2.loadClip(path, logoHolder);
};
var Level = 250;
var Resize = new Object();
Resize.onResize = function ()
{
organize();
reImageBG();
PageAlign();
};
Stage.addListener(Resize);
reImageBG();
_global.loadBG = function (path)
{
bg_holder.unloadMovie();
var _loc1 = new Object();
_loc1.onLoadInit = function (target_mc)
{
reImageBG();
new mx.transitions.Tween(bg_holder, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(bg_holder, _alpha), 100, 24, false);
new mx.transitions.Tween(loading_bar, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(loading_bar, _alpha), 0, 2, true);
enableFunction();
};
_loc1.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal)
{
new mx.transitions.Tween(loading_bar, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(loading_bar, _alpha), 100, 2, true);
loading_bar._width = int(bytesLoaded / bytesTotal * Stage.width + 10);
};
var _loc2 = new MovieClipLoader();
_loc2.addListener(_loc1);
_loc2.loadClip(path, bg_holder);
};
_global.loadPage = function (path)
{
var _loc1 = new Object();
_loc1.onLoadInit = function (target_mc)
{
PageAlign();
new mx.transitions.Tween(page_holder, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 24, false);
new mx.transitions.Tween(loading, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(loading, _alpha), 0, 24, false);
enableFunction();
};
_loc1.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal)
{
new mx.transitions.Tween(loading, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(loading, _alpha), 100, 24, false);
loading.loader.htmlText = "loading: " + sectionLoading + " " + int(bytesLoaded / bytesTotal * 100) + "%";
};
var _loc2 = new MovieClipLoader();
_loc2.addListener(_loc1);
_loc2.loadClip(path, page_holder);
};
_global.loadGallery = function (path)
{
var _loc1 = new Object();
_loc1.onLoadInit = function (target_mc)
{
GalleryAlign();
loading.loader.htmlText = "";
new mx.transitions.Tween(gallery_holder, "_alpha", mx.transitions.easing.Strong.easeInOut, 0, 100, 1, true);
enableFunction();
};
_loc1.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal)
{
loading.loader.htmlText = "loading: " + sectionLoading + " " + int(bytesLoaded / bytesTotal * 100) + "%";
};
var _loc2 = new MovieClipLoader();
_loc2.addListener(_loc1);
_loc2.loadClip(path, gallery_holder);
};
var s = new Sound();
s.loadSound("data/sounds/1.mp3");
s.setVolume(90);
var sound = false;
console.btn_sound.gotoAndStop("closed");
console.btn_sound.enabled = false;
suono = new Sound();
suono.onSoundComplete = function ()
{
this.start();
};
suono_Load = function (a)
{
suono.loadSound(a, false);
this.createEmptyMovieClip("load_mc", this);
load_mc.onEnterFrame = function ()
{
loadingSound = suono.getBytesLoaded();
total = suono.getBytesTotal();
percentuale = int(loadingSound / total * 100);
console.textSound.textSound.text = percentuale + "%";
if (suono.getBytesLoaded() == suono.getBytesTotal())
{
sound = true;
console.btn_sound.gotoAndPlay("open");
console.btn_sound.enabled = true;
console.textSound._visible = false;
suono.start();
suono.setVolume(80);
this.onEnterFrame = "";
} // end if
};
};
suono_Load("data/sounds/bg_music.mp3");
console.btn_sound.onRelease = function ()
{
if (sound)
{
suono.stop();
this.gotoAndPlay("close");
sound = false;
}
else
{
suono.start();
this.gotoAndPlay("open");
sound = true;
} // end else if
};
console.fullscreen.onRelease = function ()
{
toggleFullScreen();
};