Comunidad de diseño web y desarrollo en internet online

problemas con Coverflow en modo FullScreen

Citar            
MensajeEscrito el 30 Jul 2008 12:08 am
Hola a todos, estoy haciendo un proyecto en el cual utilizo un Coverflow, en modo normal todo funciona perfectamente pero al verlo en modo fullscreen el flash player colapsa ya sea visto en firefox o ie y cuelgan el browser. Antes de colgarse esta es la linea de error que me arrojaba el debugger:

Código :

warning: unable to bind to property 'numChildren' on class 'com.dougmccune.containers::CoverFlowContainer'


Si alguien tiene alguna info o sabe que puede ser le agradecería su ayuda (y)

El codigo del Coverflow es el siguiente:



Código :

package com.dougmccune.containers
{
   import caurina.transitions.Tweener;
   
   import flash.display.DisplayObject;
   import flash.geom.ColorTransform;
   
   import mx.core.EdgeMetrics;
   
   import org.papervision3d.objects.DisplayObject3D;
   
   public class CoverFlowContainer extends BasePV3DContainer
   {
      /**
       * The angle that each Plane is rotated on the y axis. 
This corresponds to PaperVision's yRotation property on
       * the Plane. This is in degrees and should range from 0-90. 
A value of 0 means no rotation is applied and a value of 90
       * would mean the Plane is rotated so much that it would effectively disappear.
       */
      public var rotationAngle:Number = 70;
      
      /**
       * If true the Planes near the edge of the component will fade to transparent. 
Kind of a cool effect sometimes
       * if you want it.
       */
      public var fadeEdges:Boolean = false;
      
      /**
       * @private
       * 
       * For some of the layout stuff we need to know the max height of all the children. 
As children are
       * added we make sure to update maxChildHeight.
       */
      protected var maxChildHeight:Number;
      
      /**
       * @private
       * 
       * For some of the layout stuff we need to know the max width of all the children.
 As children are
       * added we make sure to update maxChildWidth.
       */
      protected var maxChildWidth:Number;
      
      override public function addChild(child:DisplayObject):DisplayObject {
         super.addChild(child);
         
         if(isNaN(maxChildHeight) || child.height > maxChildHeight) {
            maxChildHeight = child.height;
         }
         
         return child;
      }
      
      override protected function layoutChildren(unscaledWidth:Number, unscaledHeight:Number):void {
         super.layoutChildren(unscaledWidth, unscaledHeight);
         
         layoutCoverflow(unscaledWidth, unscaledHeight);
      }
         
      protected function layoutCoverflow(uncaledWidth:Number, unscaledHeight:Number):void {
            
         var n:int = numChildren;
         for(var i:int=0; i<n; i++) {
            var child:DisplayObject = getChildAt(i);
            var plane:DisplayObject3D = lookupPlane(child);
            plane.container.visible = true;
            
            var abs:Number = Math.abs(selectedIndex - i);
            
            var horizontalGap:Number = getStyle("horizontalSpacing");
            if(isNaN(horizontalGap)) {
               //this seems to work fairly well as a default
               horizontalGap = maxChildHeight/3;
            }
            
            var verticalGap:Number = getStyle("verticalSpacing");
            if(isNaN(verticalGap)) {
               verticalGap = 10;
            }
            
            var xPosition:Number = selectedChild.width + ((abs-1) * horizontalGap);
            var yPosition:Number = -(maxChildHeight - child.height)/2;
            var zPosition:Number = camera.z/2 + selectedChild.width + abs * verticalGap;
            
            var yRotation:Number = rotationAngle;
            
            //some kinda fuzzy math here, I dunno, I was just playing with values
            //note that this only gets used if fadeEdges is true below
            var alpha:Number = (unscaledWidth/2 - xPosition) / (unscaledWidth/2);
            alpha  = Math.max(Math.min(alpha*2, 1), 0);
            
            if(i < selectedIndex) {
               xPosition *= -1;
               yRotation *= -1;
            }
            else if(i==selectedIndex) {
               xPosition = 0;
               zPosition = camera.z/2;
               yRotation = 0;
               alpha = 1;
            }
            
            if(fadeEdges) {
               //here's something sneaky. 
//PV3D applies the colorTransform of the source movie clip to the
               //bitmapData that's created. 
//So if we adjust the colorTransform that will be shown in the
               //3D plane as well. Cool, huh?
               var colorTransform:ColorTransform  = child.transform.colorTransform;
               colorTransform.alphaMultiplier = alpha;
               child.transform.colorTransform = colorTransform;
               plane.material.updateBitmap();
            }
            
            if(reflectionEnabled) {
               var reflection:DisplayObject3D = lookupReflection(child);
               
               if(fadeEdges) {
                  reflection.material.updateBitmap();
               }
               
               //drop the reflection down below the plane and put in a gap of 2 
//pixels. Why 2 pixels? I think it looks nice.
               reflection.y = yPosition - child.height - 2;
               
               if(i!=selectedIndex) {
                  Tweener.addTween(reflection, {z:zPosition, time:tweenDuration/3});
                  Tweener.addTween(reflection, {x:xPosition, rotationY:yRotation, time:tweenDuration});
               }
               else {
                  Tweener.addTween(reflection, {x:xPosition, z:zPosition, rotationY:yRotation, time:tweenDuration});
               }
            }
            
            if(i!=selectedIndex) {
               Tweener.addTween(plane, {z:zPosition, time:tweenDuration/3});
               Tweener.addTween(plane, {x:xPosition, y:yPosition, rotationY:yRotation, time:tweenDuration});
            }
            else {
               Tweener.addTween(plane, {x:xPosition, y:yPosition, z:zPosition, rotationY:yRotation, time:tweenDuration});
            }
            
            if(i == selectedIndex) {
               var bm:EdgeMetrics = borderMetrics;
      
               //We need to adjust the location of the selected child so
               //it exactly lines up with where our 3D plane will be. 
               child.x = unscaledWidth/2 - child.width/2 - bm.top;
               child.y = unscaledHeight/2 - child.height/2 - yPosition - bm.left;
               
               //the normal ViewStack sets the visibility of the selectedChild.
//That's no good for us,
               //so we just reset it back. 
               child.visible = false;
            }
         }
      }
   }
}

Por JJJDDD

453 de clabLevel

3 tutoriales

 

in my head

firefox
Citar            
MensajeEscrito el 30 Jul 2008 09:57 am
Me pasó un unos Cellrenderer de un list, bajo determinadas condiciones no podía hacer el binding y me largaba el warning. De todas formas no afectaba el funcionamiento de la aplicación (en general no se percibe error en la UI) así que pude vivir feliz con ello

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 30 Jul 2008 03:09 pm

solisarg escribió:

Me pasó un unos Cellrenderer de un list, bajo determinadas condiciones no podía hacer el binding y me largaba el warning. De todas formas no afectaba el funcionamiento de la aplicación (en general no se percibe error en la UI) así que pude vivir feliz con ello

Jorge


Aha, el funcionamiento de mi aplicación en modo normal, osea visto como una web común, todo funciona muy bien, el problema del colapso del flash player es cuando estamos navegando en la app en modo fullscreen y entramos el state que contiene el Coverflow con imágenes. No se que podrá ser, creo que tendre que inhabilitar la función del modo fullscreen, tan bien que se veía :cry: .

Por JJJDDD

453 de clabLevel

3 tutoriales

 

in my head

firefox
Citar            
MensajeEscrito el 30 Jul 2008 03:28 pm
¿Pero funciona mal?

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 30 Jul 2008 04:27 pm

solisarg escribió:

¿Pero funciona mal?

Jorge


Hola Jorge, mira te explico, mi app funciona bien en modo normal es decir cuando no esta en modo fullscreen toda la app corre perfectamente, el problema se da cuando en la pagina de bienvenida escoges la opcion fullscreen y luego ingresas al state donde se encuentra el coverflow, en ese instante el flash player colapsa y cuelga totalmente el browser ya sea FF o IE. Ese es el problema.

Jorge.....tambien ^^

Por JJJDDD

453 de clabLevel

3 tutoriales

 

in my head

firefox

 

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