Hi Michael,

I've played a bit around with it, those mouse callbacks work if you put
a dummy flash sprite on the stage (swf can be absolutely empty), and use
code like

on startMovie
  global gWheel
  global gWheelListener
  gWheel = sprite(1).getVariable("Mouse", 0)
  gWheelListener = newObject("Object")
  sprite(1).setCallback( gWheelListener, "onMouseDown", #_mouseDown, 0 )
  sprite(1).setCallback( gWheelListener, "onMouseUp", #_mouseUp, 0 )
  sprite(1).setCallback( gWheelListener, "onMouseMove", #_mouseMove, 0 )
  sprite(1).setCallback( gWheelListener, "onMouseWheel", #_mouseWheel,
0 )
  gWheel.addListener(gWheelListener)
end

on _mouseDown
  put ("mouse down") -- works
end

on _mouseUp
  put ("mouse up") -- works
end

on _mouseMove
  put ("mouse moved") -- works
end

on _mouseWheel
  put ("wheel moved") -- doesn't work :-(
end

mouseDown, Up and Move works if the cursor is over the flash sprite,
unfortunately mouseWheel didn't work at all.

Chees,
Valentin


Mendelsohn, Michael wrote:
> Hi list...
>
> How's everyone?
>
> [PC: Dir & Flash MX2004]  In Flash, there's a Mouse object, where you
> can attach a mouse listener with an onMouseWheel handler to do
> something
> when the user moves the mousewheel.  Nifty, so I thought I'd try to
> apply that through lingo using a global newObject.
>
>   global gWheel
>   global gWheelListener
>   gWheel = newObject("Mouse")
>   gWheelListener = newObject("Object")
>   gWheelListener.onMouseWheel = trace("moved wheel")
>   gWheel.addListener(gWheelListener)
>
> The problem is that gWheelListener inits, but gWheel doesn't.  Is
> there
> a way you can get a reference to Flash's Mouse object through Lingo
> using newObject?
>
> I know about Magic Modules wheelMouse xtra, but I thought there could
> be
> many, many applications to use this if it's not limited to fields off
> the side of the stage.
>
> thanks,
> - Michael M.
>
>
> [To remove yourself from this list, or to change to digest mode, go
> to http://www.penworks.com/lingo-l.cgi  To post messages to the list,
> email [email protected]  (Problems, email
> [EMAIL PROTECTED]). Lingo-L is for learning and helping with
> programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to