Hy to everybody, i’m new here.
I have a problem with a scripted menu, i sa pop up menu, i’l show you tha code that is on mai main movieClip:
[size=1][color=darkred]onClipEvent (load) {
mainSections = new Array(“femei”, “barbati”, “copii”, “marochinarie”, “accesorii”);
[/color][/size]
[size=1][color=darkred] subSection0 = new Array(“elegant”, “casual”, “sport”);
subSection1 = new Array(“elegant”, “casual”, “sport”);
subSection2 = new Array(“elegant”, “sport”);
subSection3 = new Array(“posete”, “genti”, “voiaj”);
subSection4 = new Array(“curele”, “portofele”, “ciorapi”, “dresuri”, “intretinere”, “diverse”);
[/color][/size]
[size=1][color=darkred] for (i=0; i<mainSections.length; i++) {
attachMovie(“mainButton”, “main”+i, i+100);
myButton = this[“main”+i];
myButton.subs = this[“subSection”+i];
myButton.button.value = mainSections*;
myButton._x = myButton._widthi;
[/color][/size]
[size=1][color=darkred] for (x=0; x<myButton.subs.length; x++) {
myButton.attachMovie(“subButton”, “sub”+x, x);
mySub = myButton[“sub”+x];
mySub.button.value = myButton.subs[x];
mySub.button.outYpos = myButton._height+(mySub._heightx);
}
}
function openSubs(target) {
for (i=0; i<this[target].subs.length; i++) {
subMenuCounter = 0;
this[target][“sub”+i].button.newY = this[target][“sub”+i].button.outYpos;
currentOpen = target;
}
}
function closeSubs(target) {
for (i=0; i<this[target].subs.length; i++) {
this[target][“sub”+i].button.newY = this[target][“sub”+i].button.oYpos;
}
}
function doSubSection(target, sub) {
getURL(_root[target][sub][pic], “_self”);
_root.currentSelection = target+" "+sub;
closeSubs(currentOpen);
}
}
}
onClipEvent (enterFrame) {
subMenuCounter++;
if (subMenuCounter>70) {
closeSubs(currentOpen);
subMenuCounter = 0;
}
}
onClipEvent (mouseUp) {
if (!this.hitTest(_root._xmouse, _root._ymouse)) {
closeSubs(currentOpen);
}
}[/color][/size]
[color=black]The code above generates one button that i’ve created and gives him the values from the arrays.[/color]
This is tha code on my action frame:
[size=1][color=darkred]fscommand(“allowscale”, false);
stop();
this.main0 = new Object()
main0.sub0 = “…/produse/femei_elegant_clasic.html”
main0.sub1 = “…/produse/femei_casual_clasic.html”
main0.sub2 = “…/produse/femei_sport.html”
this.main1 = new Object()
main1.sub0 = “…/produse/barbati_elegant_clasic.html”
main1.sub1 = “…/produse/barbati_casual_clasic.html”
main1.sub2 = “…/produse/barbati_sport.html”
this.main2 = new Object()
main2.sub0 = “…/produse/copii_elegant.html”
main2.sub1 = “…/produse/copii_sport.html”
this.main3 = new Object()
main3.sub0 = “…/produse/marochinarie_posete.html”
main3.sub1 = “…/produse/marochinarie_genti.html”
main3.sub2 = “…/produse/marochinarie_voiaj.html”
this.main4 = new Object()
main4.sub0 = “…/produse/accesorii_curele.html”
main4.sub1 = “…/produse/accesorii_portofele.html”
main4.sub2 = “…/produse/accesorii_ciorapi.html”
main4.sub3 = “…/produse/accesorii_dresuri.html”
main4.sub4 = “…/produse/accesorii_intretinere.html”
main4.sub5 = “…/produse/accesorii_diverse.html”[/color][/size]
[color=black]I’m not to good at this but i just want to be able to add to each button besides a link an action loadMovie .When i click a button to change for each button the picture i have on my main stage.[/color]
Thanks for the attention.