aqui les dejo el codigo q uso
Código PHP:
import mx.containers.Window;
navbar_mc.go_btn.onPress = gotoPage;
navbar_mc.next_btn.onPress = nextPage;
navbar_mc.prev_btn.onPress = prevPage;
function gotoPage() {
if( zoomed )return;
var destPageNumber = Number(navbar_mc.page_number_txt.text);
if (!isNaN(destPageNumber)) {
myBook.flipGotoPage(destPageNumber);
}
}
function nextPage() {
if( zoomed )return;
myBook.flipForward();
}
function prevPage() {
if( zoomed )return;
myBook.flipBack();
}
// Popup size
popup_width = 527;
popup_height = 400;
// Zooming settings
zooming = false;
zoom_panel_mc.zoom_btn.onPress = startZoomingMode;
myBook.onClick = bookClick;
function startZoomingMode() {
myBook.flipOnClickProp = false;
myBook.autoFlipProp = 0;
showZoomPointer();
zooming = true;
}
function bookClick(pageNumber, page_mc, isCornerClick) {
if (!zooming) {
return;
}
var page_url = page_mc.URL;
if (page_url != undefined) {
open_popup(page_url, pageNumber);
} else {
zooming = false;
myBook.flipOnClickProp = true;
myBook.autoFlipProp = 50;
hideZoomPointer();
}
}
function open_popup(page_url, pageNumber) {
if (zoom_win != undefined) {
return;
}
hideZoomPointer();
zoom_win = mx.managers.PopUpManager.createPopUp(_root, Window, true, {title:"Página: " + pageNumber, closeButton:true});
zoom_win.createObject("ScrollPane", "zoom_pane", 0, {contentPath:page_url, _x:3, _y:31});
zoom_win.setSize(popup_width, popup_height);
zoom_win.zoom_pane.setSize(popup_width-6, popup_height-31);
listenerObject = new Object();
listenerObject.click = closeWindow;
zoom_win.addEventListener("click", listenerObject);
zoom_win._x = Stage.width/2-popup_width/2;
zoom_win._y = Stage.height/2-popup_height/2;
}
function closeWindow(eventObject:Object) {
zoom_win.deletePopUp();
zooming = false;
delete zoom_win;
myBook.flipOnClickProp = true;
myBook.autoFlipProp = 50;
}
function showZoomPointer() {
Mouse.hide();
attachMovie("ZoomIcon", "zoom_icon_mc", 0);
zoom_icon_mc.onEnterFrame = function() {
this._x = _xmouse;
this._y = _ymouse;
};
}
function hideZoomPointer() {
Mouse.show();
delete zoom_icon_mc.onEnterFrame;
zoom_icon_mc.removeMovieClip();
}