Foros del Web » Creando para Internet » Flash y Actionscript »

mover fotogramas clave en la linea de tiempo

Estas en el tema de mover fotogramas clave en la linea de tiempo en el foro de Flash y Actionscript en Foros del Web. Hola a todos, tengo el siguiente problema, os explico: Tengo un clip de película que contiene tres capas, una de acciones, otra pages y otra ...
  #1 (permalink)  
Antiguo 15/11/2007, 06:26
Avatar de zaida  
Fecha de Ingreso: noviembre-2006
Ubicación: Madrid (España)
Mensajes: 266
Antigüedad: 17 años, 5 meses
Puntos: 0
mover fotogramas clave en la linea de tiempo

Hola a todos, tengo el siguiente problema, os explico:

Tengo un clip de película que contiene tres capas, una de acciones, otra pages y otra img. El archivo no lo he creado yo, ya que es un libro que me he descargado de internet y el código a penas lo entiendo. Bueno sigo, la capa pages contiene la páginas del libro, una página por fotograma. Hasta aquí todo bien, después de haber colocado todo el texto y las imágenes me he dado cuenta que me falta un índice en la primera página (torpe de mi ) y mi duda es cómo hacer para mover todas las páginas un fotograma a la derecha, es decir, que comience en el fotograma 2 para hacer el índice en el 1.

Espero haberme explicado bien

Un saludo y mil gracias
__________________
-- Cuando sientas miedo y no tengas un hombro dónde apoyarte, no te hundas en la soledad, pues si lo haces fracasarás --
  #2 (permalink)  
Antiguo 15/11/2007, 07:53
Avatar de zaida  
Fecha de Ingreso: noviembre-2006
Ubicación: Madrid (España)
Mensajes: 266
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: mover fotogramas clave en la linea de tiempo

He conseguido solucionarlo insertanto un fotograma en la posición 1, era un problema con fácil solución pero mi nivel de flash es muy bajo .

Ahora me surge otra duda, el archivo original que yo me he descargado tiene 27 páginas y necesito insertarle más pero no tengo ni idea de cómo hacerlo. ¿Alguien puede orientarme?

Saludos y gracias
__________________
-- Cuando sientas miedo y no tengas un hombro dónde apoyarte, no te hundas en la soledad, pues si lo haces fracasarás --
  #3 (permalink)  
Antiguo 15/11/2007, 09:12
Avatar de yoseman  
Fecha de Ingreso: diciembre-2003
Ubicación: Alicante (Spain)
Mensajes: 471
Antigüedad: 20 años, 4 meses
Puntos: 5
Re: mover fotogramas clave en la linea de tiempo

Hola,

Sería conveniente que pusieses el código en sí o un enlace con el fla para que alguién te pueda ayudar

Salu2 ;)
__________________
[+]
[+]
  #4 (permalink)  
Antiguo 22/11/2007, 03:05
Avatar de zaida  
Fecha de Ingreso: noviembre-2006
Ubicación: Madrid (España)
Mensajes: 266
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: mover fotogramas clave en la linea de tiempo

Hola: un enlace no puedo dejaros así que os pongo el código, he conseguido insetar más páginas en el libro, el problema que al llegar a la página 27 no sigue pasando de página. El código no lo entiendo así que si pudierais ayudarme os lo agradecería.

Éste es el código que tiene la escena:

Código:
onClipEvent (enterFrame) {
	if (!_root.AutoFlip.checked || _root.Book.flipping || ++counter < 100) return;
	counter = 0;
	if (_root.Book.curPage + 2 > _root.Book.lastPage)
		_root.flipToPage(0);
	else
		_root.flipToPage(_root.Book.curPage + 2);
}
Éste es el código que tiene el clip de película "pages" que es dónde yo añado las páginas, las modifico...:

Código:
#initclip 0

//flip to a specified page
//Flip a una determinada página
function flipToPage(index) {
		if (Book.flipping) Book.stopFlip(null, true);
		index = index & -2;
		if (index > Book.curPage) {
				Book.curPage = index - 2;
				Book.startFlip(index - 1, "top", -150, 50);
		} else if (index < Book.curPage) {
				Book.curPage = index + 2;
				Book.startFlip(index + 2, "top", 150, 50);
		}
}

//invoked when a page is being dragged, to check if the page has done flipping
//Invocarse cuando una página está siendo arrastrado, para comprobar si la página se ha hecho de arrojar
function onDragPage(sender, pageObj, x, y, trackMouse) {
		if ((!trackMouse) && (((pageObj.index & 1) ? (x) : (-x)) > 100)) {
				sender.stopFlip();
		}
}

//invoked when a page is created, to set mouse tracking areas
//Invocarse cuando se crea una página, para establecer áreas de seguimiento de ratón
function onSetFlipArea(sender, pageObj) {
		var names = ["faTopInner", "faBottomInner", "faTop", "faBottom"];
		for (var i in names) {
			var page = pageObj[names[i]];
			page.useHandCursor = false;
			page.owner = pageObj;
			page.onPress = function () {
				if (this.owner.position == null) {
					this.owner.main.startFlip(this.owner.index, this == this.owner.faTop ? "top" : "bottom");
				}
			};
			page.onRollOver = function () {
				if (_root.SnapMouse.checked) this.onPress();
			};
			page.onRollOut = page.onRelease;
			page.onRelease = function () {
				this.owner.main.stopFlip(this.owner.index, false, this.owner.side * (this.owner.position == null ? 1 : -1) > 0 ? "left" : "right");
			};
		}
}

//invoked when flipping action is finished, to play a flipping sound
//Invocarse cuando se finaliza la acción de arrojar, tirar a desempeñar un sonido
function onStopFlip(sender, pageObj) {
	if (pageObj.side * pageObj.position.aimX < 0) return;
	pageObj.page.FlipSound.gotoAndPlay(2);
}

#endinitclip
sigue:
__________________
-- Cuando sientas miedo y no tengas un hombro dónde apoyarte, no te hundas en la soledad, pues si lo haces fracasarás --

Última edición por zaida; 22/11/2007 a las 03:22
  #5 (permalink)  
Antiguo 22/11/2007, 03:24
Avatar de zaida  
Fecha de Ingreso: noviembre-2006
Ubicación: Madrid (España)
Mensajes: 266
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: mover fotogramas clave en la linea de tiempo

Éste es el código que se utiliza en el clip de película FFlipPage,(Creo que es lo que da la sombra al centro del libro)

Código:
#initclip 1

if (FFlipPage.version < 3.0) {

with (Component("FFlipPage")) {
	version					= 3.0;
	buildDate				= "2003.9.8";
	copyright				= "Fictiony Chen, 2003-2006, [email protected]";

//PARAMETERS
	parameter.pageWidth		= 120;		//the width of the page
	parameter.pageHeight	= 160;		//the height of the page
	parameter.pageId		= "";		//the linkage id of the page content movie clip
	parameter.adjustEvenPage	= true;	//if adjust even page's content position
	parameter.autoPage		= true;		//automatically go to the definite frame when the page movie clip is created
	parameter.firstPage		= 0;		//first page's index (even pages are on the left, odd pages are on the right)
	parameter.lastPage		= 1;		//last page's index
	parameter.curPage		= 0;		//index of the current page
	parameter.visiblePages	= 1;		//max count of the visible pages on one side
	parameter.showRearPage	= false;	//if the rear page is shown (used in transparent pages)
	parameter.shade			= {show:true, color:0x000000, sizeMin:10, sizeMax:30, alphaMin:60, alphaMax:50};
										//the settings of the boundary shade, id is the linkage id of the shade movie
										//clip, min and max are (in percentage of the page width) its size range
	parameter.pageShadow	= {show:true, color:0x000000, sizeMin:20, sizeMax:120, alphaMin:60, alphaMax:80};
										//the settings of the page shadow
	parameter.flipArea		= {leftTop:true, rightTop:true, leftBottom:true, rightBottom:true,
							   leftTopInner:true, rightTopInner:true, leftBottomInner:true, rightBottomInner:true};
										//the button areas that can respond to the flip action
	parameter.flipSize		= {width:40, height:30, innerWidth:80, innerHeight:50};
										//the size (in percentage of the page width) of the flip areas
	parameter.dragAccRatio	= 0.5;		//the dragging accelerate ratio (0~1)
	parameter.moveAccRatio	= 0.2;		//the moving accelerate ratio (0~1)
	parameter.multiFlip		= false;	//if multiple flipping is allowed
	parameter.active		= true;		//if the pages can response to mouse actions

//EVENTS
	event.onCreatePage		= "";		//function(pageMC, isRear), handled after a page movie clip is created
	event.onRemovePage		= "";		//function(pageMC, isRear), handled before a page movie clip is removed
	event.onAdjustPage		= "";		//function(pageObj, range), handled when a page is adjusted
	event.onResizePage		= "";		//function(pageObj, width,height), handled when a page is resized
	event.onSetFlipArea		= "";		//function(pageObj), handled when a page's flip areas are set
	event.onStartFlip		= "";		//function(pageObj), handled when a page starts to flip
	event.onStopFlip		= "";		//function(pageObj), handled when a page stops flipping
	event.onFinishFlip		= "";		//function(pageObj), handled when a page finishes slipping
	event.onDragPage		= "";		//function(pageObj, x, y, trackMouse), handled when a page is dragging
	event.onMovePage		= "";		//function(pageObj, x, y), handled when a page is moving

//PRIVATE PROPERTIES
	private._pageWidth		= 0;		//pageWidth
	private._pageHeight		= 0;		//pageHeight
	private._pageId			= "";		//pageId
	private._adjustEvenPage	= true;		//adjustEvenPage
	private._autoPage		= true;		//autoPage
	private._firstPage		= 0;		//firstPage
	private._lastPage		= 0;		//lastPage
	private._curPage		= 0;		//curPage
	private._visiblePages	= 1;		//visiblePages
	private._showRearPage	= false;	//showRearPage
	private._shade			= {show:true, color:0x000000, sizeMin:10, sizeMax:30, alphaMin:60, alphaMax:50};
										//shade
	private._pageShadow		= {show:true, color:0x000000, sizeMin:20, sizeMax:120, alphaMin:60, alphaMax:80};
										//pageShadow
	private._flipArea		= {leftTop:true, rightTop:true, leftBottom:true, rightBottom:true,
							   leftTopInner:true, rightTopInner:true, leftBottomInner:true, rightBottomInner:true};
										//flipArea
	private._flipSize		= {width:40, height:30, innerWidth:80, innerHeight:50};
										//flipAreaSize
	private._dragAccRatio	= 0;		//dragAccRatio
	private._moveAccRatio	= 0;		//moveAccRatio
	private._multiFlip		= false;	//multiFlip
	private._active			= true;		//active
	private._pages			= {};		//list of the visible page objects
	private._flipPages		= {};		//list of the flipped page objects
	private._flipCount		= 0;		//count of the flipped pages (<0 means the flipped pages are on the left)
	private._topPageDepth	= 10000;	//depth of the topmost static page
	private._shadowDepth	= 10;		//depth of the page shadow movie clip
	private._shadowMaskDepth	= 20;	//depth of the shadow mask movie clip
	private._faceDepth		= 30;		//depth of the page face movie clip
	private._pageMaskDepth	= 40;		//depth of the page mask movie clip
	private._rearPageDepth	= 20;		//depth of the rear page movie clip
	private._pageDepth		= 30;		//depth of the page content movie clip
	private._shadeDepth		= 40;		//depth of the shade movie clip
	private._flipAreaDepth	= 10;		//depth of the flip area movie clip
	private._pretreating	= true;		//if it is pretreating

//PUBLIC PROPERTIES
	public.posPrecision		= 0.5;		//the position precision

//PRIVATE METHODS
	//pretreating
	private.onPretreat = function (para) {
		if (para.pageWidth == null) para.pageWidth = this._xscale * 1.2;
		if (para.pageHeight == null) para.pageHeight = this._yscale * 1.6;
		this._xscale		= 100;
		this._yscale		= 100;
	};

	//initialization
	private.onInit = function () {
		this._pretreating	= false;
		this.gotoPage(this._curPage, true);
	};

	//create a page movie clip and its rear page movie clip
	private._createPageMC = function (page) {
		if (page.page != null) {
			this.handleEvent("onRemovePage", page.page);
			page.page.removeMovieClip();
		}
		page.page			= this._pageId == "" ? page.face.createEmptyMovieClip("PageMC", this._pageDepth)
							: page.face.attachMovie(this._pageId, "PageMC", this._pageDepth);
		page.page.index		= page.index;
		page.page._x		= !this._adjustEvenPage ? this._pageWidth * -page.side : page.side<0 ? 0 : -this._pageWidth;
		if (this._autoPage) page.page.gotoAndStop(page.index - this._firstPage + 1);
		this.handleEvent("onCreatePage", page.page);
		if (this._showRearPage) {
			if (page.rearPage != null) this.handleEvent("onRemovePage", page.rearPage, true);
			var index		= page.index + page.side;
			if (index < this._firstPage || index > this._lastPage) return;
			page.rearPage	= this._pageId == "" ? page.face.createEmptyMovieClip("RearPageMC", this._rearPageDepth)
							: page.face.attachMovie(this._pageId, "RearPageMC", this._rearPageDepth);
			page.rearPage.index		= index;
			page.rearPage._xscale	= -100;
			page.rearPage._x		= !this._adjustEvenPage ? page.page._x : page.side<0 ? this._pageWidth : 0;
			if (this._autoPage) page.rearPage.gotoAndStop(index - this._firstPage + 1);
			this.handleEvent("onCreatePage", page.rearPage, true);
		}
	};

	//create a page object
	private._createPage = function (index, depth, position) {
		if (index < this._firstPage || index > this._lastPage) return;
		var page			= this.createEmptyMovieClip("Page" + index, depth);
		page.main			= this;
		page.index			= index;
		page.side			= index % 2 == 0 ? -1 : 1;
		page.face			= page.createEmptyMovieClip("FaceMC", this._faceDepth);
		page.pageMask		= page.createEmptyMovieClip("PageMaskMC", this._pageMaskDepth);
		page.pageMask._xscale		= -page.side * 100;
		page.face.setMask(page.pageMask);
		this._createPageMC(page);
		if (this._shade.show) {
			page.shade		= page.face.attachMovie("PageShade", "ShadeMC", this._shadeDepth);
			(new Color(page.shade)).setRGB(this._shade.color);
		}
		if (this._pageShadow.show) {
			page.shadow		= page.attachMovie("PageShade", "ShadowMC", this._shadowDepth);
			(new Color(page.shadow)).setRGB(this._pageShadow.color);
			page.shadowMask	= page.createEmptyMovieClip("ShadowMask", this._shadowMaskDepth);
			page.shadowMask._xscale	= -page.side * 100;
			page.shadow.setMask(page.shadowMask);
		}
		page.position		= position;
		this._adjustPage(page);
		this._setFlipArea(page);
		this._pages[index]	= page;
		return page;
	};
sigue:
__________________
-- Cuando sientas miedo y no tengas un hombro dónde apoyarte, no te hundas en la soledad, pues si lo haces fracasarás --
  #6 (permalink)  
Antiguo 22/11/2007, 03:25
Avatar de zaida  
Fecha de Ingreso: noviembre-2006
Ubicación: Madrid (España)
Mensajes: 266
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: mover fotogramas clave en la linea de tiempo

Código:
//remove a page object
	private._removePage = function (page) {
		if (page == null) return;
		this.handleEvent("onRemovePage", page.page);
		if (page.rearPage != null) this.handleEvent("onRemovePage", page.rearPage, true);
		if (this._flipPages[page.index] != null) {
			this._flipCount	+= page.side;
			delete this._flipPages[page.index];
		}
		delete this._pages[page.index];
		page.removeMovieClip();
	};

	//adjust the page and its mask and shades according to its position
	private._adjustPage = function (page) {
		if (page == null) return;
		var width		= this._pageWidth;
		var height		= this._pageHeight;
		var side		= page.side;
		var pos			= page.position;
		//calculate the mask range
		if (pos == null) {
			var top		= 1;
			var range	= {type:1, a:width, b:width, angle:0, angle2:90, length:height};
			pos			= {x:side * width, y:0};
		} else {
			var top		= pos.top;
			var range	= pos.range != null ? pos.range
						: (pos.range = this._getMaskRange(-side * pos.x, top > 0 ? pos.y : height-pos.y));
			pos.x		= -side * range.x;
			pos.y		= top > 0 ? range.y : height-range.y;
		}
		//adjust page face movie clip
		with (page.face) {
			_x			= pos.x;
			_y			= pos.y;
			_rotation	= side * top * range.angle;
		}
		page.page._y	= top > 0 ? 0 : -height;
		if (page.rearPage != null) page.rearPage._y = top > 0 ? 0 : -height;
		//adjust shade movie clip
		var ratio		= page.shadeRatio = range.type==0
						? (range.a/width < range.b/height ? range.a/width/2 : range.b/height/2)
						: (range.a/width/2 + range.b/width/2);
		var shade		= page.shade;
		if (shade != null) {
			var shadeSet	= this._shade;
			with (shade) {
				_x			= range.a * -side;
				_y			= 0;
				_rotation	= (range.angle2 - 90) * side * top;
				_xscale		= (ratio * shadeSet.sizeMax + (1-ratio) * shadeSet.sizeMin) / 100 * width * side;
				_yscale		= top * range.length;
				_alpha		= ratio * shadeSet.alphaMax + (1-ratio) * shadeSet.alphaMin;
			}
		}
		//adjust page mask movie clip
		this._drawMask(page.pageMask, range.type, range.a, range.b);
		with (page.pageMask) {
			_x			= pos.x;
			_y			= pos.y;
			_rotation	= side * top * range.angle;
			_yscale		= top * 100;
		}
		//adjust page shadow movie clip
		if (page.shadow != null) {
			if (page.position == null) {
				page.shadow._visible	= false;
			} else {
				var shadowSet	= this._pageShadow;
				with (page.shadow) {
					_visible	= true;
					_x			= (range.a - width) * side;
					_y			= top > 0 ? 0 : height;
					_rotation	= (90 - range.angle2) * side * top;
					_xscale		= (ratio * shadowSet.sizeMax + (1-ratio) * shadowSet.sizeMin) / 100 * width * side;
					_yscale		= top * (range.length > width ? range.length : width);
					_alpha		= ratio * shadowSet.alphaMax + (1-ratio) * shadowSet.alphaMin;
				}
				//adjust shadow mask movie clip
				this._drawMask(page.shadowMask, 13-range.type, range.a, range.b);
				with (page.shadowMask) {
					_y			= top > 0 ? 0 : height;
					_yscale		= top * 100;
				}
			}
		}
		//adjust rear page's mask
		var rearPage	= this._pages[page.index + side];
		if (rearPage != null) {
			this._drawMask(rearPage.pageMask, 3-range.type, range.a, range.b);
			with (rearPage.pageMask) {
				_y			= top > 0 ? 0 : height;
				_yscale		= top * 100;
			}
		}
		//adjust opposite page's shade
		var oppoPage	= this._pages[page.index - side];
		if (oppoPage.shade != null) {
			oppoPage.shadeRatio	= ratio;
			with (oppoPage.shade) {
				_x			= -shade._x;
				_y			= top > 0 ? 0 : height;
				_rotation	= -shade._rotation;
				_xscale		= -shade._xscale;
				_yscale		= shade._yscale;
				_alpha		= shade._alpha;
			}
		}
		this.handleEvent("onAdjustPage", page, range);
	};

	//get the mask range according to the right page's top corner at the specified position
	private._getMaskRange = function (x, y) {
		var width		= this._pageWidth;
		var height		= this._pageHeight;
		//adjust x, y to be in the valid range
		var dTop		= Math.sqrt(x*x + y*y);
		if (dTop > width) {
			x			*= width / dTop;
			y			*= width / dTop;
		}
		var dBottom		= Math.sqrt(x*x + (y-height) * (y-height));
		var diagonal	= Math.sqrt(width*width + height*height);
		if (dBottom > diagonal) {
			x			*= diagonal / dBottom;
			y			= (y-height) * diagonal / dBottom + height;
		}
		//calculate the range
		var w_x					= width - x;
		var range				= {x:x, y:y};
		if (w_x == 0) {
			range.type			= 0;	//corner type, 0:triangle, 1:quadrangle
			range.a				= 0;	//side width of the corner
			range.b				= 0;
			range.angle			= 0;	//page rotation angle
			range.sin			= 0;	//sin, cos of page rotation angle
			range.cos			= 1;
			range.angle2		= 45;	//shade rotation angle
			range.length		= 0;	//length of the boundary
		} else {
			range.a				= (w_x + y*y / w_x) / 2;
			range.angle			= Math.atan2(y, w_x - range.a);
			range.sin			= Math.sin(range.angle);
			range.cos			= Math.cos(range.angle);
			range.angle			*= 180/Math.PI;
			if (w_x*w_x + (y-height)*(y-height) <= height*height) {
				range.type		= 0;
				range.b			= range.a * w_x / y + range.a * 0.005;
				range.angle2	= Math.atan2(range.b, range.a) * 180/Math.PI;
				range.length	= Math.sqrt(range.a*range.a + range.b*range.b);
			} else {
				range.type		= 1;
				range.b			= range.a - height * y / w_x + (range.a + range.b) * 0.005;
				range.angle2	= Math.atan2(height, range.a - range.b) * 180/Math.PI;
				range.length	= Math.sqrt(height*height + (range.a-range.b) * (range.a-range.b));
			}
		}
		return range;
	};
sigue:
__________________
-- Cuando sientas miedo y no tengas un hombro dónde apoyarte, no te hundas en la soledad, pues si lo haces fracasarás --
  #7 (permalink)  
Antiguo 22/11/2007, 03:26
Avatar de zaida  
Fecha de Ingreso: noviembre-2006
Ubicación: Madrid (España)
Mensajes: 266
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: mover fotogramas clave en la linea de tiempo

Código:
//draw mask with specified type, a, b is the side width of the corner
	private._drawMask = function (mask, type, a, b) {
		var w		= this._pageWidth;
		var h		= this._pageHeight;
		mask.clear();
		mask.beginFill(0, 20);
		mask.moveTo(type <= 1 || type > 10 ? 0 : w, 0);
		mask.lineTo(type > 10 ? w - a : a, 0);
		switch (type) {
		case 0:		//triangle (flip page)
			mask.lineTo(0, b);
			break;
		case 1:		//quadrangle (flip page)
			mask.lineTo(b, h);
			mask.lineTo(0, h);
			break;
		case 2:		//quadrangle
			mask.lineTo(b, h);
			break;
		case 12:	//quadrangle (shadow)
			mask.lineTo(w - b, h);
			break;
		case 3:		//pentagon
			mask.lineTo(0, b);
			mask.lineTo(0, h);
			break;
		case 13:	//pentagon (shadow)
			mask.lineTo(w, b);
			mask.lineTo(w, h);
			break;
		}
		if (type > 1) {
			mask.lineTo(type < 10 ? w : -w, h);
			mask.lineTo(type < 10 ? w : -w, 0);
		}
		if (type <= 1 || type > 10) mask.lineTo(0, 0);
		mask.endFill();
	};

	//reset the flip areas in the specified page
	private._setFlipArea = function (page) {
		if (page.side < 0) {
			var name1		= ["leftTopInner", "leftBottomInner", "leftTop", "leftBottom"];
		} else {
			var name1		= ["rightTopInner", "rightBottomInner", "rightTop", "rightBottom"];
		}
		var name2			= ["faTopInner", "faBottomInner", "faTop", "faBottom"];
		var width			= -page.side * this._flipSize.width / 100 * this._pageWidth;
		var height			= this._flipSize.height / 100 * this._pageHeight;
		var innerWidth		= -page.side * this._flipSize.innerWidth / 100 * this._pageWidth;
		var innerHeight		= this._flipSize.innerHeight / 100 * this._pageHeight;
		for (var i = 0; i < 4; i++) {
			if (this._flipArea[name1[i]]) {
				var fa		= page[name2[i]];
				if (fa == null) {
					fa		= page[name2[i]] = page.face.attachMovie("HotArea", "FlipArea"+i, this._flipAreaDepth+i);
					fa.onPress			= this._faPress;
					fa.onRelease		= this._faRelease;
					fa.onReleaseOutside	= this._faRelease;
					fa.enabled			= this._active;
				}
				fa._y		= i%2 == 0 ? 0 : this._pageHeight;
				fa._xscale	= i > 1 ? width : innerWidth;
				fa._yscale	= (i%2 == 0 ? 1 : -1) * (i > 1 ? height : innerHeight);
			} else if (page[name2[i]] != null) {
				page[name2[i]].removeMovieClip();
				page[name2[i]]			= null;
			}
		}
		this.handleEvent("onSetFlipArea", page);
	};

	//adjust the size of the flip areas in the specified page
	private._adjustFlipSize = function (page) {
		var name			= ["faTopInner", "faBottomInner", "faTop", "faBottom"];
		var pageHeight		= this._pageHeight;
		var width			= -page.side * this._flipSize.width / 100 * this._pageWidth;
		var height			= this._flipSize.height / 100 * pageHeight;
		var innerWidth		= -page.side * this._flipSize.innerWidth / 100 * this._pageWidth;
		var innerHeight		= this._flipSize.innerHeight / 100 * pageHeight;
		for (var i = 0; i < 4; i++) {
			var fa			= page[name[i]];
			if (fa == null) continue;
			fa._y			= (i%2 == 0 ? 0 : pageHeight) - (page.position.top < 0 ? pageHeight : 0);
			fa._xscale		= i > 1 ? width : innerWidth;
			fa._yscale		= (i%2 == 0 ? 1 : -1) * (i > 1 ? height : innerHeight);
		}
	};

	//onPress event handler of flip areas
	private._faPress = function () {
		this._parent._parent.main.startFlip(this._parent._parent.index,
			{FlipArea0:"topInner", FlipArea1:"bottomInner", FlipArea2:"top", FlipArea3:"bottom"}[this._name]);
	};

	//onPress event handler of flip areas
	private._faRelease = function () {
		this._parent._parent.main.stopFlip(this._parent._parent.index);
	};

	//onMouseMove event handler
	private._onMouseMove = function () {
		var mx	= this._xmouse;
		var my	= this._ymouse;
		for (var i in this._flipPages) {
			var pos			= this._pages[i].position;
			if (pos.trackMouse) {
				pos.aimX	= mx;
				pos.aimY	= my;
			}
		}
	};

	//adjust position according to the neighbour pages
	private._adjustPagePos = function (page) {
		var pos			= page.position;
		if (pos == null) return;
		var range		= this._getMaskRange(-page.side*pos.x, pos.top>0 ? pos.y : this._pageHeight-pos.y);
		var innerRange	= this._flipPages[page.index + 2*page.side].position.range;
		var outterRange	= this._flipPages[page.index - 2*page.side].position.range;
		var a			= range.a;
		var b			= range.b;
		var type		= range.type;
		if (innerRange != null) {
			if (a > innerRange.a) a = innerRange.a;
			if (type > innerRange.type) {
				type	= innerRange.type;
				b		= innerRange.b;
			} else if (type == innerRange.type && b > innerRange.b) {
				b		= innerRange.b;
			}
		}
		if (outterRange != null) {
			if (a < outterRange.a) a = outterRange.a;
			if (type < outterRange.type) {
				type	= outterRange.type;
				b		= outterRange.b;
			} else if (type == outterRange.type && b < outterRange.b) {
				b		= outterRange.b;
			}
		}
		if (a == range.a && b == range.b && type == range.type) {
			pos.range	= range;
		} else {
			var angle	= (type == 0 ? Math.atan2(b, a) : Math.atan2(this._pageHeight, a - b)) * 2;
			pos.range	= this._getMaskRange(this._pageWidth - a * (1-Math.cos(angle)), a * Math.sin(angle));
		}
		this._adjustPage(page);
	};

	//set the settings of boundary shade or page shadow
	private._shadeSetting = function (name, value) {
		var mcName		= {_shade:"shade", _pageShadow:"shadow"}[name];
		var setting		= this[name];
		if (value.show != null) setting.show = value.show ? true : false;
		if (value.color != null) setting.color = parseInt(value.color) & 0xffffff;
		var rangeName	= {sizeMin:0, sizeMax:1, alphaMin:2, alphaMax:3};
		for (var i in rangeName) {
			if (value[i] != null) setting[i] = value[i] > 0 ? Number(value[i]) : 0;
		}
		var width		= this._pageWidth;
		for (var i in this._pages) {
			var page	= this._pages[i];
			var mc		= page[mcName];
			if (!setting.show && mc != null) {
				mc.removeMovieClip();
				mc		= page[mcName] = null;
			}
			if (!setting.show) return;
			if (mc == null) {
				mc		= name == "_shade"
						? (page.shade = page.face.attachMovie("PageShade", "ShadeMC", this._shadeDepth))
						: (page.shadow = page.attachMovie("PageShade", "ShadowMC", this._shadowDepth));
			}
			(new Color(mc)).setRGB(setting.color);
			if (name == "_shadow") {
				mc._visible		= page.position != null;
sigue
__________________
-- Cuando sientas miedo y no tengas un hombro dónde apoyarte, no te hundas en la soledad, pues si lo haces fracasarás --
  #8 (permalink)  
Antiguo 22/11/2007, 03:31
Avatar de zaida  
Fecha de Ingreso: noviembre-2006
Ubicación: Madrid (España)
Mensajes: 266
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: mover fotogramas clave en la linea de tiempo

Código:
				if (page.position == null) continue;
			}
			var ratio	= page.shadeRatio;
			mc._xscale	= (ratio * setting.sizeMax + (1-ratio) * setting.sizeMin) / 100 * width * page.side;
			mc._alpha	= ratio * setting.alphaMax + (1-ratio) * setting.alphaMin;
		}
	};

//PUBLIC METHODS
	//resize the page
	public.resizePage = function (width, height) {
		if (width != null && !isNaN(width)) this._pageWidth = Number(width);
		if (height != null && !isNaN(height)) this._pageHeight = Number(height);
		var width			= this._pageWidth;
		var height			= this._pageHeight;
		var adjustEven		= this._adjustEvenPage;
		for (var i in this._pages) {
			if (this._flipPages[i] != null) continue;
			var page		= this._pages[i];
			page.page._x	= !adjustEven ? width * -page.side : page.side<0 ? 0 : -width;
			if (page.rearPage != null) page.rearPage._x = !adjustEven ? page.page._x : page.side<0 ? width : 0;
			this._adjustPage(page);
			this._adjustFlipSize(page);
			this.handleEvent("onResizePage", page, width, height);
		}
		for (var i in this._flipPages) {
			var page		= this._pages[i];
			page.page._x	= !adjustEven ? width * -page.side : page.side<0 ? 0 : -width;
			if (page.rearPage != null) page.rearPage._x = !adjustEven ? page.page._x : page.side<0 ? width : 0;
			var pos			= page.position;
			if (pos.top < 0) {
				page.page._y		= -height;
				page.rearPage._y	= -height;
			}
			if (pos.trackMouse == null) {
				pos.aimX	= width * (pos.x < 0 ? -1 : 1);
				pos.aimY	= pos.top > 0 ? 0 : height;
			}
			this._adjustPagePos(page);
			this._adjustFlipSize(page);
			this.handleEvent("onResizePage", page, width, height);
		}
	};
//set the sizes of the flip areas
	public.setFlipSize = function (width, height, innerWidth, innerHeight) {
		var flipSize	= typeof(width) == "object" ? width
						: {width:width, height:height, innerWidth:innerWidth, innerHeight:innerHeight};
		for (var i in this._flipSize) {
			if (flipSize[i] != null && !isNaN(flipSize[i])) this._flipSize[i] = Number(flipSize[i]);
		}
		for (var i in this._pages) this._adjustFlipSize(this._pages[i]);
	};

	//start to flip the page at the specified index by the certain corner
	public.startFlip = function (index, corner, aimX, aimY) {
		//validate page
		index			= int(index);
		var pages		= this._pages;
		var page		= pages[index];
		if (page == null) return false;
		var side		= page.side;
		if (side < 0 ? index <= this._firstPage : index >= this._lastPage) return false;
		corner			= {top:1, bottom:-1, topInner:2, bottomInner:-2}[corner];
		if (corner == null) corner = 1;
		//create new flipped page
		var width		= this._pageWidth;
		var height		= this._pageHeight;
		var curPage		= this._curPage;
		var flipped		= this._flipCount;
		var topDepth	= this._topPageDepth;
		if (flipped != 0) {
			//there's flipped pages
			var s		= flipped < 0 ? -1 : 1;
			if (index < curPage + (s<0 ? flipped*2 : 0) || index > curPage+1 + (s<0 ? 0 : flipped*2)) return false;
			var f		= curPage + (s<0 ? 0 : 1);
			var top		= pages[f + s].position.top;
			if (corner != top * (side == s ? 1 : 2)) return false;
			if (index == f + flipped*2) {
				//flip the outter corner page
				if (!this._multiFlip) return false;
				flipped			= this._flipCount = flipped + s;
				var n			= (this._visiblePages + flipped * s - 1) * 2;
				this._createPage(f + n * s, topDepth-n - (s<0 ? 0 : 1));
				page			= this._createPage(f-s + flipped*2, topDepth + flipped*s,
								  {x:width*s, y:top>0 ? 0 : height, top:top});
			} else if (index == f - s) {
				//flip the opposite page
				if (!this._multiFlip) return false;
				f				= (this._curPage -= 2*s) + (s<0 ? 0 : 1);
				flipped			= this._flipCount = flipped + s;
				var n			= (this._visiblePages - 1) * 2;
				var m			= flipped * s * 2;
				this._createPage(f, 0);
				for (var i = n+m; i >= 0; i -= 2) pages[f + i*s].swapDepths(topDepth-i - (s<0 ? 0 : 1));
				for (var i = m; i >= 2; i -= 2) pages[f + (i-1)*s].swapDepths(topDepth + i/2);
				this._createPage(f - (1+n)*s, 0);
				for (var i = 0; i <= n; i += 2) pages[f - (i+1)*s].swapDepths(topDepth-i - (s<0 ? 1 : 0));
				page			= pages[f + s];
				page.position	= {x:-width*s, y:top>0 ? 0 : height, top:top};
				this._adjustPage(page);
			} else if (side == s) {
				//flip the flipped page
				page			= pages[index + s];
			}
		} else {
			//there's no flipped page
			if (index < curPage || index > curPage+1) return false;
			var f		= curPage + (side<0 ? 0 : 1);
			var n		= this._visiblePages * 2;
			if (Math.abs(corner) == 1) {
				//flip at outter corner
				flipped			= this._flipCount = side;
				this._createPage(f + n * side, topDepth - n - (side<0 ? 0 : 1));
				page			= this._createPage(f + side, topDepth + 1,
								  {x:width*side, y:corner > 0 ? 0 : height, top:corner});
			} else {
				//flip at inner corner
				flipped			= this._flipCount = -side;
				for (var i = n; i >= 2; i -= 2) pages[f - (i-1)*side].swapDepths(topDepth-i - (side<0 ? 1 : 0));
				f				= (this._curPage += 2*side) + (side<0 ? 0 : 1);
				this._createPage(f - side, topDepth + (side<0 ? -1 : 0));
				page.swapDepths(topDepth + 1);
				page.position	= {x:width*side, y:corner > 0 ? 0 : height, top:corner/2};
				this._adjustPage(page);
				this._createPage(f + (n - 2) * side, 0);
				for (var i = 0; i <= n - 2; i += 2) pages[f + i*side].swapDepths(topDepth-i - (side<0 ? 0 : 1));
			}
		}
//set flipped page
		this._adjustFlipSize(page);
		var pos			= page.position;
		pos.trackMouse	= aimX == null;
		pos.aimX		= aimX == null ? this._xmouse : Number(aimX);
		pos.aimY		= aimX == null ? this._ymouse : Number(aimY);
		this._flipPages[page.index]	= page;
		this.handleEvent("onStartFlip", page);
		return true;
	};

	//stop a flipped page, if index is null, all flipped page will be stoped, side can be 'left' or 'right'
	public.stopFlip = function (index, finish, side) {
		var flipped			= this._flipCount;
		if (flipped == 0) return false;
		//stop all flipped pages
		if (index == null) {
			if (finish) {
				while (this._flipCount != 0) {
					for (var i in this._flipPages) this.stopFlip(i, true);
				}
			} else {
				for (var i in this._flipPages) this.stopFlip(i);
			}
			return true;
		}
		//set the aim position
		index		= int(index);
		index		-= flipped < 0 ? (index%2 == 0 ? 1 : 0) : (index%2 == 0 ? 0 : -1);
		var page	= this._flipPages[index];
		var pos		= page.position;
		if (pos == null) return false;
		if (pos.trackMouse != null) {
			pos.trackMouse		= null;
			side				= {left:-1, right:1}[side];
			pos.aimX			= this._pageWidth * (side != null ? side : pos.x < 0 ? -1 : 1);
			pos.aimY			= pos.top > 0 ? 0 : this._pageHeight;
		}
		if (!finish) {
			this.handleEvent("onStopFlip", page);
			return true;
		}
		//finish flipping
		var side	= page.side;
		var n		= this._visiblePages * 2;
		if (pos.aimX * side > 0 && index == this._curPage + (side > 0 ? -1 : 2)) {
			//flip to the face side
			var pages			= this._pages;
			var topDepth		= this._topPageDepth;
			var m				= flipped * -side * 2;
			this._removePage(pages[index + side]);
			this._removePage(pages[index + n*side]);
			for (var i = n-2; i >= 0; i -= 2) pages[index + i*side].swapDepths(topDepth-i - (side>0 ? 1 : 0));
			for (var i = 2; i < n+m; i += 2) pages[index + (1-i)*side].swapDepths(topDepth-i + (side>0 ? 2 : 1));
			for (var i = 2; i < m; i += 2) pages[index - i*side].swapDepths(topDepth + i/2);
			this._curPage		-= 2 * side;
			this._flipCount	+= side;
			delete this._flipPages[index];
			page.position		= null;
			this.handleEvent("onFinishFlip", page);
			this._adjustPage(page);
			this._adjustFlipSize(page);
		} else if (pos.aimX * side < 0 && index == this._curPage + (side > 0 ? 1 : 0) + flipped*2) {
			//flip to the corner side
			this.handleEvent("onFinishFlip", page);
			this._removePage(page);
			this._removePage(this._pages[index - (n - 1) * side]);
			this._adjustPage(this._pages[index + side]);
		} else {
			return false;
		}
		return true;
	};
sigue:
__________________
-- Cuando sientas miedo y no tengas un hombro dónde apoyarte, no te hundas en la soledad, pues si lo haces fracasarás --
  #9 (permalink)  
Antiguo 22/11/2007, 03:32
Avatar de zaida  
Fecha de Ingreso: noviembre-2006
Ubicación: Madrid (España)
Mensajes: 266
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: mover fotogramas clave en la linea de tiempo

Código:
//set flipped page's aim position, if not given, it will be set to track mouse
	public.setAimPos = function (index, aimX, aimY) {
		var page		= this._flipPages[int(index)];
		if (page == null) return false;
		var pos			= page.position;
		pos.trackMouse	= aimX == null;
		pos.aimX		= aimX == null ? this._xmouse : Number(aimX);
		pos.aimY		= aimX == null ? this._ymouse : Number(aimY);
		return true;
	};

	//onEnterFrame event handler
	public.onEnterFrame = function () {
		var moveAcc			= this._moveAccRatio;
		var dragAcc			= this._dragAccRatio;
		for (var i in this._flipPages) {
			var page		= this._pages[i];
			var pos			= page.position;
			if (pos.trackMouse == null) {
				if (moveAcc == 0) continue;
				pos.x		+= (pos.aimX - pos.x) * moveAcc;
				if (pos.range.angle < 0 && pos.x * page.side < 0) {
					pos.y	+= (pos.aimY - pos.y) * moveAcc * 2;
				} else {
					pos.y	+= (pos.aimY - pos.y) * moveAcc;
				}
				this._adjustPagePos(page);
				this.handleEvent("onMovePage", page, pos.x, pos.y);
				var dx		= pos.aimX - pos.x;
				var dy		= pos.aimY - pos.y;
				if (Math.sqrt(dx*dx + dy*dy) <= Math.abs(this.posPrecision)) this.stopFlip(i, true);
			} else {
				if (dragAcc == 0) continue;
				pos.x		+= (pos.aimX - pos.x) * dragAcc;
				pos.y		+= (pos.aimY - pos.y) * dragAcc;
				this._adjustPagePos(page);
				this.handleEvent("onDragPage", page, pos.x, pos.y, pos.trackMouse);
			}
		}
	};

	//goto the specified page
	public.gotoPage = function (index, rebuildPages) {
		if (index == null || isNaN(index)) return false;
		index		= Math.floor(int(index)/2) * 2;
		if (index < Math.floor(this._firstPage/2) * 2) index = Math.floor(this._firstPage/2) * 2;
		if (index > Math.floor(this._lastPage/2) * 2) index = Math.floor(this._lastPage/2) * 2;
		if (this._pretreating) {
			this._curPage		= index;
		} else if (rebuildPages) {
			for (var i in this._pages) this._removePage(this._pages[i]);
			var visiblePages	= this._visiblePages;
			var topDepth		= this._topPageDepth;
			for (var i = 0, j = index; i < visiblePages; i++, j-=2) this._createPage(j, topDepth - i*2);
			for (var i = 0, j = index+1; i < visiblePages; i++, j+=2) this._createPage(j, topDepth - i*2 - 1);
			this._curPage		= index;
		} else {
			this.stopFlip(null, true);
			var curPage			= this._curPage;
			this._curPage		= index;
			if (index == curPage) return true;
			var pages			= {};
			for (var i in this._pages) {
				var j			= i - curPage + index;
				pages[j]		= this._pages[i];
				pages[j].index	= j;
				pages[j]._name	= "Page" + j;
			}
			this._pages			= pages;
		}
		return true;
	};

	//set the index range of the pages
	public.setPageRange = function (first, last) {
		first		= first != null && !isNaN(first) ? (this._firstPage = int(first)) : this._firstPage;
		last		= last != null && !isNaN(last) ? (this._lastPage = int(last)) : this._lastPage;
		if (last < first) {
			var t	= first;
			first	= this._firstPage = last;
			last	= this._lastPage = t;
		}
		this.gotoPage(this._curPage, true);
	};

//GETTER/SETTER PROPERTIES
	//the width of the page
	gsProperty("pageWidth", function () { return this._pageWidth },
		function (value) { this.resizePage(value) }
	);

	//the height of the page
	gsProperty("pageHeight", function () { return this._pageHeight },
		function (value) { this.resizePage(null, value) }
	);

	//the linkage id of the page content movie clip
	gsProperty("pageId", function () { return this._pageId },
		function (value) {
			if (typeof(value) != "string") value = "";
			if (this._pageId == value) return;
			this._pageId	= value;
			for (var i in this._pages) this._createPageMC(this._pages[i]);
		}
	);

	//if adjust even page's content position
	gsProperty("adjustEvenPage", function () { return this._adjustEvenPage },
		function (value) {
			var adjustEven		= this._adjustEvenPage = value ? true : false;
			var width			= this._pageWidth;
			for (var i in this._pages) {
				var page		= this._pages[i];
				page.page._x	= !adjustEven ? width * -page.side : page.side<0 ? 0 : -width;
				if (page.rearPage != null) page.rearPage._x = !adjustEven ? page.page._x : page.side<0 ? width : 0;
			}
		}
	);

	//automatically go to the definite frame when the page movie clip is created
	gsProperty("autoPage", function () { return this._autoPage },
		function (value) {
			if (this._autoPage = value ? true : false) {
				for (var i in this._pages) {
					var page	= this._pages[i];
					page.page.gotoAndStop(page.index - this._firstPage + 1);
					page.rearPage.gotoAndStop(page.rearPage.index - this._firstPage + 1);
				}
			}
		}
	);

	//first page's index
	gsProperty("firstPage", function () { return this._firstPage },
		function (value) { this.setPageRange(value) }
	);

	//last page's index
	gsProperty("lastPage", function () { return this._lastPage },
		function (value) { this.setPageRange(null, value) }
	);

	//index of the current page
	gsProperty("curPage", function () { return this._curPage }, public.gotoPage);

	//max count of the visible pages on one side
	gsProperty("visiblePages", function () { return this._visiblePages },
		function (value) {
			var visiblePages	= this._visiblePages;
			this._visiblePages	= value = value > 1 ? int(value) : 1;
			if (this._pretreating || visiblePages == value) return;
			var flipped			= this._flipCount;
			if (visiblePages > value) {
				var index1		= this._curPage - value*2 + (flipped < 0 ? flipped*2 : 0);
				var index2		= this._curPage+1 + value*2 + (flipped > 0 ? flipped*2 : 0);
				for (var i = value; i < visiblePages; i++, index1 -= 2, index2 += 2) {
					this._removePage(this._pages[index1]);
					this._removePage(this._pages[index2]);
				}
			} else {
				var index1		= this._curPage - visiblePages*2 + (flipped < 0 ? flipped*2 : 0);
				var index2		= this._curPage+1 + visiblePages*2 + (flipped > 0 ? flipped*2 : 0);
				for (var i = visiblePages; i < value; i++, index1 -= 2, index2 += 2) {
					this._createPage(index1, this._topPageDepth + (index1 - this._curPage));
					this._createPage(index2, this._topPageDepth - (index2 - this._curPage));
				}
			}
		}
	);
sigue:
__________________
-- Cuando sientas miedo y no tengas un hombro dónde apoyarte, no te hundas en la soledad, pues si lo haces fracasarás --
  #10 (permalink)  
Antiguo 22/11/2007, 03:32
Avatar de zaida  
Fecha de Ingreso: noviembre-2006
Ubicación: Madrid (España)
Mensajes: 266
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: mover fotogramas clave en la linea de tiempo

Código:
	//if the rear page is shown (used in transparent pages)
	gsProperty("showRearPage", function () { return this._showRearPage },
		function (value) {
			this._showRearPage	= value ? true : false;
			var rearDepth		= this._rearPageDepth;
			var width			= this._pageWidth;
			var adjustEven		= this._adjustEvenPage;
			for (var i in this._pages) {
				var page		= this._pages[i];
				var rear		= page.rearPage;
				if (!value && rear != null) {
					this.handleEvent("onRemovePage", rear, true);
					rear.removeMovieClip();
					rear		= page.rearPage = null;
				}
				if (!value || rear != null) return;
				var index		= page.index + page.side;
				if (index < this._firstPage || index > this._firstPage) continue;
				rear			= page.rearPage = this._pageId == ""
								? page.face.createEmptyMovieClip("RearPageMC", rearDepth)
								: page.face.attachMovie(this._pageId, "RearPageMC", rearDepth);
				rear.index		= index;
				rear._xscale	= -100;
				rear._x			= !adjustEven ? page.page._x : page.side<0 ? width : 0;
				if (this._autoPage) rear.gotoAndStop(index - this._firstPage + 1);
				this.handleEvent("onCreatePage", rear, true);
			}
		}
	);

	//the settings of the boundary shade
	gsProperty("shade", function () { return this._shade },
		function (value) { this._shadeSetting("_shade", value) }
	);

	//the settings of the page shadow
	gsProperty("pageShadow", function () { return this._pageShadow },
		function (value) { this._shadeSetting("_pageShadow", value) }
	);

	//the button areas that can respond to the flip action
	gsProperty("flipArea", function () { return this._flipArea },
		function (value) {
			for (var i in this._flipArea) {
				if (value[i] != null && !isNaN(value[i])) this._flipArea[i] = value[i] ? true : false;
			}
			for (var i in this._pages) this._setFlipArea(this._pages[i]);
		}
	);

	//the size (in percentage of the page width) of the flip areas
	gsProperty("flipSize", function () { return this._flipSize }, public.setFlipSize);

	//the dragging accelerate ratio (0~1)
	gsProperty("dragAccRatio", function () { return this._dragAccRatio },
		function (value) { this._dragAccRatio = value > 1 ? 1 : value > 0 ? Number(value) : 0 }
	);

	//the moving accelerate ratio (0~1)
	gsProperty("moveAccRatio", function () { return this._moveAccRatio },
		function (value) { this._moveAccRatio = value > 1 ? 1 : value > 0 ? Number(value) : 0 }
	);

	//if multiple flipping is allowed
	gsProperty("multiFlip", function () { return this._multiFlip },
		function (value) { this._multiFlip = value ? true : false }
	);

	//if the pages can response to mouse actions
	gsProperty("active", function () { return this._active },
		function (value) {
			this._active	= value = value ? true : false;
			for (var i in this._pages) {
				var page	= this._pages[i];
				page.faTop.enabled			= value;
				page.faBottom.enabled		= value;
				page.faTopInner.enabled		= value;
				page.faBottomInner.enabled	= value;
			}
			if (value) this.onMouseMove = this._onMouseMove;
			else delete this.onMouseMove;
		}
	);

	//list of the visible page objects
	gsProperty("pages", function () { return this._pages });

	//list of the flipped page objects
	gsProperty("flipPages", function () { return this._flipPages });

	//the main flipped page's index (nearest to the current page)
	gsProperty("flipPage", function () {
		return this._flipCount == 0 ? null : this._curPage + (this._flipCount < 0 ? -1 : 2);
	});

	//count of the flipped pages (<0 means the flipped pages are on the left)
	gsProperty("flipCount", function () { return this._flipCount });

	//if it is flipping now
	gsProperty("flipping", function () { return this._flipCount != 0 });
}

} //end of FFlipPage definition

#endinitclip
Muchas gracias y saludos
__________________
-- Cuando sientas miedo y no tengas un hombro dónde apoyarte, no te hundas en la soledad, pues si lo haces fracasarás --
  #11 (permalink)  
Antiguo 22/11/2007, 06:21
Avatar de zaida  
Fecha de Ingreso: noviembre-2006
Ubicación: Madrid (España)
Mensajes: 266
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: mover fotogramas clave en la linea de tiempo

Aquí les dejo el link al archivo que me descargué, creo que será mas fácil para mirar el código.


http://www.goowy.com/filedhc8fb2l85-...-fla-demo.html

Saludos y y mil gracias
__________________
-- Cuando sientas miedo y no tengas un hombro dónde apoyarte, no te hundas en la soledad, pues si lo haces fracasarás --

Última edición por zaida; 22/11/2007 a las 06:36
  #12 (permalink)  
Antiguo 22/11/2007, 07:33
Avatar de zaida  
Fecha de Ingreso: noviembre-2006
Ubicación: Madrid (España)
Mensajes: 266
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: mover fotogramas clave en la linea de tiempo

Hola de nuevo, me he descargado éste archivo también, pero el problema que tengo con éste es que no se dónde se cambian los textos.

Aquí os dejo el link,si alguien puede ayudarme me valdría cuanquiera de los dos libros:

http://www.flashkit.com/movies/Appli...4481/index.php

Saludos y gracias de nuevo
__________________
-- Cuando sientas miedo y no tengas un hombro dónde apoyarte, no te hundas en la soledad, pues si lo haces fracasarás --
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 01:05.