Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/04/2010, 11:33
Avatar de Lynxcraft
Lynxcraft
 
Fecha de Ingreso: noviembre-2007
Ubicación: yecla murcia
Mensajes: 1.346
Antigüedad: 16 años, 5 meses
Puntos: 51
Respuesta: ¿Cómo se puede hacer esto? (pantalla completa)

AS3
Código PHP:
package {

    
import flash.display.*;
    
import flash.events.*
    public class 
ejemploCentarElement extends MovieClip {
        public var 
cuadro:Sprite=new Sprite();
        public function 
ejemploCentarElement():void {
            
stage.align=StageAlign.TOP_LEFT;// IMPORTANTE

        
            
cuadro.graphics.beginFill(0xCCFF00);
            
cuadro.graphics.drawRect(00100100);
            
cuadro.addEventListener(Event.ENTER_FRAME,centarCuadro)
            
addChild(cuadro)

        }
        public function 
centarCuadro(event:Event):void {
            
cuadro.x=(stage.stageWidth-cuadro.width)/2
            cuadro
.y=(stage.stageHeight-cuadro.height)/2
            
        
}
    }

el archivo java necesario lo crea el propio flash si no lo tienes aquí
http://crea-flash.com/AC_RunActiveContent.js

HTML -- JavaScript

Código PHP:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<
title>Tienda Flash</title>
<
script language="javascript">var AC_FL_RunContent 0;</script>
<script src="js/AC_RunActiveContent.js" language="javascript"></script>
</head
<body bgcolor="#FFFFFF" scroll="no" style="margin:0px">
<script language="javascript">

AC_FL_RunContent(
            'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
            'width', '100%',
            'height', '100%',
            'src', 'ejemploCentarElement',
            'quality', 'high',
            'pluginspage', 'http://www.adobe.com/go/getflashplayer_es',
            'align', 'middle',
            'play', 'true',
            'loop', 'true',
            'scale', 'noscale',
            'wmode', 'window',
            'devicefont', 'ejemploCentarElement',
            'id', 'index',
            'bgcolor', '#ffffff',
            'name', 'ejemploCentarElement',
            'menu', 'true',
            'allowFullScreen', 'false',
            'allowScriptAccess','sameDomain',
            'movie', 'ejemploCentarElement',
            'salign', ''
            ); 
</script>
</body>
</html> 
__________________
Sobran las ideas cuando faltan ganas de trabajar en ellas
Lynxcraft