Function not working

I’m making a little quiz for school. And a function I used just the other day isn’t working. Why not.:q:


stop();
countries(c1,"Morocco",p1);
//more African countries.
function countries(box,count,countx){
     if(box==count){
          countx=1;
     }else{
      countx=0;
}

That’s all on frame 1.
On frame one there’s also an imput text box with the instance name c1, and a next frame button.
On the next frame I have a dynamic text box witht he instance name total.
frame 2 has the AS


//imagine p1+p2+p3+p4
toatal.text=p1
}

Why dosen’t this work?

first of all, you posted this like 5 times

second, you are calling a function before it’s defined

you can call functions before they are defined, but in flash 8 you must define the type of variables like:
function you_have_posted_it_5_times_noob(ban:boolean){
if (!ban) ban=true;
}

lol nice

to that i say:

onEnterForums = function() {
   if (it_happens_again){
      you_have_posted_it_5_times_noob(1);
   }
};

onEnterThisThread=function(){
     if (Catalist=shammed){
            Catalist=null;
     }
}

Only if they are defined as function myFunction(){} and not as myObj.myFunction = function(){}

No you don’t :slight_smile:

canadian :angel:

m’kay :huh: