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.
etc....
Problem only seems to happen if I publish to Flash Player 10.2
or to Air for IOS
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:
import fl.video.*;
import fl.video.VideoEvent;
video1.addEventListener(VideoEvent.STATE_CHANGE, HandleStateChange);
function HandleStateChange(e:VideoEvent):void
{
if (VideoState.CONNECTION_ERROR == e.state) trace(e.state);
if (e.state=="seeking") trace(e.state);
}
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 )
{
case fl.video.VideoEvent.PLAYHEAD_UPDATE:
trace ( v.playheadTime );
break;
}
}
Its probably conflicting with flash.events.VideoEvent.
Code formating
North America
Europe, Middle East and Africa
Asia Pacific