Comunidad de diseño web y desarrollo en internet online

Problema stage.stageWidth en Fullscreen

Citar            
MensajeEscrito el 08 Ago 2011 04:15 pm
Amigos una consulta estoy haciendo un scroller que se sale de los limites del escenario cuando hago un fullscreen NO_SCALE, el codigo que estoy usando es:

Código ActionScript :

import flash.display.StageScaleMode;
stage.scaleMode = StageScaleMode.NO_SCALE;
....

function moveScrollerThumbs(e:Event):void {
   if ( mouseY > scroller.y && mouseY < scroller.y + scroller.height) {//vertically over scroller
      if (mouseX < stage.stageWidth/2 - padding*2 && mouseX > 0) {//left of stage explicitly
         speed = -(mouseX - (stage.stageWidth/2 - padding*2)) / 8;
      }
      else if (mouseX > stage.stageWidth/2 + padding*2 && mouseX < stage.stageWidth) {//right of stage explicitly
         speed = -(mouseX - (stage.stageWidth/2 + padding*2)) / 8;
      }
      else {
         speed = 0;
      }
      scroller.x += speed;
      
      //scroller limits
      if (scroller.x < -scroller.width + stage.stageWidth - padding) { //if scrolled too far left
         scroller.x = -scroller.width + stage.stageWidth - padding;

      }
      else if (scroller.x > padding) { //if scrolled to far right
         scroller.x = padding;
      }
   }
}


Sospecho que tiene que ver con scroller.x < -scroller.width + stage.stageWidth - padding donde padding es 20px.

Alguna ayuda o pista por favor

Muchas gracias

Por albax

1 de clabLevel



 

firefox
Citar            
MensajeEscrito el 09 Ago 2011 11:18 pm
stageWidth, es para el tamaño del escenario, y cuando se hace un fullscreen que ocurre.?

Gracias por responder.

Por albax

1 de clabLevel



 

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.