Refractum
Regresar   Refractum > Tematicas > Flash

Responder
 
Herramientas Estilo
Old 13-Sep-2006, 02:14 PM   #1
quiza
Miembro Activo
Avatar de quiza
Registrado: May-2006
Location: Mexico
Posts: 256
Unhappy Navegación

Alguien sabe como sellama un tutorial, o conoce un tutorial para hacer una navegación titpo Google Earth pero en flash , me refiero a que cuando muevas el mouse se mueva tu mapa hacia los lados dependiendo de la posición ?

ando algo perdido
__________________
im not digital artist i am ...
puedes ser muy bueno en algo, pero si eres soberbio se te cerrarán muchas puertas .
quiza is offline   Citar y responder
Old 13-Sep-2006, 02:39 PM   #2
Goten
Super Activo
Avatar de Goten
Registrado: May-2006
Location: BlastedLands
Posts: 311
crea cuatro leyers

en el primero pones el codigo AS

en el segundo creas un mc del tamaño de la ventana que quieres que sea la visualizacion del mapa le pones como hitMC

en el 3ro pones una mascara del mismo tamaño del del mc de visualizacion le pones mascara

el 4to pones el mapa o una foto que sea mas grade que la visualizacion.... le pones backgroundScene y listo

acuerdate que el 3ro es una mascara que cubre al 4to

saludos quicharts



Quote:
import mx.utils.Delegate;
//Create an object that will be used as the mouse listener
this.mouseListener = new Object();
//on Event (onMouseMove) trigger the function trackMouse and assign it to this - in this case this is _root
//Delegate class - http://livedocs.macromedia.com/flash.../00003430.html
this.mouseListener.onMouseMove = Delegate.create(this, trackMouse);
//Add a listener to the mouse and assign it to the created object
Mouse.addListener(this.mouseListener);
// setup the size and position of the hitMc
hitMc._width = mascara._width;
hitMC._height = mascara._height;
hitMc._x = mascara._x;
hitMc._y = mascara._y;
//Setup the stage height and width
stageW = mascara._width;
stageH = mascara._height;
//Function called when the mouse is moved
function trackMouse() {
if (hitMc.hitTest(_root._xmouse, _root._ymouse, true)) {
//The percentages % where the mouse is on the stage
//where x=0 it is 0% and where x=Stage.width it is 100%
this.xmousePer = this._xmouse/stageW;
this.ymousePer = this._ymouse/stageH;
//new X and Y var for the background
//Also figuring out the offset of the backgroundScene to the stage width
this.bgX = this.xmousePer*-(this.backgroundScene._width-stageW);
this.bgY = this.ymousePer*-(this.backgroundScene._height-stageH);
//Assign the new x and y to the background
this.backgroundScene._x = this.bgX;
this.backgroundScene._y = this.bgY;
//Update after the mouse move
}
updateAfterEvent();
}

}
Goten is offline   Citar y responder
Old 13-Sep-2006, 02:56 PM   #3
quiza
Miembro Activo
Avatar de quiza
Registrado: May-2006
Location: Mexico
Posts: 256
Muchisimas Gracias buen Goten !! me has ayudado mucho fjiate que ahorita empezaré a experimentar con el code,,, danke !!
__________________
im not digital artist i am ...
puedes ser muy bueno en algo, pero si eres soberbio se te cerrarán muchas puertas .
quiza is offline   Citar y responder
Responder

Refractum > Tematicas > Flash > Navegación


Herramientas
Estilo

Reglas del foro
not puedes iniciar una discusión
not puedes responder a una discusión
not puedes agregar archivos adjuntos
not puedes editar tus posts

El código vB está activado
Emotíconos está activado
El código [IMG] está activado
El código HTML está desactivado
Ir a


Todas las horas son GMT -5. La hora es 12:30 PM.

Usando: vBulletin Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 2.4.0
Copyright (C) Refractum(tm) - 2006