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

Publish for Flash Player 11, video events not working

Guest
Sep 14, 2012 Sep 14, 2012

Copy link to clipboard

Copied

I have a Flash project that I'm publishing in Flash Player 11 in hopes having better animation results with Flash Player 11's better rendering capabilites.

However, my AS3 Video Events are now throwing errors. These two Event listeners throw the error.

"Access of possibly undefined property COMPLETE through a reference with static type Class"

"Access of possibly undefined property PLAYING_STATE_ENTERED through a reference with static type Class."

videoOverlay_mc.video_mc.addEventListener(VideoEvent.COMPLETE, fnc_endOfVideo)

videoOverlay_mc.video_mc.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, fnc_videoStart);

If I publish as Flash Player 10.x the events & listeners work fine.

I've been trying to find documentation on Flash Player 11 and what video events to use. Does anyone know where I can find this?

The API's still shows the videoEvents, http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/video/VideoEvent.html

Thanks in advance for your reply,

Zak

TOPICS
ActionScript

Views

2.0K

Translate

Translate

Report

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

Community Expert , Sep 14, 2012 Sep 14, 2012

use the complete class path, then.

Votes

Translate

Translate
Community Expert ,
Sep 14, 2012 Sep 14, 2012

Copy link to clipboard

Copied

try using Event.COMPLETE or using the entire path:

fl.video.VideoEvent.COMPLETE

Votes

Translate

Translate

Report

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
Guest
Sep 14, 2012 Sep 14, 2012

Copy link to clipboard

Copied

Hi Kglad,

Thanks for the help.

Event.COMPLETE compiles

but

Event.PLAYING_STATE_ENTERED does not.

VideoEvent.PLAYING_STATE_ENTERED does not.

My project listens for the start of the video playing and performs some actions. I need the playing start event listener.

Votes

Translate

Translate

Report

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
Community Expert ,
Sep 14, 2012 Sep 14, 2012

Copy link to clipboard

Copied

use the complete class path, then.

Votes

Translate

Translate

Report

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
Guest
Sep 14, 2012 Sep 14, 2012

Copy link to clipboard

Copied

Kglad,

My apologies. I rushed my reply.

This worked:

videoOverlay_mc.video_mc.addEventListener(fl.video.VideoEvent.COMPLETE, fnc_endOfVideo);

videoOverlay_mc.video_mc.addEventListener(fl.video.VideoEvent.PLAYING_STATE_ENTERED, fnc_videoStart);

function fnc_videoStart(evt:fl.video.VideoEvent):void {

...

}

function fnc_endOfVideo(evt:fl.video.VideoEvent):void {

....

}

I had to put the full event path in the function parameter as well otherwise I got a "Ambiguous reference to VideoEvent compile error".

Thanks a lot for your help.

Zak

Votes

Translate

Translate

Report

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
Community Expert ,
Sep 14, 2012 Sep 14, 2012

Copy link to clipboard

Copied

LATEST

you're welcome.

p.s.  please mark helpful/correct responses.

Votes

Translate

Translate

Report

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