您好,我是用FLVPlayback2.5组件和收到此错误,请大家帮忙! - 不能转换fl.video:以flash.events.VideoEvent
使用AS3 code -
comp.addEventListener(引发Event.COMPLETE,videoComplete);
功能videoComplete(事件:VideoEvent):无效{
跟踪(videoComplete);
}
完整的错误 -
类型错误:错误#1034:类型强制失败:不能转换fl.video::VideoEvent@6e974dd1到flash.events.VideoEvent。 在flash.events::EventDispatcher/dispatchEventFunction() 在flash.events::EventDispatcher/dispatchEvent() 在fl.video::FLVPlayback/http://www.adobe.com/2007/flash/flvplayback/internal::handleVideoEvent() 在flash.events::EventDispatcher/dispatchEventFunction() 在flash.events::EventDispatcher/dispatchEvent() 在fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::httpDoStopAtEnd() 在fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::httpNetStatus()
修复感谢罗尼!欢呼的人。这对我的作品。
进口fl.video.VideoEvent;
comp.addEventListener(引发Event.COMPLETE,videoComplete);
功能videoComplete(事件:事件):无效{
跟踪(videoComplete);
}
解决方案
lostPixels是正确的大部分在解释什么是错误的手段,但它不是 VideoEvent
,其简单的事件
comp.addEventListener(引发Event.COMPLETE,videoComplete);
功能videoComplete(事件:事件):无效//事件:事件没有事件:VideoEvent
{
跟踪(videoComplete);
}
hi i am using FLVPlayback 2.5 component and getting this error, please help! - cannot convert fl.video: to flash.events.VideoEvent.
as3 code using -
comp.addEventListener(Event.COMPLETE, videoComplete);
function videoComplete(event:VideoEvent):void {
trace("videoComplete");
}
full error -
TypeError: Error #1034: Type Coercion failed: cannot convert fl.video::VideoEvent@6e974dd1 to flash.events.VideoEvent. at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at fl.video::FLVPlayback/http://www.adobe.com/2007/flash/flvplayback/internal::handleVideoEvent() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::httpDoStopAtEnd() at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::httpNetStatus()
fix thanks to ronnie! cheers man. this works for me..
import fl.video.VideoEvent;
comp.addEventListener(Event.COMPLETE, videoComplete);
function videoComplete(event:Event):void {
trace("videoComplete");
}
解决方案
lostPixels was right for the most part in explaining what the error means but it isn't VideoEvent
, its simply Event
comp.addEventListener(Event.COMPLETE, videoComplete);
function videoComplete(event:Event):void //event:Event not event:VideoEvent
{
trace("videoComplete");
}
上一篇:如何获得一组的SID一旦我在Active Directory中的用户群?我在、如何获得、用户、SID
下一篇:Flex的 - URLLoader和的HTTPServiceFlex、URLLoader、HTTPService