Copy link to clipboard
Copied
I am making a custom video player with a play and pause button but also a slider (seekBar). I have got everything else to work save for the slider. I've been looking on the web the last few days trying to find code or a tutorial. This is what I have so far.
stop();
btnPlay.addEventListener(MouseEvent.CLICK, startplaying);
function startplaying(event:MouseEvent):void {
play();
logo.play();
}
btnPause.addEventListener(MouseEvent.CLICK, stopplaying);
function stopplaying(event:MouseEvent):void {
stop();
logo.stop();
}
logo.seekBar = seeker;
I need a function to link the video player to the slider. Any help would be appreciated.
Copy link to clipboard
Copied
Post 11 in this thread:
Copy link to clipboard
Copied
Not using youtube video (already did that). What I am doing is trying to connect the slider component to a player that is playing a mov file.
I did find this bit of code.
import fl.controls.Slider;
var seeker:Slider = new Slider();
addChild(seeker);
However it did not like it, I got the following error messages.
TypeError: Error #1034: Type Coercion failed: cannot convert movplayer_fla::seeker_14@112f3ce1 to fl.controls.Slider.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at movplayer_fla::logo_11()
at flash.display::MovieClip/gotoAndStop()
at movplayer_fla::buttons_1/playAnimate()
Copy link to clipboard
Copied
for components to work you have to manually drag them into your library, its not enough to use the import statement.
Go to the compoennts window and drag the slider component into your librabry.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now