Skip to main content
Participant
March 24, 2010
Answered

A Simple thing: how to write a simple event listener?

  • March 24, 2010
  • 1 reply
  • 426 views

Hello,

First, please understand that I am a n00b and therefore might get terminology etc. wrong.

I am developing for Scaleform (therefore authoring in ActionScript 2.0 for Flash Player 8).

I have a movie clip on stage which is a stack of buttons.

I want to create a simple test, I want a function to fire when the mouse is rolled OFF the BtnList movie clip.

How do I do it?

Here is my current, not-working code:


_root.BtnList.addEventListener(MouseEvent.MOUSE_OUT, EnableToggleCycle);

function EnableToggleCycle(event:MouseEvent):void
{
trace("EnableToggleCycle triggered");
}

Au secours!

Gracias,

-Rick.

This topic has been closed for replies.
Correct answer kglad

you're using some as3 code.  that won't for for fp8.

use as2 code:

_root.BtnList.onRollOut=function(){

trace("triggered");

}

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
March 24, 2010

you're using some as3 code.  that won't for for fp8.

use as2 code:

_root.BtnList.onRollOut=function(){

trace("triggered");

}

Participant
March 24, 2010

sweet, this works. Thank you.

fwiw, I find it very hard to find simple, legible documentation about all this. Where do I start?

(And ideally, I would prefer documentation that's legible to mere Mortals and not solely hardcore developers!)

Thanks again,

</r>

kglad
Community Expert
Community Expert
March 24, 2010

the flash help files are pretty good.

but, if you're a novice, you should probably skip as2 and go directly to learning as3.