Difference between revisions of "Bookclick.as"
m |
m |
||
| Line 13: | Line 13: | ||
// Get mouse coords relative to book middle | // Get mouse coords relative to book middle | ||
| − | + | x = _xmouse-ox; | |
| − | + | y = _ymouse-oy; | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
// Draw page | // Draw page | ||
| Line 55: | Line 22: | ||
moveTo(ox,oy); | moveTo(ox,oy); | ||
lineTo(ox,oy+h); | lineTo(ox,oy+h); | ||
| − | moveTo(ox-w,oy); | + | /*moveTo(ox-w,oy); |
lineTo(ox+Px,oy+Py); | lineTo(ox+Px,oy+Py); | ||
lineTo(ox+Rx,oy+Ry); | lineTo(ox+Rx,oy+Ry); | ||
| Line 70: | Line 37: | ||
lineTo(ox+x,oy+y); | lineTo(ox+x,oy+y); | ||
endFill(); | endFill(); | ||
| − | + | */ | |
| − | + | } | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
var mouseListener = new Object(); | var mouseListener = new Object(); | ||
Revision as of 22:57, 7 December 2006
// Code for [[SWF e-book]] is liscenced under [[[[1]]]] margin = 50;
// This initialises the book page lines createEmptyMovieClip("book",1);
function topRightComplete() {
w = (width-margin*2)/2; h = height-margin*2; ox = margin+w; oy = margin;
// Get mouse coords relative to book middle
x = _xmouse-ox; y = _ymouse-oy;
// Draw page
clear();
lineStyle(3,0);
moveTo(ox,oy);
lineTo(ox,oy+h);
/*moveTo(ox-w,oy);
lineTo(ox+Px,oy+Py);
lineTo(ox+Rx,oy+Ry);
lineTo(ox+Rx,oy+h);
lineTo(ox-w,oy+h);
lineTo(ox-w,oy);
// Draw fold beginFill(0xdddddd,100); moveTo(ox+x,oy+y); lineTo(ox+Px,oy+Py); lineTo(ox+Rx,oy+Ry); lineTo(ox+Qx,oy+Qy); lineTo(ox+x,oy+y); endFill();
- /
}
var mouseListener = new Object();
mouseListener.onMouseDown = topRightComplete;
Mouse.addListener(mouseListener);



