Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reversing Your Mouse

Status
Not open for further replies.

garrisonwong

Programmer
Nov 2, 2006
1
0
0
CA
Hi,

I'm fairly new to director and these forums as well. However I've done a search on these forums and I cannot seem to find anything about inversing/reversing mouse movements with director.

I'm trying to program a shockwave interactivity for a replication of a psychology experiment for a website.

Individuals will have to trace a path along a star without going out of the boundaries. However, the original experiment had subjects looking at the star (and their hand) in a mirror.

So in essence, they had to move their hands backwards. I'm trying to emulate this inversion in a director movie. Is this possible?

Thank you people in advance for your help regarding this topic

Cheers,
Garry
 
This script hides the cursor, puts the dummy cursor on Stage and moves it to the opposite of the mouse.

In this example the dummy cursor graphic is in the member slot 1, and the mask graphic is in the member slot 2.

Code:
-- Movie script
global gSp, gStageW, gStageH

on startMovie me
  stageRect = _movie.stage.rect
  gStageW = stageRect[3] - stageRect[1]
  gStageH = stageRect[4] - stageRect[2]
  _movie.cursor(200)
  gSp = sprite(1)
  gSp.puppet = true
  gSp.member = member(1)
  gSp.ink = 9
end startMovie

on enterFrame me
  gSp.locV = gStageH - _mouse.mouseV
  gSp.locH = gStageW - _mouse.mouseH
end enterFrame


Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top