Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

AS3 Video Player: seekBar

Explorer ,
Feb 05, 2014 Feb 05, 2014

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.

TOPICS
ActionScript
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Feb 06, 2014 Feb 06, 2014
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 06, 2014 Feb 06, 2014

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()


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Feb 06, 2014 Feb 06, 2014
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines