VideoEvent in Flash Player 10.2 doesn't work

Participant ,
May 06, 2011 May 06, 2011

Copy link to clipboard

Copied

Same code works in 10.1 and earlier but does not work in 10.2... Is it bug or done intentionally? Is there any way to run VideoEvent in flash player 10.2?

TOPICS
ActionScript

Views

12.7K

Likes

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 Beginner , Feb 24, 2012 Feb 24, 2012
The compiler seems to be confusing fl.video.VideoEvent with flash.events.VideoEvent. Just use the entire class path, like so:vidPlayer.addEventListener(fl.video.VideoEvent.READY, videoReady);And in the event handler:function videoReady(e:fl.video.VideoEvent):void{  // do something}

Likes

Translate

Translate
Explorer ,
Jul 24, 2011 Jul 24, 2011

Copy link to clipboard

Copied

HAving this same problem in CS5.5? VideoEvent is not working and sends erroe...

Scene 1, Layer 'Layer 2', Frame 1, Line 8 1119: Access of possibly undefined property COMPLETE through a reference with static type Class.

Had any progress in fixing?

Likes

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
Advocate ,
Jul 24, 2011 Jul 24, 2011

Copy link to clipboard

Copied

That's the error message but what's the ActionScript that you're running that raises the error?

Likes

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
Explorer ,
Jul 24, 2011 Jul 24, 2011

Copy link to clipboard

Copied

I just discovered this same problem in CS5.5. Could there be something corrupted in the AS properties? Below is the error message I am receiving to the COMPLETE event.

Scene 1, Layer 'Layer 2', Frame 1, Line 8 1119: Access of possibly undefined property COMPLETE through a reference with static type Class.

Here is my code I have used forever...

import flash.events.*;
import fl.video.*;

stop();

theVideo.addEventListener(VideoEvent.COMPLETE, VideoStopped);

function VideoStopped(e:VideoEvent):void{
trace("VIDEO STOPPED");
}//end

There is another thread explaining in more detail. It appears I'm not the only one with this problem.

http://forums.adobe.com/thread/857036

One solution, I can't explain is this. It works but only as a event in the funciton.

import fl.video.VideoEvent;
stop();
theVideo.addEventListener(fl.video.VideoEvent.PLAYING_STATE_ENTERED, VideoReady);
theVideo.addEventListener(fl.video.VideoEvent.COMPLETE, VideoStopped);
theVideo.addEventListener(fl.video.VideoEvent.PLAYHEAD_UPDATE, VideoUpdate);

// These DO NOT WORK

//theVideo.addEventListener(VideoEvent.COMPLETE, VideoStopped);
//theVideo.addEventListener(VideoEvent.PLAYHEAD_UPDATE, VideoStopped);
//theVideo.addEventListener(VideoEvent.READY, VideoStopped);
//theVideo.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, VideoStopped);

function VideoReady(e:Event):void{
trace("READY");
theVideo.removeEventListener(fl.video.VideoEvent.PLAYING_STATE_ENTERED, VideoReady);
}
function VideoStopped(e:Event):void{
trace("STOPPED");
theVideo.removeEventListener(fl.video.VideoEvent.COMPLETE, VideoStopped);
theVideo.removeEventListener(fl.video.VideoEvent.PLAYHEAD_UPDATE, VideoUpdate);
}
function VideoUpdate(e:Event):void{
trace("UPDATE");
}

Likes

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
Jul 24, 2011 Jul 24, 2011

Copy link to clipboard

Copied

<blockquote><font size="1"><font color="800080"> Is there any way to run VideoEvent in flash player 10.2?</font></font></blockquote>
No. At least by this morning.
Switch your publishing properties to 10 & 10.1

Likes

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
Explorer ,
Jul 24, 2011 Jul 24, 2011

Copy link to clipboard

Copied

That was it. Changing the Flash Player publish setting to 10 & 10.1, I was able to use the VideoEvent. Who would of figured!!!

THANK YOU Fuzzy!!!

Likes

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
Adobe Community Professional ,
Jul 28, 2011 Jul 28, 2011

Copy link to clipboard

Copied

8/13/2011 at 06:30 est.

Likes

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
New Here ,
Sep 18, 2011 Sep 18, 2011

Copy link to clipboard

Copied

Same issue with AIR 2.5 & 2.6.

Likes

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 Beginner ,
Feb 24, 2012 Feb 24, 2012

Copy link to clipboard

Copied

The compiler seems to be confusing fl.video.VideoEvent with flash.events.VideoEvent. Just use the entire class path, like so:

vidPlayer.addEventListener(fl.video.VideoEvent.READY, videoReady);

And in the event handler:

function videoReady(e:fl.video.VideoEvent):void

{

  // do something

}

Likes

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
Explorer ,
Jul 16, 2012 Jul 16, 2012

Copy link to clipboard

Copied

*sigh* bugs like these are so annoying. Thanks for the fixes!

Likes

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
New Here ,
Aug 24, 2012 Aug 24, 2012

Copy link to clipboard

Copied

I tried this and it didn't work I had to bo back to the 10 10.1 player.

Likes

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
Participant ,
Aug 24, 2012 Aug 24, 2012

Copy link to clipboard

Copied

LATEST

@Gareett-1, try the answer of gmastey. It works.

Likes

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