Browsing articles tagged with " bitmapData"

Como hacer un fondo infinito

Dec 2, 2011   //   by EderChrono   //   Blog {es}  //  No Comments

Hay veces que necesitamos que una imagen de fondo corra indefinidamente en bucle.

La primera solución a la que llegamos la mayoría es duplicar el fondo y monitorear el movimiento para saber donde posicionarlo correctamente.

El problema con esto es que debemos de hacer varias comparaciones en el ciclo donde actualizamos la posición del fondo, además que si el fondo es muy grande, Flash tendría que manejar un objeto gráfico grande incluso cuando la mayoría de éste se encuentre fuera de la pantalla.

 

Eso es mucho fondo para nuestro pequeño stage.

La manera de evitar esto es con algunos trucos de copiado de bitmaps.
Read more >>

Looping a background efficiently and easier with as3

Dec 2, 2011   //   by EderChrono   //   Blog {en}  //  No Comments

Sometimes we need to have a seamless background running behind our game or site infinitely.
The first solution most of us figure out is to duplicate the background and check when it goes out of the screen to position it correctly.

The problem with this is that we must make some comparisons in the loop where we update the background position, besides if the background is really big, Flash would have to manage a large graphic object even if most of it is outside the screen.

That's a lot of background for our little stage.

The way we can avoid this is using some Bitmap copying tricks.
Read more >>

Tomar fotos de una webcam y arrastrarlas

Jun 15, 2010   //   by EderChrono   //   Blog {es}  //  3 Comments

En está entrada explicaré como hacer funcionar una webcam dentro de flash, tomar fotos y poder arrastrarlas por el stage (drag and drop).

Al final del tutorial tendremos algo como esto:

Post completo >>