Hola,
Im que hace un proyecto por el cual un usuario puede tomar una foto de sí mismos. Esto aún de mapa de bits se utiliza como parte de una animación. Cuando algunos de los elementos de la animación de golpear el mapa de bits, el mapa de bits altera de alguna manera (por ejemplo, - cambios en los tamaños). Im familiarizado con la forma de hacer golpear las pruebas, así que esto no es un problema.
Sin embargo, mi problema es conseguir el mapa de bits para permanecer en la línea de tiempo pasado el segundo fotograma! gif "alt =": shock: "title =" Shocked ">

La animación necesita para comenzar a funcionar en el segundo cuadro (o así lo parece en la actualidad), pero cuando esto sucede, desaparece del mapa de bits.
¿Alguien sabe una forma de mapa de bits que realmente permanecen en la línea de tiempo en toda la animación? Im esperando que el mapa de bits no tienen que ser almacenados en algún tipo de base de datos porque Im preocupado por el espacio, aunque si el mapa de bits no se almacenan permanentemente entonces esta solución sería la multa (aún requeriría algunos consejos sobre cómo hacer esto sin embargo).
He incluido el código en la parte inferior. Esta sección de obras. Ive jugó con la adición de un MC de animación con éxito el código de prueba en que choca con el mapa de bits en el segundo cuadro, pero el mapa de bits cada vez que desaparece.
Id realmente aprecio un poco de ayuda en este tema. Gracias de antemano
/* capture the video stream from the active webcam and display it inside the video object */
output_vid.attachVideo(Camera.get());
import flash.display.BitmapData
import flash.geom.Matrix
/*
create a new bitmap object that is the same size
as the Video object to store the pixel data
*/
var snapshot:BitmapData=new BitmapData(160,120);
/*
create a function that takes a snapshot
of the Video object whenever it is called
*/
function takeSnapshot()
{
//draw the current state of the Video object into
//the bitmap object with no transformations applied
snapshot.draw(output_vid,new Matrix());
}
//create a movie clip to hold the bitmap when we attach it
this.createEmptyMovieClip("bitmap_mc",this.getNextHighestDepth());
//display the specified bitmap object inside the movie clip
bitmap_mc.attachBitmap(snapshot,1);
//position on screen
bitmap_mc._x = 175;
bitmap_mc._y = 350;
bitmap_mc._xscale = 100;
bitmap_mc._yscale = 110;
snap_btn.onPress = function (){
takeSnapshot();
//var snapshot:BitmapData=new BitmapData(160,120);
//snapshot.draw(output_vid,new Matrix());
}
- /* capture the video stream from the active webcam and display it inside the video object */
- output_vid.attachVideo(Camera.get());
- import flash.display.BitmapData
- import flash.geom.Matrix
- /*
- create a new bitmap object that is the same size
- as the Video object to store the pixel data
- */
- var snapshot:BitmapData=new BitmapData(160,120);
- /*
- create a function that takes a snapshot
- of the Video object whenever it is called
- */
- function takeSnapshot()
- {
- //draw the current state of the Video object into
- //the bitmap object with no transformations applied
- snapshot.draw(output_vid,new Matrix());
- }
- //create a movie clip to hold the bitmap when we attach it
- this.createEmptyMovieClip("bitmap_mc",this.getNextHighestDepth());
- //display the specified bitmap object inside the movie clip
- bitmap_mc.attachBitmap(snapshot,1);
- //position on screen
- bitmap_mc._x = 175;
- bitmap_mc._y = 350;
- bitmap_mc._xscale = 100;
- bitmap_mc._yscale = 110;
- snap_btn.onPress = function (){
- takeSnapshot();
- //var snapshot:BitmapData=new BitmapData(160,120);
- //snapshot.draw(output_vid,new Matrix());
- }