PDA

View Full Version : Please Help!



tommy69
August 8th, 2003, 06:49 AM
Hi, i'm having problem trying not to open up a new frame everytime i click on the sub-headings. Here's the demo (http://www.geocities.com/sorro9/demo.html) so you know what i'm talking about 'coz i'm not very good at explaining :)
The following is the actionscript used in flashMX...please help me i really need this to get started. Any help would be greatly appreciated.

traguardo = new Array(n.length);
traguardof = new Array(fields.length);
inizio = new Array(n.length);
function traguardi() {
cont = 0;
for (i=0; i<n.length; i++) {
nome = "oggetto"+i;
if (i>tasto) {
traguardo[i] = (i+n[tasto])*16+1;
for (a=cont; a<cont+n[i]; a++) {
traguardof[a] = traguardo[i];
}
cont = a;
} else if (i<tasto) {
traguardo[i] = inizio[i];
for (a=cont; a<cont+n[i]; a++) {
traguardof[a] = traguardo[i];
}
cont = a;
} else if (i == tasto) {
traguardo[i] = inizio[i];
for (a=cont; a<cont+n[i]; a++) {
if (a == cont) {
prima = a-1;
}
traguardof[a] = 16*(a-prima)+traguardo[i];
}
cont = a;
}
}
}
clip._visible = 0;
clip1._visible = 0;
cont = 0;
for (i=0; i<n.length; i++) {
nome = "oggetto"+i;
duplicateMovieClip(_root.clip, nome, i+100);
traguardo[i] = i*16+1;
inizio[i] = i*16+1;
_root[nome].tasto = i;
_root[nome]._y = i*16+1;
_root[nome].title = titoli[i];
for (a=cont; a<cont+n[i]; a++) {
nome1 = "oggettonuovo"+a;
duplicateMovieClip(_root.clip1, nome1, a);
traguardof[a] = i*16+1;
_root[nome1].field = a;
_root[nome1].link = links[a];
_root[nome1]._y = traguardo[i];
_root[nome1].title = fields[a];
}
cont = a;
}
function spegni() {
cont = 0;
for (i=0; i<n.length; i++) {
nome = "oggetto"+i;
_root[nome].gotoAndStop(1);
}
spegni1();
}
function spegni1() {
for (i=0; i<fields.length; i++) {
nome = "oggettonuovo"+i;
_root[nome].gotoAndStop(1);
}
}
function chiudi() {
cont = 0;
for (i=0; i<n.length; i++) {
nome = "oggetto"+i;
_root[nome].gotoAndStop(1);
traguardo[i] = inizio[i];
for (a=cont; a<cont+n[i]; a++) {
traguardof[a] = traguardo[i];
nome1 = "oggettonuovo"+a;
_root[nome1].gotoAndStop(1);
}
cont = a;
}
}

pom
August 8th, 2003, 06:56 AM
Don't paste so much code at once, it's very hard to read. Also, I don't think that the onPress event is declared in the piece of code you gave here, so it's probably inside a clip that you're attaching/duplicating.

pom :)

claudio
August 8th, 2003, 08:45 AM
If im not mistaken, ive modified that menu in another thread.
Check if that helps.
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=28389&perpage=15&highlight=menu&pagenumber=3

tommy69
August 8th, 2003, 05:25 PM
Thanks guys....yes claudio you're right...that's where i got this menu from. oh my! i'm not sure if the answer is there already with the thread you've given. ok, i don't want a lot of windows opening up everytime i click on a subheading. what i want is once you click on a subheading, the old window disapear being replaced by the new window. The demo i gave above probably demonstrates better if you keep clicking on the subheadings. If possible, where exatly do i need to put the actionscript? I'll be a very happy man if i get this right. Hope that explains a lot clearer. thanks

tommy69
August 8th, 2003, 06:18 PM
problem solve :sure: On the submenu MC i change;

on(release){
_root.spegni1();
gotoAndStop(5);
getURL(link,"blank");
}

to

on(release){
_root.spegni1();
gotoAndStop(5);
getURL(link,"_self");
}

simple as that! :)

anyway thanks again guys for your help

claudio
August 9th, 2003, 03:40 PM
:thumb: