Boiler Plates
import java.applet.*;
import java.awt.*;
import java.net.*;
import com.ms.dxmedia.*;
public class FifteenPuzzle extends DXMApplet {
public void init() {
super.init() ;
_model = new FifteenPuzzleModel(getCanvas());
setModel(_model);
}
private FifteenPuzzleModel _model;
}
class FifteenPuzzleModel extends Model {
FifteenPuzzleModel(Viewer viewedOn) {
Hang onto this for synchronization. |
_viewedOn = viewedOn;
}
Methods to trigger the AppTriggeredEvents,
are called from DXMApplet. |
public void toggleGeomProjection() { _toggleGeomProjection.trigger(); }
public void toggleImageUsed() { _toggleImageUsed.trigger(); }
public void resetPuzzle() { _puzz.resetImage(); }
Use this event which originates from VBScript to toggle
between direct image and fan. |
AppTriggeredEvent _toggleGeomProjection;
Use this event which originates from VBScript to toggle
between the different images for the puzzle. |
AppTriggeredEvent _toggleImageUsed;
PuzzleLogic _puzz;
Viewer _viewedOn;
URL _mediaBase;
URL _sndBase;
URL _movieBase;
URL _geoBase;
}
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.