Modify Exercise 30.10 to rotate the cube in response to the user moving the mouse. The cube should rotate in the direction the user drags the mouse. [Hint: Use the ONMOUSEDOWN event to determine when the user begins a drag and use the ONMOUSEUP event to determine when the drag operation terminates.]

What will be an ideal response?

```
1
2
3
4
5
6 Solution: 30.12
7
8
9
46
47
48
49 50 ONMOUSEMOVE = "changeDirection()" ONMOUSEUP = "resetFlag()">
51 53 CLASSID = "CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">
54
55 56 VALUE = "SetLineColor( 0, 0, 0 )">
57 58 VALUE = "SetLineStyle( 1, 1 )">
59 60 VALUE = "SetFillStyle( 0 )">
61
62 63 VALUE = "Rect( -50, -50, 100, 100, 0 )">
64 65 VALUE = "Polygon( 4, -100, 0, -50, -50, -50, 50, -100, 100 )">
66 67 VALUE = "Polygon( 4, -100, 0, -50, -50, 50, -50, 0, 0 )">
68 69 VALUE = "Polygon( 4, -50, 50, 50, 50, 0, 100, -100, 100 )">
70 71 VALUE = "Polygon( 4, 0, 0, 50, -50, 50, 50, 0, 100 )">
72 73 VALUE = "Rect( -100, 0, 100, 100, 0 )">
74
75

76
77
```

Computer Science & Information Technology

You might also like to view...

All social networking sites have a specialized audience.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

A name server can only host one DNS domain.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology