hi all
I m working on custum video player, here is the link I did exactly same steps except I added my videos http://www.photoshop...videoPlayer.htm
btn1.addEventListener(MouseEvent.CLICK, vid1);
btn2.addEventListener(MouseEvent.CLICK, vid2);
btn3.addEventListener(MouseEvent.CLICK, vid3);
function vid1(e:Event):void{
vidPlayer.source = "video1.flv"
};
function vid2(e:Event):void{
vidPlayer.source = "video2.flv"
};
function vid3(e:Event):void{
vidPlayer.source = "video3.flv"
};
when I click on buttons no action whats wrong ???
addEventListener(MouseEvent.CLICK, not workingaddEventListener(MouseEvent.CLICK, not working
Page 1 of 1
2 Replies - 13038 Views - Last Post: 26 January 2010 - 11:19 AM
Replies To: addEventListener(MouseEvent.CLICK, not working
#2
Re: addEventListener(MouseEvent.CLICK, not working
Posted 26 January 2010 - 09:39 AM
mcse_696, on 16 Jan, 2010 - 05:15 AM, said:
hi all
I m working on custum video player, here is the link I did exactly same steps except I added my videos http://www.photoshop...videoPlayer.htm
btn1.addEventListener(MouseEvent.CLICK, vid1);
btn2.addEventListener(MouseEvent.CLICK, vid2);
btn3.addEventListener(MouseEvent.CLICK, vid3);
function vid1(e:Event):void{
vidPlayer.source = "video1.flv"
};
function vid2(e:Event):void{
vidPlayer.source = "video2.flv"
};
function vid3(e:Event):void{
vidPlayer.source = "video3.flv"
};
when I click on buttons no action whats wrong ???
I m working on custum video player, here is the link I did exactly same steps except I added my videos http://www.photoshop...videoPlayer.htm
btn1.addEventListener(MouseEvent.CLICK, vid1);
btn2.addEventListener(MouseEvent.CLICK, vid2);
btn3.addEventListener(MouseEvent.CLICK, vid3);
function vid1(e:Event):void{
vidPlayer.source = "video1.flv"
};
function vid2(e:Event):void{
vidPlayer.source = "video2.flv"
};
function vid3(e:Event):void{
vidPlayer.source = "video3.flv"
};
when I click on buttons no action whats wrong ???
Looks like you're setting the source for the video player, but you're not actually telling the video player to start playing.
#3
Re: addEventListener(MouseEvent.CLICK, not working
Posted 26 January 2010 - 11:19 AM
Quote
Looks like you're setting the source for the video player, but you're not actually telling the video player to start playing.
When using the FLVPlayback component, as long as the autoPlay property isn't set to false (it's true by default) the movie should begin playing once the source property is set.
In order to check that your functions are being run, do some simple debugging by adding a trace to them:
e.g.:
function vid1(e:Event):void{
trace("btn1 clicked!");
vidPlayer.source = "video1.flv"
};
The trace output can be found on the output panel when testing your SWF in the flash IDE or in a log file (location depends on system) if you are testing through the debug version of the flash web browser plugin.
What's more likely is that your FLV files cannot be found by the FLVPlayback component. Remember, local paths are relative to the location of your SWF. So from what I can gather from your above code, the FLV files must be located in the same folder as the SWF.
This post has been edited by SoLi: 26 January 2010 - 11:20 AM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|