AS3视频COMPELETE事件处理程序不工作?的addEventListener(引发Event.COMPLETE [英] AS3 Video COMPELETE event handler not working? addEventListener(Event.COMPLETE

查看:176
本文介绍了AS3视频COMPELETE事件处理程序不工作?的addEventListener(引发Event.COMPLETE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我是用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");
 }

这篇关于AS3视频COMPELETE事件处理程序不工作?的addEventListener(引发Event.COMPLETE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆