Just upgraded from CS5 to CS5.5
Code that worked in CS5 now gives compiler errors:
Symbol 'VideoPlayerMC', Layer 'Layer 2', Frame 1, Line 21 1119: Access of possibly undefined property state through a reference with static type flash.events:VideoEvent.
Symbol 'VideoPlayerMC', Layer 'Layer 2', Frame 1, Line 42 1119: Access of possibly undefined property PLAYHEAD_UPDATE through a reference with static type Class.
Problem only seems to happen if I publish to Flash Player 10.2
or to Air for IOS
It appears that the VideoEvent class is no longer supported in Air 2.5 or Flash Player 10.2
We have to use a new class called StageVideo.
If anyone finds some sample code to use StageVideo please post here.
stagevideo is a class used to allow hardware acceleration of video. but it has particular restrictions (like it's not in the display list and will appear below everything in the display list).
the older video classes have not been removed. and, in particular, stagevideo is not a substitute for a previous video class.
the videoevent class has been changed. if you don't need to use stagevideo or any of the 10.2 updates, publish for fp10 so you can use your code.
My original question has not been resolved.
the CS5.5 gives compiler errors when I use VideoEvent class
Here is some code to test:
if (VideoState.CONNECTION_ERROR == e.state) trace(e.state);
if (e.state=="seeking") trace(e.state);
this bug will be solved if you type the original string value of the actual event instead of the original
- FlvPlayBack.addEventListener(VideoEvent.PLAYHEAD_UPDATE , updateProgress);
- FlvPlayBack.addEventListener('playheadUpdate' , updateProgress)
one could also use following ( works in FP 11.2 and probably in air2.5+ ):
flvPlayback.addEventListener( fl.video.VideoEvent.PLAYHEAD_UPDATE, videoEventHandler, false, 0, true);
function videoEventHandler( v:fl.video.VideoEvent ):void
switch ( v.type )
trace ( v.playheadTime );
Its probably conflicting with flash.events.VideoEvent.
Europe, Middle East and Africa