OH, well sweet deal.
GTK

Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com

On Jul 2, 2009, at 10:33 PM, Gustavo Duenas LRS wrote:

Ok I got it.

the problem was that I got my buttons which were movieClips named the same as functions, I've just changed the name from about() to aboutUs() and now it is working, thank you.

Gustavo
On Jul 2, 2009, at 11:18 PM, Gustavo Duenas LRS wrote:

Ok I've tried just what you say and now I HAVE IMCOMPATIBLE OVERRIDE AND DUPLICATE FUNCTION DEFINITION, SOMEONE HELP ME PLEASE!!!

GUSTAVO

On Jul 2, 2009, at 10:44 PM, Karl DeSaulniers wrote:

Hey there Gus,
I think you just had a couple of things typed wrong. Try this:

//declare your functions before the onClick

function about():Void{//you had a lowercase "void" here it needs to be "Void"
        //do something
}
function commercial():Void {//you didn't have a "Void" here
        //do something
}
function contact():Void {//you had a lowercase "void" here it needs to be "Void"
        //do something
}

function onClick(e:MouseEvent):Void {//you had a lowercase "void" here, I think it needs to be "Void", plus you had "mouseEvent" and I think it needs to be "MouseEvent"
        if (e.currentTarget.name == "about") {
                about();
        } else if (e.currentTarget.name == "contact") {
                contact();
        } else if (e.currentTarget.name == "commercial") {
                commercial();
        } else {
                gotoAndPlay(3);
        }
}

HTH

Karl DeSaulniers
Design Drumm
http://designdrumm.com

On Jul 2, 2009, at 9:03 PM, Gustavo Duenas LRS wrote:

Hi coders I have this code

this is an onclick function


function onClick(e:mouseEvent):void{

if(e.currentTarget.name =="about"){
about();
}else if(e.currentTarget.name=="contact"){
contact();
}else if(e.currentTarget.name=="commercial"){
commercial();
}else{ gotoAndPlay(3);}
}

function about():void{
do something
}
function commercial(){
do something
}
function contact():void{
do something}

Well the problem is that anytime I'm running through the flash, it gets me an odd error like an 1021: Duplicate function

does anyone can see what is wrong there and what am I missing?

Gustavo
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to