Hi,
my problem is that my onPress function doesn´t want to work.
Here´s the script:
import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse,FuseFMP);
ZigoEngine.register(FuseItem,Fuse, FuseFMP, PennerEasing);
CreateMainMenu = function(x, y, depth, menu_xml){
GenerateMenu(this, "mainmenu_mc", x, y, depth, menu_xml.firstChild);
};
GenerateMenu = function(container, menuname, x, y, depth, xml_element) {
var akt_eintrag;
var akt_menu = container.createEmptyMovieClip(menuname, depth);
for (var i=0; i<xml_element.childNodes.length; i++) {
akt_eintrag = akt_menu.attachMovie("menueintrag","eintrag"+i, i);
akt_element = xml_element.childNodes*;
akt_eintrag.menuname.text = akt_element.attributes.name;
if (xml_element.childNodes*.nodeName == "menu"){
// Untermenü Öffnen (durch Rekursiven Aufruf)
akt_eintrag._x = x + i*akt_eintrag._width;
akt_eintrag._y = y;
akt_eintrag.onRollOver = function (fixhilite)
{
if (!fixhilite)
this.writeFilter(new GlowFilter(0xffffff, 100, 0, 0, 0, 3, false, false));
this.tween(["Glow_blurX", "Glow_blurY", "Glow_strength"], [6, 5, 4], 0.2, "easeOutCirc");
};
akt_eintrag.onRollOut = akt_eintrag.onDragOut = function(){
// Ursprüngliche Einfärbung wiederherstellen
this.tween(["Glow_blurX", "Glow_blurY", "Glow_strength"], [0, 0, 0], 0.3, "linear", 0, "this.removeFilter(GlowFilter)");
};
akt_eintrag.onPress = function ()
{
hilite(this);
};
hilite = function (index)
{
f = 0;
while (f < xml_element.childNodes.length)
{
akt_eintrag.onRollOut();
akt_eintrag.enabled = false;
++f
}
akt_eintrag.onRollOver(true);
akt_eintrag.enabled = false;
};
};
};
};
Aktionen = new Object();
Aktionen.message = function(msg){
ausgabe_txt.text = msg;
};
Aktionen.gotoURL = function(urlVar){
getURL(urlVar, "_blank");
};
Aktionen.newMenu = function(menuxml){
menu_xml.load(menuxml);
};
menu_xml = new XML();
menu_xml.ignoreWhite = true;
menu_xml.onLoad = function(status){
if (status){
CreateMainMenu(10, 10, 0, this);
ausgabe_txt.text = "loaded...";
}else{
ausgabe_txt.text = "error!";
}
};
menu_xml.load("menu2.xml");
the hilite function should let the buttons disable or not, but it just will not work…
can someone help out?
Thanks
gimmig