function question
Hi,
I'm kind of learning action script by myself and there are some things about functions that are still dark to me. My question is how do i pass a parametre to a function through an event listener.
i've got this array
var tablTitre:Array = new Array("Spirale //2009", "Stresss //2009", "Eye Candy //2009", "La face du vice //2008", "Le Coeur //2009", "Worse than Agony Logo //2009", "La ville du future //2009");
i've got a few of these:
this.con.img1.addEventListener(MouseEvent.CLICK, texte); // i'd like to know how to pass the parametre here
that call this function
function texte(e:Event):void //and to know the syntax to use the parametre
{
//titre=true;
var choisi:MovieClip = MovieClip(e.currentTarget);
if (affichage==false)
{
this.titre.txt_titre.text=tablTitre[1]; //i'd like to use the parametre here to indicate what element of the array to show
affichage==true;
}
if (affichage==true)
{
this.titre.txt_titre.text="choisir un oeuvre";
affichage=false;
}
}
}
It's quite simple really i just need some syntax help. I realy dont get the (e:Event):void thing.
thanks in advance for those generous souls!