Comunidad de diseño web y desarrollo en internet online

Problema con SWFLoader y video de youtube en Flex

Citar            
MensajeEscrito el 27 May 2009 01:30 am
Hola Buenas Noches! Mi problema es el siguiente: cuando cargo el video de youtube en mi proyecto de flex se ve bien pero cuando lo meto a la pgina web el video se va a una resolucion mayor, osea hace esto http://ozmozis.zobyhost.com/videos.html (presionen sobre el boto "fell in love" y veran que hace) y si vuelven a presionar sobre el me da una resolucion mas baja.

mi codigo es:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" borderColor="#083A5E" borderStyle="solid" borderThickness="3" cornerRadius="8" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#120101, #886312]">
<mx:Button x="10" y="26" label="Fell in Love" width="97" color="#F0F7F8" cornerRadius="0" fillAlphas="[1.0, 1.0]" fillColors="[#0D0A00, #460202]" borderColor="#F2F6F8" alpha="1.0" themeColor="#E8EEF2" fontFamily="Arial" fontWeight="bold" fontSize="11" id="fell_in_love" click="Init()"/>
<mx:Script>
<![CDATA[
private function Init():void{
var url:String = "http://www.youtube.com/v/CM25VDEE-3A&hl=es&fs=1";
Security.allowDomain(url);
youtubevid.load(url);
}
]]>
</mx:Script>
<mx:SWFLoader x="147" y="47" width="316" height="256" id="youtubevid" visible="true"/>
</mx:Application>


De antemano gracias!

Por sadrac7

3 de clabLevel



 

firefox
Citar            
MensajeEscrito el 27 May 2009 11:17 am
Eso es porque tienes un width y height fijos en el SWFLoader y las siguientes veces carga del cache. Oculta el botón una vez que han cargado el video. En init agrega

fell_in_love.visible = false

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 27 May 2009 09:01 pm
Voy a probar y te aviso que tal!

Por sadrac7

3 de clabLevel



 

firefox
Citar            
MensajeEscrito el 28 May 2009 12:37 am
Ya lo solucione y tu idea fue la que me ayudo solisarg, gracias!

Por sadrac7

3 de clabLevel



 

firefox

 

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