Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

custom background for flv playback 1

Status
Not open for further replies.

thompom

Technical User
Dec 4, 2006
395
0
0
GB
Hi,

Im new to flash so bear with me - im using the flvplayback component to play some flv videos, but when a video has finished there is nothing in the box but the black background - i would like to have a picture there so when the movie has stopped the user is not left with a big black square - can someone help me with this please

thanks MG
 
..do you mean the frame/layer that the flvplayback component is on
 
hi - thanks for bearing with me

cant get the button to play the movie,
have done the following

1) added new layer called actions and inserted the following

Code:
// Main timeline
import mx.video.FLVPlayback;

my_FLVPlybk.autoPlay = false;
my_FLVPlybk.contentPath = "outsidevxrastra.flv";

var listenerObject:Object = new Object();

listenerObject.complete = function(eventObject:Object):Void  {
    eventObject.target._alpha = 0;
};

my_FLVPlybk.addEventListener("complete",listenerObject);

astra.onRelease = function():Void  {
    my_FLVPlybk.play();
};

2) have a button named astra

3) deleted all AS from each button
 
Hi Ken - put the trace in like

Code:
astra.onRelease = function():Void  {
    trace(my_FLVPlybk);
    my_FLVPlybk.play();
};

but when i click the button called astra is still does nothing - feel like im taking one step forward and two back!!
 
hi - really sorry but hadnt named by button instance in the properties - heres a *
thanks again ken
 
hi ken - have adapted your code to handle all four buttons

Code:
// Main timeline
import mx.video.FLVPlayback;

my_FLVPlybk.autoPlay = false;


var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void  {
    eventObject.target._alpha = 0;
};
my_FLVPlybk.addEventListener("complete",listenerObject);

astra.onRelease = function():Void  {
	my_FLVPlybk.contentPath = "outsidevxrastra.flv";
    my_FLVPlybk.play();
};

vxr8.onRelease = function():Void  {
	my_FLVPlybk.contentPath = "outsidevxr8.flv";
    my_FLVPlybk.play();
};

corsa.onRelease = function():Void  {
	my_FLVPlybk.contentPath = "outsidevxrcorsa.flv";
    my_FLVPlybk.play();
};

vectra.onRelease = function():Void  {
	my_FLVPlybk.contentPath = "outsidevxrvectra.flv";
    my_FLVPlybk.play();
};

but they only work when the movie is playing after it has finished the buttons dont work anymore?
 
You need...

[tt]my_FLVPlybk._alpha = 100;[/tt]

...in "onRelease" functions.

(I would actually use ActiveVideoPlayer to switch between 4 videos, but this approach will work and less complicated perhaps :)



Kenneth Kawamoto
 
thanks again - will have a look at activevideo

how do i get the player to have 0 alpha transparency on first load - tried adding
my_FLVPlybk._alpha = 100;
at the top of the script - all i get is a blank [white] FLV component
 
sorry - ignore me that should be alpha = 0 - all sorted
thanks again
 
Code:
// Main timeline
import mx.video.FLVPlayback;

my_FLVPlybk.autoPlay = false;
my_FLVPlybk._alpha = 0;

var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void  {
	eventObject.target._alpha = 0;
};
my_FLVPlybk.addEventListener("complete",listenerObject);

astra.onRelease = function():Void  {
	my_FLVPlybk.contentPath = "outsidevxrastra.flv";
	my_FLVPlybk._alpha = 100;
	my_FLVPlybk.play();
};

vxr8.onRelease = function():Void  {
	my_FLVPlybk.contentPath = "outsidevxr8.flv";
	my_FLVPlybk._alpha = 100;
	my_FLVPlybk.play();
};

corsa.onRelease = function():Void  {
	my_FLVPlybk.contentPath = "outsidevxrcorsa.flv";
	my_FLVPlybk._alpha = 100;
	my_FLVPlybk.play();
};

vectra.onRelease = function():Void  {
	my_FLVPlybk.contentPath = "outsidevxrvectra.flv";
	my_FLVPlybk._alpha = 100;
	my_FLVPlybk.play();
};

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top