FORUMS: list search recent posts

FLVPlayback Component unload/reload

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Adam Mercado
FLVPlayback Component unload/reload
on Mar 21, 2008 at 1:26:39 am

have an bug in a file with FLVPC on stage called 'main_flv' that will not load another FLV after one has played

Basically I have a menu with 3 choices, select one and it hides the menu and shows the FLVPC and loads in an FLV determined by the value of a variable. All on one frame.

The FLV plays fine. The FLV plays to the end, a listener then hides the FLVPC and shows/plays the menu. There is also a return_btn that stops the FLV, hides the FLVPC and shows/plays the menu.

The problem arises when I immediately select play for the FLV that just completed. It will not play having already played. If I choose another menu item, it plays fine. And the first menu item will play fine AFTER the other FLV has been selected/played. Just wont play twice in a row.

Not a huge deal, but a bug that my client will eventually find an want fixed. I've looked for ways to rewind or stop or close the FLV, but nothing that works with my setup.


Attach Code

import mx.transitions.Tween;
import mx.transitions.easing.*;

function videoActivate(theSeg){
_root.Buffering_mc._visible = true;
_root.Buffering_mc._alpha = 100;
_root.menu_mc.menuCube_mc._alpha = 60;
_root.main_flv.visible = true;
_root.main_flv.bufferTime = 5;
_root.main_flv.contentPath = "video/"+theSeg+".flv";
_root.return_btn._visible = true;
_root.replay_btn._visible = false;
_root.menu_mc.playBtn_mc.enabled = false;
_root.menu_mc.leftBtn_mc.enabled = false;
_root.menu_mc.rightBtn_mc.enabled = false;

var listenerObject:Object = new Object();

listenerObject.playing = function(eventObject:Object):Void {
_root.menu_mc.menuCube_mc._visible = false;
var fadeBuffer:Tween = new Tween(Buffering_mc, "_alpha", Regular.easeOut, 100, 0, 0.5, true);
firstPlayed = true;
listenerObject.complete = function(eventObject:Object):Void {
_root.main_flv.visible = false;//------------
_root.menu_mc.playBtn_mc.enabled = true;
_root.menu_mc.leftBtn_mc.enabled = true;
_root.menu_mc.rightBtn_mc.enabled = true;
_root.menu_mc.menuCube_mc._visible = true;

_root.main_flv.addEventListener("playing", listenerObject);
_root.main_flv.addEventListener("complete", listenerObject);

Adam Mercado
Influxx Media Production
Motion Graphics & Video Post Production
Fullerton, CA

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved