Welcome, Guest
  • Author Topic: addEventListener??  (Read 3480 times)

    frederico

    • Server what's that
    • *
    • Posts: 42
      • View Profile
      • Email
    addEventListener??
    « on: 12/21/04, 06:52 »
      hi!

    i have use an datagrid with cellrenderer api..and i want put a event like

    listener = new Object();
    listener.mouseover= function(evt)

    {
    Alert.show("mouseover")
    };

    datagrid.addEventListener("mouseover", listener);



    But the mouseover don't exits...i only know..Cellpress..change..click..how can i put an event for mouseover  in the datagrid??... and for the checkbox to...



    frederico Rodrigues

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re:addEventListener??
    « Reply #1 on: 12/21/04, 07:51 »
    Since the datagrid is a MovieClip, the thing is much easier:

    datagrid.onRollOver = function(){ trace("RollOver") }

    Jorge

    frederico

    • Server what's that
    • *
    • Posts: 42
      • View Profile
      • Email
    Re:addEventListener??
    « Reply #2 on: 12/21/04, 09:24 »

    this works fine..but i loose the efect in the row...
    i can solve this?


    thanks

    Frederico

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re:addEventListener??
    « Reply #3 on: 12/21/04, 10:41 »
    Use itemRollOver event, i.e

    listenerObject = new Object();
    listenerObject.itemRollOver = function(eventObject){
       trace("itemRollOver !!")
    }
    myGrid.addEventListener("itemRollOver", listenerObject)

    Jorge

    nicetim

    • Server what's that
    • *
    • Posts: 6
      • View Profile
    Re: addEventListener??
    « Reply #4 on: 01/11/06, 18:58 »
    Jorge,
     What is in the eventObject in your last post?
    from that object can i get the currently mousedOver cell data?

    thanks
    Tim

    ..:: Mazhar Hasan ::..

    • Moderator
    • Systems Administrator
    • *****
    • Posts: 828
    • Cheers
      • View Profile
      • SyedMazharHasan.com
    Re: addEventListener??
    « Reply #5 on: 01/12/06, 08:08 »
    the eventobject is the object that triggered the listener. It varies in case-2-case. It may be your datagrid when you rollover the datagrid, and it may be the cell itself when you move your mouse our a cell.
    Your wish is my command