Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/03/2010, 09:07
Avatar de Diegoazul
Diegoazul
 
Fecha de Ingreso: mayo-2007
Ubicación: { Dash Berlin }
Mensajes: 1.879
Antigüedad: 17 años
Puntos: 67
Respuesta: Scroll de una imagen con el mouse con as3

Intenta así:

Cita:
fondo.addEventListener(Event.ENTER_FRAME, mover);

var centro = stage.stageHeight/2;

var centro2 = stage.stageWidth/2;

function mover(e:Event):void {

var posx = stage.mouseX + (centro2 - stage.mouseX) * (fondo.width / (2 * centro2));

var posy = stage.mouseY + (centro - stage.mouseY) * (fondo.height / (2 * centro));

fondo.x += (posx-fondo.x)*0.07;

fondo.y += (posy-fondo.y)*0.07;

}
__________________
{ Flash }