Bookclick.as
// 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);



