Visualizzazione dei risultati da 1 a 8 su 8

Discussione: Solito libro

  1. #1

    Solito libro

    Salve, ho fatto una ricerca ma non ho trovato niente.
    Il mio problema è questo...nel codice del solito libro (QUI )vorrei attivare l'opzione che mi permetta di sfogliare le pagine trascinandole col mouse (nel mio file le pagine girano col clip) ...ma non ci capisco tanto...mi aiutate? il cod è questo:
    codice:
    //  P i X E L W i T . C O M
    //
    #initclip
    function PageFlip() {
    }
    PageFlip.prototype = new MovieClip();
    Object.registerClass("PageFlip", PageFlip);
    PageFlip.prototype.init = function(w, h, pageColor, pages, speed, manual, pageSoundFX) {
    	this.pageRatio = 0;
    	this.pageWi = w;
    	this.pageHi = h;
    	this.pageWiHi = this.pageWi+this.pageHi;
    	this.pivotY = this.pageHi/2+this.pageWi;
    	this.pageColor = pageColor;
    	this.dir = 1;
    	this.flipPage = 1.5;
    	this.curPage = .5;
    	this.pageVect = pages;
    	this.maxPages = pages.length;
    	this.autoStep = (speed != undefined) ? speed : 0.05;
    	this.dragging = false;
    	this.manualFlip = (manual != undefined) ? manual : true;
    	this.flipping = false;
    	this.pageSFX = pageSoundFX;
    	this.attachMovie("cornerButton", "RButton", 11);
    	this.RButton._x = this.pageWi;
    	this.RButton._y = -this.pageWi;
    	this.attachMovie("cornerButton", "LButton", 12);
    	this.LButton._x = -this.pageWi;
    	this.LButton._y = -this.pageWi;
    	this.LButton._xscale = -100;
    	if (this.manualFlip) {
    		this.LButton.onPress = function() {
    			this._parent.startFlip(-1);
    		};
    		this.LButton.onReleaseOutside = function() {
    			this._parent.flipRelease();
    		};
    		this.LButton.onRelease = function() {
    			this._parent.flipRelease();
    		};
    		this.RButton.onPress = function() {
    			this._parent.startFlip(1);
    		};
    		this.RButton.onReleaseOutside = function() {
    			this._parent.flipRelease();
    		};
    		this.RButton.onRelease = function() {
    			this._parent.flipRelease();
    		};
    	} else {
    		this.LButton.onRelease = function() {
    			this._parent.autoFlip(-1);
    		};
    		this.RButton.onRelease = function() {
    			this._parent.autoFlip(1);
    		};
    	}
    	this.pageInit(this.flipPage, this.dir);
    	this._y += this.pivotY;
    };
    PageFlip.prototype.pageInit = function(cp, d) {
    	this.flipPage = cp;
    	this.dir = d;
    	this.setStationary();
    	this.setFlipping();
    	this.setShadows();
    	this.makeMasks();
    	this.limitBook();
    };
    PageFlip.prototype.makePage = function(targ, xQuadrant) {
    	targ.beginFill(this.pageColor, 100);
    	targ.moveTo(0, -this.pageWi);
    	targ.lineTo(0, -this.pageWiHi);
    	targ.lineTo(xQuadrant*this.pageWi, -this.pageWiHi);
    	targ.lineTo(xQuadrant*this.pageWi, -this.pageWi);
    	targ.endFill();
    };
    PageFlip.prototype.makeShade = function(targ, xQuadrant) {
    	var pageColors = [0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000];
    	var alphas = [40, 25, 15, 5, 0, 1, 6];
    	var ratios = [0, 1, 17, 51, 89, 132, 255];
    	var matrix = {matrixType:"box", x:0, y:this.pageWi, w:xQuadrant*this.pageWi, h:this.pageHi, r:0};
    	targ.beginGradientFill("linear", pageColors, alphas, ratios, matrix);
    	targ.moveTo(0, -this.pageWi);
    	targ.lineTo(0, -this.pageWiHi);
    	targ.lineTo(xQuadrant*this.pageWi, -this.pageWiHi);
    	targ.lineTo(xQuadrant*this.pageWi, -this.pageWi);
    	targ.endFill();
    };
    PageFlip.prototype.makeShadow = function(targ, xQuadrant) {
    	var pageColors = [0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000];
    	var alphas = [40, 25, 15, 5, 0, 1, 6];
    	var ratios = [0, 1, 17, 51, 89, 132, 255];
    	var maxLength = Math.sqrt((this.pageWi*this.pageWi)+(this.pageWiHi*this.pageWiHi));
    	var matrix = {matrixType:"box", x:0, y:-maxLength, w:xQuadrant*this.pageWi, h:maxLength-this.pageWi, r:0};
    	targ.beginGradientFill("linear", pageColors, alphas, ratios, matrix);
    	targ.moveTo(0, -this.pageWi);
    	targ.lineTo(0, -maxLength);
    	targ.lineTo(xQuadrant*this.pageWi, -maxLength);
    	targ.lineTo(xQuadrant*this.pageWi, -this.pageWi);
    	targ.endFill();
    };
    PageFlip.prototype.setStationary = function() {
    	this.createEmptyMovieClip("SLPage", 1);
    	if (this.flipPage != 1.5) {
    		this.makePage(this.SLPage, -1);
    		this.SLPage.attachMovie(this.pageVect[(this.flipPage-1.5-1)], "Print", 1);
    		this.SLPage.Print._x = -this.pageWi/2;
    		this.SLPage.Print._y = -this.pivotY;
    	}
    	this.createEmptyMovieClip("SRPage", 2);
    	if (this.flipPage != this.maxPages-.5) {
    		this.makePage(this.SRPage, 1);
    		this.SRPage.attachMovie(this.pageVect[(this.flipPage+1.5-1)], "Print", 1);
    		this.SRPage.Print._x = this.pageWi/2;
    		this.SRPage.Print._y = -this.pivotY;
    	}
    	var targ = this.dir>0 ? this.SLPage : this.SRPage;
    	targ.createEmptyMovieClip("Shade", 2);
    	this.makeShade(targ.Shade, -this.dir);
    };
    PageFlip.prototype.setFlipping = function() {
    	this.createEmptyMovieClip("FTPage", 3);
    	this.makePage(this.FTPage, this.dir);
    	this.FTPage.attachMovie(this.pageVect[(this.flipPage-this.dir*.5-1)], "Print", 1);
    	this.FTPage.Print._x = this.dir*this.pageWi/2;
    	this.FTPage.Print._y = -this.pivotY;
    	this.FTPage.createEmptyMovieClip("Shade", 2);
    	this.makeShade(this.FTPage.Shade, this.dir);
    	this.createEmptyMovieClip("FBPage", 4);
    	this.makePage(this.FBPage, -this.dir);
    	this.FBPage.attachMovie(this.pageVect[(this.flipPage+this.dir*.5-1)], "Print", 1);
    	this.FBPage.Print._x = -this.dir*this.pageWi/2;
    	this.FBPage.Print._y = -this.pivotY;
    	this.FBPage._rotation = this.dir*90;
    };
    PageFlip.prototype.setShadows = function() {
    	this.createEmptyMovieClip("FShadow", 5);
    	this.makeShadow(this.FShadow, -this.dir);
    	this.FShadow._rotation = this.dir*45;
    	this.createEmptyMovieClip("SShadow", 6);
    	this.makeShadow(this.SShadow, this.dir);
    	this.SShadow._rotation = this.dir*45;
    };
    PageFlip.prototype.makeMasks = function() {
    	this.createEmptyMovieClip("FBPageMask", 7);
    	this.FBPageMask.beginFill(0x005500, 100);
    	this.FBPageMask.lineTo(this.pageWiHi, -this.pageWiHi);
    	this.FBPageMask.curveTo(0, -2*this.pageWiHi, -this.pageWiHi, -this.pageWiHi);
    	this.FBPageMask.endFill();
    	this.FBPageMask.duplicateMovieClip("FTPageMask", 8);
    	this.createEmptyMovieClip("FShadowMask", 9);
    	this.makePage(this.FShadowMask, -this.dir);
    	this.FShadowMask._rotation = this.dir*90;
    	this.createEmptyMovieClip("SShadowMask", 10);
    	this.makePage(this.SShadowMask, this.dir);
    	this.FBPage.setMask(this.FBPageMask);
    	this.FTPage.setMask(this.FTPageMask);
    	this.FShadow.setMask(this.FShadowMask);
    	this.SShadow.setMask(this.SShadowMask);
    };
    PageFlip.prototype.limitBook = function() {
    	if (this.flipPage == 1.5) {
    		this.SLPage._visible = 0;
    		this.LButton._visible = 0;
    		this.SShadow._visible = 0;
    		if (this.dir == 1) {
    			this.FTPage.Shade._alpha = 67;
    			this.SShadow._visible = 1;
    		} else {
    			this.FShadow._alpha = 67;
    		}
    	} else if (this.flipPage == this.maxPages-.5) {
    		this.SRPage._visible = 0;
    		this.RButton._visible = 0;
    		this.SShadow._visible = 0;
    		if (this.dir == -1) {
    			this.FTPage.Shade._alpha = 67;
    			this.SShadow._visible = 1;
    		} else {
    			this.FShadow._alpha = 67;
    		}
    	}
    };
    PageFlip.prototype.flip = function(curVal) {
    	var rot = this.dir*45*curVal;
    	this.FBPageMask._rotation = this.FTPageMask._rotation=-rot;
    	this.FBPage._rotation = this.FShadowMask._rotation=(this.dir*90)-rot*2;
    	this.FShadow._rotation = this.SShadow._rotation=(this.dir*45)-rot;
    	
    };
    PageFlip.prototype.getPageRatio = function() {
    	if (this.dragging) {
    		this.pageRatio = -this.dir*(this._xmouse-this.startX-this.dir*20)/(2*this.pageWi);
    	} else {
    		this.pageRatio>2/3 ? this.pageRatio += this.autoStep : this.pageRatio -= this.autoStep;
    	}
    	if (this.pageRatio<=0) {
    		this.pageRatio = 0;
    		if (!this.dragging) {
    			this.flipDone();
    		}
    	} else if (this.pageRatio>=1) {
    		this.pageRatio = 1;
    		if (!this.dragging) {
    			this.flipDone();
    		}
    	}
    	return (this.pageRatio);
    };
    PageFlip.prototype.startFlip = function(dir) {
    	this.dir = dir;
    	this.pageInit(this.curPage+this.dir, this.dir);
    	this.startX = this.dir*this.pageWi;
    	this.dragging = true;
    	this.RButton._visible = 0;
    	this.LButton._visible = 0;
    	this.onEnterFrame = function() {
    		var pr = this.getPageRatio();
    		this.flip(pr);
    	};
    };
    PageFlip.prototype.flipRelease = function() {
    	this.dragging = false;
    	if (this.pageRatio>2/3) {
    		this.curPage += 2*this.dir;
    	}
    };
    PageFlip.prototype.flipDone = function() {
    	this.flipping = false;
    	this.onEnterFrame = null;
    	if (this.curPage != .5) {
    		this.LButton._visible = true;
    	}
    	if (this.curPage != this.maxPages+.5) {
    		this.RButton._visible = true;
    	}
    	if (this.pageRatio == 0) {
    		this.FShadow.removeMovieClip();
    		this.FShadowMask.removeMovieClip();
    		this.SShadow.removeMovieClip();
    		this.SShadowMask.removeMovieClip();
    		this.FBPage.removeMovieClip();
    		this.FBPageMask.removeMovieClip();
    		if (this.dir == 1) {
    			this.SRPage.removeMovieClip();
    		} else {
    			this.SLPage.removeMovieClip();
    		}
    	} else {
    		this.FTPage.removeMovieClip();
    		if (this.dir == -1) {
    			this.SRPage.removeMovieClip();
    		} else {
    			this.SLPage.removeMovieClip();
    		}
    	}
    	this.FTPageMask.removeMovieClip();
    };
    PageFlip.prototype.autoFlip = function(dir, autoclose) {
    	this.dir = dir;
    	if (autoclose && this.curPage == .5) {
    		this.flipDone();
    		this.pageInit(1.5, 1);
    	} else {
    		this.pageInit(this.curPage+this.dir, this.dir);
    		this.dragging = true;
    		this.RButton._visible = false;
    		this.LButton._visible = false;
    		this.pageRatio = 0;
    		this.pageSFX.start();
    		this.onEnterFrame = function() {
    			this.pageRatio += autoclose ? 2*this.autoStep : this.autoStep;
    			if (this.pageRatio<=0) {
    				this.pageRatio = 0;
    				this.curPage += 2*this.dir;
    				if (this.curPage<0) {
    					this.curPage = .5;
    				}
    				this.dragging = false;
    				this.flipDone();
    				if (autoclose && this.curPage>1) {
    					this.autoFlip(-1, true);
    				}
    			} else if (this.pageRatio>=1) {
    				this.pageRatio = 1;
    				this.dragging = false;
    				this.curPage += 2*this.dir;
    				if (this.curPage<0) {
    					this.curPage = .5;
    				}
    				this.flipDone();
    				if (autoclose && this.curPage>1) {
    					this.autoFlip(-1, true);
    				}
    			}
    			this.flip(this.pageRatio);
    		};
    	}
    };
    PageFlip.prototype.autoClose = function() {
    	this.autoFlip(-1, true);
    };
    #endinitclip
    Grazie mille a tutti

  2. #2


    Scusa ma lo fa già di suo.

    se noti devi clikkare e trascinare per sfogliare il libro

    non capisco il problema
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  3. #3
    non al mio
    io clicco e sfoglia
    se provo a trascinare non sfoglia

  4. #4
    scusa e perchè non scarichi quello e confronti il tuo codice con qllo?
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  5. #5
    perchè il mio è la versione uno
    quello è la due
    e perchè il mio l'ho modificato (aggiunto pagine ecc...)facendo una fatica cane 2 mesi fa grazie ai consigli del forum ma non mi ricordo più come si fa e non vorrei risbattermi di nuovo...sono pigro lo so , grazie lo stesso

  6. #6
    codice per il libro uno

    codice:
    //
    //  P i X E L W i T . C O M
    //
    stop();
    //
    //_________________________V A R I A B L E S 
    //
    // Store a constant reference to this clip on the main timeline so
    // clip can be referenced from any other timeline as _level0.pagesAbs
    _level0.pagesAbs = this;
    // Dimensioni 
    var pageWi = 200;
    var PageHi = 300; 
    var pageWiHi = pageWi+pageHi;
    var pivotY = pageHi/2+pageWi;
    //colore sfondo pagina 
    var pageColor = 0xFFFFE5; 
    // "dir" equals either 1 or -1 and determines if you
    // are flipping forward or backward through the book
    var dir = 1;
    // "flipPage" is the # "between" the two flipping page #'s
    var flipPage = 1.5;
    // "curPage" is the # between the two currently viewed page #'s
    var curPage = .5;
    // Numero di pagine che hai deve essere numero pari
    var maxPages = 8; // "autoStep" percentage of page width determining step size when auto-closing
    var autoStep = .05;
    // "dragging" is true if you are dragging the page
    var dragging = false
    //
    //
    //
    //
    //
    //________________________________R U N   O N C E
    //
    // Place Left and Right page flip Buttons
    this.attachMovie ("cornerButton", "RButton", 11);
    with (RButton) {
    	_x = pageWi;
    	_y = -pageWi;
    }
    this.attachMovie ("cornerButton", "LButton", 12);
    with (LButton) {
    	_x = -pageWi;
    	_y = -pageWi;
    	_xscale = -100;
    }
    //
    //
    // Build pages for first time
    pageInit (flipPage, dir);
    // Drop down to appear centered
    _y+=pivotY;
    //
    //
    //
    //
    //
    // _____________________B U I L D   F U N C T I O N S
    //
    // Create a left-aligned page-sized solid fill raised one pagewidth
    function makePage (targ, xQuadrant) {
    	with (targ) {
    		beginFill(pageColor, 100);
    		moveto(0, -pageWi);
    		lineto(0, -pageWiHi);
    		lineTo(xQuadrant*pageWi, -pageWiHi);
    		lineTo(xQuadrant*pageWi, -pageWi);
    		endFill();
    	}
    }
    //
    //
    // Create a left-aligned page-sized shadow gradient raised one pagewidth
    // Shade is used to add depth to stationary pages
    function makeShade (targ, xQuadrant) {
    	with (targ) {
    		// Defines gradient used as shadow overlay
    		var colors = [0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000];
    		var alphas = [      40,       25,       15,        5,        0,        1,        6];
    		var ratios = [       0,        1,       17,       51,       89,      132,      255];
    		var matrix = { matrixType:"box", x:0, y:pageWi, w:xQuadrant*pageWi, h:pageHi, r:0};
    		beginGradientFill( "linear", colors, alphas, ratios, matrix );
    		moveto(0, -pageWi);
    		lineto(0, -pageWiHi);
    		lineTo(xQuadrant*pageWi, -pageWiHi);
    		lineTo(xQuadrant*pageWi, -pageWi);
    		endFill();
    	}
    }
    //
    //
    // create a bottom-left aligned shadow gradient
    // for animated shadows
    function makeShadow (targ, xQuadrant) {
    	with (targ) {
    		// Defines gradient used as shadow overlay
    		var colors = [0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000];
    		var alphas = [      40,       25,       15,        5,        0,        1,        6];
    		var ratios = [       0,        1,       17,       51,       89,      132,      255];
    		var maxLength = Math.sqrt((pageWi*pageWi)+(pageWIHi*pageWiHi));
    		var matrix = { matrixType:"box", x:0, y:-maxLength, w:xQuadrant*pageWi, h:maxLength-pageWi, r:0};
    		beginGradientFill( "linear", colors, alphas, ratios, matrix );
    		moveto(0, -pageWi);
    		lineto(0, -maxLength);
    		lineto(xQuadrant*pageWi, -maxLength);
    		lineTo(xQuadrant*pageWi, -pageWi);
    		endFill();
    	}
    }
    //
    //
    // Place Stationary Pages
    function setStationary() {
    // Place the "S"tationary "L"eft "P"age
    createEmptyMovieClip("SLPage", 1);
    	if (flipPage!=1.5) {
    		makePage (SLPage, -1)
    		SLPage.attachMovie("print"+(flipPage-1.5), "Print", 1);
    		with (SLPage.Print) {
    			_x = -pageWi/2;
    			_y = -pivotY;
    		}
    	}
    	// Place the "S"tationary "R"ight "P"age
    createEmptyMovieClip("SRPage", 2);
    	if (flipPage!=maxPages-.5){
    		makePage (SRPage, 1)
    		SRPage.attachMovie("print"+(flipPage+1.5), "Print", 1);
    		with (SRPage.Print) {
    			_x = pageWi/2;
    			_y = -pivotY;
    		}
    	}
    	// Place shade on page not being revealed
    	var targ = dir>0 ? SLPage : SRPage;
    	targ.createEmptyMovieClip("Shade", 2);
    	makeShade(targ.Shade, -dir);
    }
    // 
    // 
    // Place the Flipping Pages
    function setFlipping() {
    	var targ;
    	// Place the "F"lipping "T"op "P"age
    	createEmptyMovieClip("FTPage", 3);
    	makePage (FTPage, dir)
    	with (FTPage) {
    		attachMovie("print"+(flipPage-dir*.5), "Print", 1);
    		with (Print) {
    			_x = dir*pageWi/2;
    			_y = -pivotY;
    		}
    	}
    	FTPage.createEmptyMovieClip("Shade", 2);
    	makeShade(FTPage.Shade, dir);
    	// Place the "F"lipping "B"ottom "P"age
    	createEmptyMovieClip("FBPage", 4);
    	makePage (FBPage, -dir)
    	FBPage.attachMovie("print"+(flipPage+dir*.5), "Print", 1);
    	with (FBPage.Print) {
    		_x = -dir*pageWi/2;
    		_y = -pivotY;
    	}
    	FBPage._rotation = dir*90;
    }
    // 
    // 
    // Creates Shadows which follow edge of transition
    function setShadows() {
    	var targ;
    	// Place shadow on the "F"lipping page
    	this.createEmptyMovieClip("FShadow", 5);
    	makeShadow(FShadow, -dir);
    	FShadow._rotation = dir*45;
    	// Place shadow on the "S"tationary page
    	this.createEmptyMovieClip("SShadow", 6);
    	makeShadow(SShadow, dir);
    	SShadow._rotation = dir*45;
    }
    // 
    // 
    // Create Masks to hide everything
    function makeMasks() {
    	// Create mask for Flipping Bottom Page Mask
    	this.createEmptyMovieClip("FBPageMask", 7);
    	with (FBPageMask) {
    		beginFill(0x005500, 100);
    		lineto(pageWiHi, -PageWiHi);
    		curveto(0, -2*PageWiHi, -pageWiHi, -pageWiHi);
    		endFill();
    	}
    	// Create mask for Flipping Top Page
    	FBPageMask.duplicateMovieClip("FTPageMask", 8);
    	// Create mask for Shadow on the Flipping Page
    	this.createEmptyMovieClip("FShadowMask", 9);
    	makePage (FShadowMask, -dir);
    	FShadowMask._rotation = dir*90;
    	// Create mask for Shadow on Stationary Page
    	this.createEmptyMovieClip("SShadowMask", 10);
    	makePage(SShadowMask, dir);
    	FBPage.setMask(FBPageMask);
    	FTPage.setMask(FTPageMask);
    	FShadow.setMask(FShadowMask);
    	SShadow.setMask(SShadowMask);
    }
    //
    //
    // Hide pages before page1 and after Last Page
    function limitBook () {
    	if (flipPage==1.5) {
    		SLPage._visible = 0;
    		LButton._visible = 0;
    		SShadow._visible = 0;
    		if (dir==1) {
    			FTPage.Shade._alpha = 67;
    			SShadow._visible = 1;
    		}else {
    			FShadow._alpha = 67;
    		}			
    	} else if (flipPage==maxPages-.5) {
    		SRPage._visible = 0;
    		RButton._visible = 0;
    		SShadow._visible = 0;
    		if (dir==-1) {
    			FTPage.Shade._alpha = 67;
    			SShadow._visible = 1;
    		} else {
    			FShadow._alpha = 67;
    		}
    	}		
    }
    // 
    // 
    // How to position all pages needed for a page flip
    // calls all functions listed above
    function pageInit (cp, d) {
    	flipPage = cp;
    	dir = d;
    	//trace ("flip page = "+flipPage+" dir = "+dir);
    	setStationary();
    	setFlipping();
    	setShadows();
    	makeMasks();
    	limitBook ();
    }
    // 
    //
    //
    //
    //
    //__________________F L I P P I N G   F U N C T I O N S
    //
    // How to adjust position of flipping page
    // based on a value between 0 and 1
    function flip(curVal) {
    	var rot = dir*45*curVal;
    	FBPageMask._rotation = FTPageMask._rotation = -rot;
    	FBPage._rotation = FShadowMask._rotation = (dir*90)-rot*2;
    	FShadow._rotation = SShadow._rotation=(dir*45)-rot;
    }
    //
    //
    // how to determine position of flipping page
    // returns a value between 0 and 1
    // zero being no-flip and one being full-flip
    function getPageRatio () {
    	if (dragging) {
    		// if dragging page position is determined by mouse position
    		// the 20 helps advance the turning page when the button is pressed
    		pageRatio = -dir*(_xmouse-startX-dir*20)/(2*pageWi);
    	} else {
    		// if not dragging; auto increment page towards final position
    		pageRatio>2/3 ? pageRatio += autoStep : pageRatio -= autoStep;
    	}
    	// if out of bounds 
    	if (pageRatio<=0) {
    		pageRatio = 0;
    		if (!dragging) {
    			flipDone();
    		}
    	} else if (pageRatio>=1) {
    		pageRatio = 1;
    		if (!dragging) {
    			flipDone();
    		}
    	}
    	return (pageRatio);
    }
    // 
    //
    //
    //
    //
    //_____________C O N T R O L I N G   F U N C T I O N S
    //
    // What to do when you press a page flipping button
    function startFlip (dir) {
    	pageInit (curPage+dir, dir);
    	startX = dir*pageWi;
    	dragging = true;
    	RButton._alpha=0;
    	Lbutton._alpha=0;
    	this.onEnterFrame = function () {
    		flip(getPageRatio());
    	}
    }
    // 
    //
    // what to do when page is released
    function flipRelease () {
    	dragging = false;
    	if (pageRatio>2/3) {
    		curPage+=2*dir;
    	}
    }
    //
    //
    // What to do when pages are done flipping
    function flipDone () {
    	this.onEnterFrame = null;
    	RButton._alpha = 100;
    	LButton._alpha = 100;
    	if (curPage!=.5){
    		LButton._visible = 1;		
    	}
    	if (curPage!=maxPages+.5){
    		RButton._visible = 1;
    	}
    	// Delete hidden pages to save resources
    	if (pageRatio==0) {
    		FShadow.removeMovieClip();
    		FShadowMask.removeMovieClip();
    		SShadow.removeMovieClip();
    		SShadowMask.removeMovieClip();
    		FBPage.removeMovieClip();
    		FBPageMask.removeMovieClip();
    		if (dir==1) {
    			SRPage.removeMovieClip();
    		} else {
    			SLPage.removeMovieClip();
    		}			
    	} else {
    		FTPage.removeMovieClip();
    		if (dir==-1) {
    			SRPage.removeMovieClip();
    		} else {
    			SLPage.removeMovieClip();
    		}
    	}
    	FTPageMask.removeMovieClip();
    }
    //
    //
    // assign functions to button events
    LButton.onPress = function() {
    	startFlip (-1);
    }
    LButton.onReleaseOutside = function () {
    	flipRelease();
    }
    LButton.onRelease = function () {
    	flipRelease();
    }
    RButton.onPress = function() {
    	startFlip (1);
    }
    RButton.onReleaseOutside = function () {
    	flipRelease();
    }
    RButton.onRelease = function () {
    	flipRelease();
    }
    //
    //
    //
    //
    //
    Questo è il codice poi basta che tu metta le tue print come hai già fatto ed il gioco è fatto, non vedo il problema ,

    cmq il libro che hai linkato è la versione1, la 2 è ben diversa
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  7. #7
    grazie mille, sei proprio gentile

  8. #8
    ciao
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.