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

Youtube Chromeless Player Controls Help!

New Here ,
Aug 07, 2013 Aug 07, 2013

Hi, I'm tearing my hair out trying to add controls such as pause and volume to my Chromeless Youtube Player in Flash with actionscript 3, tried working with the reference that google provide but it still doesn't work. Here's what I tried, can anyone tell me where I'm going wrong?

function pauseVideo() {

  if (player) {

    player.pauseVideo();

  }

}

pauseBtn.addEventListener(MouseEvent.CLICK,pauseVideo);

Thanks



TOPICS
ActionScript
590
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

correct answers 1 Correct answer

LEGEND , Aug 07, 2013 Aug 07, 2013

You must have compiler error - code shouldn't compile. Event handler expects one argument - Event.

So, correct code would be:

function pauseVideo(e:MouseEvent):void

{

          if (player)

          {

                    player.pauseVideo();

          }

}

pauseBtn.addEventListener(MouseEvent.CLICK, pauseVideo);

Translate
LEGEND ,
Aug 07, 2013 Aug 07, 2013

You must have compiler error - code shouldn't compile. Event handler expects one argument - Event.

So, correct code would be:

function pauseVideo(e:MouseEvent):void

{

          if (player)

          {

                    player.pauseVideo();

          }

}

pauseBtn.addEventListener(MouseEvent.CLICK, pauseVideo);

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
New Here ,
Aug 07, 2013 Aug 07, 2013
LATEST

Thank you! Greatly appreciated

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