bn1.addEventListener(MouseEvent.MOUSE_OVER,funcOver);
bn1.addEventListener(MouseEvent.MOUSE_OUT,funcOut);

function funcOver(e:MouseEvent) {
   trace(e.target.name);
   bn1.addEventListener(Event.ENTER_FRAME,func,false,0,true);

}

function funcOut(e:MouseEvent) {
   trace(e.target.name);
   bn1.removeEventListener(Event.ENTER_FRAME,func);
}

function func(e:Event) {
   trace("Running as long as mouse is over...");
}

On Fri, Apr 23, 2010 at 1:24 PM, Lehr, Theodore
<[email protected]> wrote:
> How can I have a function called as long as MOUSE_OVER
>
> I am trynig:
>
> bn1.addventListener(MouseEvent.MOUSE_OVER,func);
>
> function func(e:Event) {
>    trace(e.target.name);
> }
>
> I would like it to fire off as long as the mouse is over....
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to