Comunidad de diseño web y desarrollo en internet online

FLV estirado proporcionalmente en pantalla con AS3

Citar            
MensajeEscrito el 13 Jun 2012 09:48 pm
Hola a todos plis no encuentro como estirar proporcionalmente un flv a la resolución de la pantalla :shock:

ayudenme plis.


tnk.

Por evangelio_ra

49 de clabLevel



 

chrome
Citar            
MensajeEscrito el 14 Jun 2012 01:19 pm

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 14 Jun 2012 05:15 pm
hola evan,,, yo hace unos meses tambien tuve que hacer lo mismo que tu,,, y se me ocurrio crear esta funcion que devuelve la nueva dimension que el video tiene que tener con respecto a la pantalla y manteniendo su proporcionalidad .

Código ActionScript :

import flash.system.Capabilities;

function calculateDimension():Object
{
   var dVideo:Object = {};
   dVideo.width = myVideo.videoWidth;
   dVideo.height = myVideo.videoHeight;

   var dScreen:Object = {};
   dScreen.width = Capabilities.screenResolutionX;
   dScreen.height = Capabilities.screenResolutionY;


   if (dVideo.width >= dVideo.height)
   {

      dVideo.height = dScreen.width * dVideo.height / dVideo.width;
      dVideo.width = dScreen.width;

      if (dVideo.height > dScreen.height)
      {
         dVideo.width = dScreen.height * dVideo.width / dVideo.height;
         dVideo.height = dScreen.height;
      }

      return dVideo;
   }


   dVideo.width = dScreen.height * dVideo.width / dVideo.height;
   dVideo.height = dScreen.height;

   if (dVideo.width > dScreen.width)
   {
      dVideo.height = dScreen.width * dVideo.height / dVideo.width;
      dVideo.width = dScreen.width;
   }

   return dVideo;

}


Obviamente es mejorable ya que fue lo primero que se me ocurrio.





Probalo y avisa si te sirvio.


Saludos


eXe

Por exekiel21

Claber

164 de clabLevel



Genero:Masculino  

programador

chrome
Citar            
MensajeEscrito el 19 Jun 2012 10:10 pm
Ok gracias a los 2 voy a probar. y les estare comentando.

Por evangelio_ra

49 de clabLevel



 

chrome

 

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