AS3 problems addChild and addEventListener

hello,

i got serious problems with my code. it was an old version of a game (written ins as2).

i needed it in as3 and reprogrammed everything. but still i got problems with addChild and addEventListener functions.

like this:

titleScreen = parentTL.addChild(new FTitleScreen()); 

titleScreen.addEventListener("EventCloseTitleScreen", EventCloseTitleScreen);

scoreboard = parentTL.addChild(new FScoreBoard());

textIntro.addEventListener("EventTextIntroComplete", this);

this.addEventListener("Display", textIntro);

this.removeEventListener("Display", textIntro);


should be something simple, what i dont know … :eye:

can anybody rescue me???

i don’t need a bag, just some answers for AS3 … can anybody help me, please?

What exactly is the problem? The only problem I see is with the line:

textIntro.addEventListener(“EventTextIntroComplete”, this);

you can’t pass this as a event handler. It has to be a function that takes an event as a parameter.

every line i posted above makes problems.

what exactly i should do? write a function for the eventlistener?