la creación de la costumbre de amortiguación de flash

  • kfc06
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Jul 28, 2009
  • Mensajes: 12
  • Status: Offline

Nota Julio 28th, 2009, 4:40 am

He encontrado esta en la red y estado tratando de conseguir que esto funcione, pero su no sucede, cualquier persona cualquier idea por qué?

Código: [ Select ]
 
import fl.video.*;
import fl.controls.ProgressBarMode;
import fl.transitions.*;
import fl.transitions.easing.*;
// Set Variables
 
var flvControl = display;
var flvSource = "mymovie.mov";
 
display.bufferTime = 30;
 
 
//fade the mcBufferingIndicator when buffered.
function onPlayerBuffered(event:VideoEvent)
{
 
TransitionManager.start(mcBufferingIndicator, {type:Fade, direction:Transition.OUT, duration:0.5, easing:Strong.easeOut});
}
 
display.addEventListener(VideoEvent.PLAYING_STATE_ ENTERED, onPlayerBuffered);
 
//Display the mcBufferingIndicator when buffering.
function onPlayerNotBuffered(event:VideoEvent)
{
mcBufferingIndicator.visible = true;
}
display.addEventListener(VideoEvent.BUFFERING_STAT E_ENTERED, onPlayerNotBuffered);
 
// Create event handler functions to control the progressbar
function progressHandler(event:VideoProgressEvent):void
{
var bl = Math.round(event.bytesLoaded/1000);
var bt = Math.round(event.bytesTotal/1000);
 
// Update progress...
pb.setProgress(bl,bt);
}
 
function readyHandler(event:VideoEvent):void
{
// Remove progressbar when we start playing...
removeChild(pb);
}
 
// Set progress bar state
pb.mode = ProgressBarMode.MANUAL;
pb.indeterminate = false;
 
// Add listeners and load the video
flvControl.addEventListener(VideoProgressEvent.PRO GRESS, progressHandler);
flvControl.addEventListener(VideoEvent.READY, readyHandler);
flvControl.source = flvSource;
 
  1.  
  2. import fl.video.*;
  3. import fl.controls.ProgressBarMode;
  4. import fl.transitions.*;
  5. import fl.transitions.easing.*;
  6. // Set Variables
  7.  
  8. var flvControl = display;
  9. var flvSource = "mymovie.mov";
  10.  
  11. display.bufferTime = 30;
  12.  
  13.  
  14. //fade the mcBufferingIndicator when buffered.
  15. function onPlayerBuffered(event:VideoEvent)
  16. {
  17.  
  18. TransitionManager.start(mcBufferingIndicator, {type:Fade, direction:Transition.OUT, duration:0.5, easing:Strong.easeOut});
  19. }
  20.  
  21. display.addEventListener(VideoEvent.PLAYING_STATE_ ENTERED, onPlayerBuffered);
  22.  
  23. //Display the mcBufferingIndicator when buffering.
  24. function onPlayerNotBuffered(event:VideoEvent)
  25. {
  26. mcBufferingIndicator.visible = true;
  27. }
  28. display.addEventListener(VideoEvent.BUFFERING_STAT E_ENTERED, onPlayerNotBuffered);
  29.  
  30. // Create event handler functions to control the progressbar
  31. function progressHandler(event:VideoProgressEvent):void
  32. {
  33. var bl = Math.round(event.bytesLoaded/1000);
  34. var bt = Math.round(event.bytesTotal/1000);
  35.  
  36. // Update progress...
  37. pb.setProgress(bl,bt);
  38. }
  39.  
  40. function readyHandler(event:VideoEvent):void
  41. {
  42. // Remove progressbar when we start playing...
  43. removeChild(pb);
  44. }
  45.  
  46. // Set progress bar state
  47. pb.mode = ProgressBarMode.MANUAL;
  48. pb.indeterminate = false;
  49.  
  50. // Add listeners and load the video
  51. flvControl.addEventListener(VideoProgressEvent.PRO GRESS, progressHandler);
  52. flvControl.addEventListener(VideoEvent.READY, readyHandler);
  53. flvControl.source = flvSource;
  54.  



Me estoy haciendo los siguientes errores:

La clase o interfaz "VideoEvent" no se pudo cargar.
Fuente: función onPlayerBuffered (event: VideoEvent)

La clase o interfaz "VideoEvent" no se pudo cargar.
Fuente: función onPlayerNotBuffered (event: VideoEvent)

La clase o interfaz "VideoProgressEvent" no se pudo cargar.
Fuente: progressHandler función (caso: VideoProgressEvent): void

La clase o interfaz "VideoEvent" no se pudo cargar.
Fuente: readyHandler función (caso: VideoEvent): void

Cualquier ayuda aprecia
Moderator Remark: Use [code][/code] to encapsulate code segments
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Julio 28th, 2009, 4:40 am

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23403
  • Loc: Woodbridge VA
  • Status: Offline

Nota Julio 28th, 2009, 6:27 am

¿Es usted como compilar AS3 o AS2? (debe ser AS3)

También están usando Flex o Flash?
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • kfc06
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Jul 28, 2009
  • Mensajes: 12
  • Status: Offline

Nota Julio 28th, 2009, 8:45 am

Hola gracias por la ayuda,

Estoy utilizando Flash y he intentado convertir a AS3 y el componente flv dijo que necesitaba AS2. Por lo tanto, i rehecho desde cero en AS3 flv arrastrando un nuevo componente de reproducción en la etapa y se inserta el código de nuevo, recibiendo diferentes errores:

ERROR1
1084: Error de sintaxis: esperaba rightparen antes entraron.
FUENTE: display.addEventListener (VideoEvent. PLAYING_STATE_ INTRODUCIRSE, onPlayerBuffered);

Error 2
1084: Error de sintaxis: esperaba rightparen antes E_ENTERED.
display.addEventListener (VideoEvent.BUFFERING_STAT E_ENTERED, onPlayerNotBuffered);

ERROR 3
1084: Error de sintaxis: esperaba rightparen antes Gress.
flvControl.addEventListener (VideoProgressEvent.PRO Gress, progressHandler);
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • Avatar de Usuario
  • Registrado: Jul 25, 2005
  • Mensajes: 2735
  • Loc: Nashville, TN
  • Status: Offline

Nota Julio 28th, 2009, 9:05 am

kfc06, que tiene espacio en cada línea thats romper la constante. Pruébelo sin, como a continuación.

Código: [ Select ]
display.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, onPlayerBuffered);

display.addEventListener(VideoEvent.BUFFERING_STATE_ENTERED, onPlayerNotBuffered);

flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
  1. display.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, onPlayerBuffered);
  2. display.addEventListener(VideoEvent.BUFFERING_STATE_ENTERED, onPlayerNotBuffered);
  3. flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
I'd love to change the world, but they won't give me the source code.
  • kfc06
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Jul 28, 2009
  • Mensajes: 12
  • Status: Offline

Nota Julio 28th, 2009, 9:26 am

argh...bien gracias por el lugar, me sacó de los espacios y ahora tiene el texto siguiente:
1120: El acceso de la propiedad indefinida mcBufferingIndicator
1120: El acceso de la propiedad undefined pantalla
1120: El acceso de la propiedad indefinida progressHandler
1120: El acceso de la propiedad indefinida readyHandler
1058: Migrationissue El property_rotation ya no es compatible. Utilice la propiedad en lugar DisplayObject.rotation ..
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23403
  • Loc: Woodbridge VA
  • Status: Offline

Nota Julio 28th, 2009, 1:30 pm

Piensa que su problema puede ser en parte culpa mía. Acabo de mirar a mi post original y no parece que alguna vez realmente a disposición el código de acabado que funcionó a la perfección para mí. He comparado la suya a la mía y me di cuenta que había comentado mucho de lo que todavía tiene en la suya.

Este es el código que terminó con (Tenga en cuenta las líneas que están deshabilitadas)
Código: [ Select ]
import fl.video.*;
//import fl.controls.ProgressBarMode;
import fl.transitions.*;
import fl.transitions.easing.*;
 
 
// Set Variables
var flvControl = display;
var flvSource = "solo01.flv";
 
display.bufferTime = 1;
 
//fade the mcBufferingIndicator when buffered.
function onPlayerBuffered(event:VideoEvent)
{
   
    TransitionManager.start(mcBufferingIndicator, {type:Fade, direction:Transition.OUT, duration:0.5, easing:Strong.easeOut});
   
}
 
display.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, onPlayerBuffered);
 
//Display the mcBufferingIndicator when buffering.
function onPlayerNotBuffered(event:VideoEvent)
{
mcBufferingIndicator.visible = true;
}
display.addEventListener(VideoEvent.BUFFERING_STATE_ENTERED, onPlayerNotBuffered);
/*
function onPlayerStopped(event:VideoEvent)
{
mcBufferingIndicator.visible = false;
}
display.addEventListener(VideoEvent.STOPPED_STATE_ENTERED, onPlayerStopped);
 
*/
/*
// Create event handler functions to control the progressbar
function progressHandler(event:VideoProgressEvent):void
{
   var bl = Math.round(event.bytesLoaded/1000);
   var bt = Math.round(event.bytesTotal/1000);
 
   // Update progress...
   pb.setProgress(bl,bt);
}
 
function readyHandler(event:VideoEvent):void
{
   // Remove progressbar when we start playing...
   removeChild(pb);
}
 
// Set progress bar state
pb.mode = ProgressBarMode.MANUAL;
pb.indeterminate = false;
*/
// Add listeners and load the video
//flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
//flvControl.addEventListener(VideoEvent.READY, readyHandler);
flvControl.source = flvSource;
 
 
 
  1. import fl.video.*;
  2. //import fl.controls.ProgressBarMode;
  3. import fl.transitions.*;
  4. import fl.transitions.easing.*;
  5.  
  6.  
  7. // Set Variables
  8. var flvControl = display;
  9. var flvSource = "solo01.flv";
  10.  
  11. display.bufferTime = 1;
  12.  
  13. //fade the mcBufferingIndicator when buffered.
  14. function onPlayerBuffered(event:VideoEvent)
  15. {
  16.    
  17.     TransitionManager.start(mcBufferingIndicator, {type:Fade, direction:Transition.OUT, duration:0.5, easing:Strong.easeOut});
  18.    
  19. }
  20.  
  21. display.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, onPlayerBuffered);
  22.  
  23. //Display the mcBufferingIndicator when buffering.
  24. function onPlayerNotBuffered(event:VideoEvent)
  25. {
  26. mcBufferingIndicator.visible = true;
  27. }
  28. display.addEventListener(VideoEvent.BUFFERING_STATE_ENTERED, onPlayerNotBuffered);
  29. /*
  30. function onPlayerStopped(event:VideoEvent)
  31. {
  32. mcBufferingIndicator.visible = false;
  33. }
  34. display.addEventListener(VideoEvent.STOPPED_STATE_ENTERED, onPlayerStopped);
  35.  
  36. */
  37. /*
  38. // Create event handler functions to control the progressbar
  39. function progressHandler(event:VideoProgressEvent):void
  40. {
  41.    var bl = Math.round(event.bytesLoaded/1000);
  42.    var bt = Math.round(event.bytesTotal/1000);
  43.  
  44.    // Update progress...
  45.    pb.setProgress(bl,bt);
  46. }
  47.  
  48. function readyHandler(event:VideoEvent):void
  49. {
  50.    // Remove progressbar when we start playing...
  51.    removeChild(pb);
  52. }
  53.  
  54. // Set progress bar state
  55. pb.mode = ProgressBarMode.MANUAL;
  56. pb.indeterminate = false;
  57. */
  58. // Add listeners and load the video
  59. //flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
  60. //flvControl.addEventListener(VideoEvent.READY, readyHandler);
  61. flvControl.source = flvSource;
  62.  
  63.  
  64.  


Ejemplo de trabajo.
http://www.alaron-nuclear.com/private/m ... olo-5.html

Post original de referencia
flash-forum/displaying-buffer-message-with-flvplayback-component-t96761.html
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • kfc06
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Jul 28, 2009
  • Mensajes: 12
  • Status: Offline

Nota Julio 29th, 2009, 2:29 am

Hola Gracias por esto! Creo que estoy avanzando, no parece ser ahora erroring :)

Sólo tengo un par de pequeños problemas que ahora una secuencia de comandos de acción que le Gurús deben esperar bastante simple. Tuve un icono de la hilatura en AS2, y ahora, ya que debe ser publicado en AS3 se ha roto....

Tiene alguna idea de cómo un i escribir el siguiente código en AS3:

onEnterFrame = function () (
RP2A._rotation + = 15;
);

Gracias
  • kfc06
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Jul 28, 2009
  • Mensajes: 12
  • Status: Offline

Nota Julio 29th, 2009, 4:08 am

susssed bien tiene que utilizar:

myMC.addEventListener (Event.ENTER_FRAME, callFunction);

función callFunction (event: Event): void (
myMC.RP2A.rotation + = 15;

)

Sólo una última pregunta hopeefully! :)

Tengo la piel utilizando el SkinUnderPlaySeekStop. swf (siempre con un componente del flash), aunque cuando lo tampón muestra una terrible barbar polo verde horizontal en la barra de búsqueda...hay fuera para ocultar que, ahora que tengo mi propio indicador?

Gracias
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23403
  • Loc: Woodbridge VA
  • Status: Offline

Nota Julio 29th, 2009, 4:42 am

Recuerdo haber visto eso, pero no tienen ningún recuerdo de cómo se deshizo de él.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • kfc06
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Jul 28, 2009
  • Mensajes: 12
  • Status: Offline

Nota Julio 29th, 2009, 6:00 am

He encontrado el archivo. Archivos FLA para las pieles en el programa y cambiar los archivos de allí a cabo la publicación de la nueva piel sin las barras que se ordenan.

Lo único que me doy cuenta ahora de su muestra y la que he creado ahora es su control hasta llegar al igual que el vídeo se inicia hasta que el mío viene de un segundo antes de que el vídeo se inicia. Cualquier idea de cómo puedo ocultar los controles hasta que el vídeo se reproduce, como usted ha logrado?

PS gran labor en el foro! He tenido más éxito con ustedes que tengo Adobe foros.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23403
  • Loc: Woodbridge VA
  • Status: Offline

Nota Julio 29th, 2009, 6:56 am

Bigwebmaster ha hecho un gran trabajo y el diseño de la creación de este lugar. Theres una gran cantidad de personas muy talentosas que frecuente aquí.

En lo que respecta a los controles, me miró y yo la mía, hacer los controles antes de llegar la película comienza como usted ha dicho que la suya. Pensar que podría ser una velocidad de conexión tipo de cosas. No está seguro de si se puede hacer algo acerca de cómo cambiar eso.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • kfc06
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Jul 28, 2009
  • Mensajes: 12
  • Status: Offline

Nota Julio 30th, 2009, 7:17 am

He llegado el código de trabajo y encima estoy contento con ella para cuando se utiliza la piel. Ahora lo estoy usando para trabajar en archivos flash que se dicen 30sec largo lazo y luego al final. Todas las obras buenas con sólo agregar el siguiente código para conseguir que lazo, pero el símbolo de películas de amortiguación al inicio de la otra vez y luego desaparece a pesar del archivo flash están en caché.

¿Existe de todos modos para poner fin a la amortiguación símbolo que muestra una vez que se repita en? He intentado la siguiente pero no funcionó (aún parpadea y desaparece:

display.autoRewind = true;

display.addEventListener (VideoEvent.AUTO_REWOUND, videoPlayAgain, falso, 0, true);

videoPlayAgain función (caso: VideoEvent): void
(
event.target.play ();
mcBufferingIndicator.visible = false;

)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23403
  • Loc: Woodbridge VA
  • Status: Offline

Nota Julio 30th, 2009, 11:21 am

¿Dónde poner eso? Al final? Si es así, antes de intentar poner su otras funciones.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • kfc06
  • Newbie
  • Newbie
  • No Avatar
  • Registrado: Jul 28, 2009
  • Mensajes: 12
  • Status: Offline

Nota Julio 31st, 2009, 5:32 am

sí lo fue al final, pero lo puse al principio como se sugiere, pero no suerte, sigo teniendo un parpadeo en el inicio de la reproducción...
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • Avatar de Usuario
  • Registrado: May 28, 2003
  • Mensajes: 23403
  • Loc: Woodbridge VA
  • Status: Offline

Nota Julio 31st, 2009, 5:40 am

Trate de invertir estos

Código: [ Select ]
event.target.play();
mcBufferingIndicator.visible = false;
  1. event.target.play();
  2. mcBufferingIndicator.visible = false;


Estas herramientas se ejecutan en orden de arriba a abajo.
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Julio 31st, 2009, 5:40 am

Publicar Información

  • Total de mensajes en este tema: 17 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 30 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC