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
use the complete class path, then.
Copy link to clipboard
Copied
try using Event.COMPLETE or using the entire path:
fl.video.VideoEvent.COMPLETE
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.
Copy link to clipboard
Copied
use the complete class path, then.
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
Copy link to clipboard
Copied
you're welcome.
p.s. please mark helpful/correct responses.