1119: 访问可能未定义的属性 COMPLETE (通过 static 类型 Class 引用)
importfl.events.SliderEvent;importfl.controls.ColorPicker;importfl.events.ColorPicker...
import fl.events.SliderEvent;
import fl.controls.ColorPicker;
import fl.events.ColorPickerEvent;
import fl.video.FLVPlayback;
import fl.video.VideoEvent;
var vidList_XML:XML;//用于保存XML对象
var vidTitle:String;//用于保存.xml文件里每个vid元素的name属性值
var count:int = 0;//用于追踪播放列表下一个应播放的视频是哪一个
var xmlLoader:URLLoader=new URLLoader();
//var vidPlayer:FLVPlayback=new FLVPlayback();//这句加不加都是错的,组件已经拖至舞台
xmlLoader.load(new URLRequest("vidlist.xml"));
xmlLoader.addEventListener(Event.COMPLETE,xmlLoaded);
function xmlLoaded(event:Event):void
{
vidList_XML = new XML(xmlLoader.data);
vidPlayer.addEventListener(VideoEvent.COMPLETE,changeVid);
}
function changeVid(e:VideoEvent):void
{
var nextVid:String = vidList_XML.vid[count].file;//利用这个变量设置vidPlayer实例的source属性
vidPlayer.source = nextVid;
vidTitle = vidList_XML.vid[count].name;
title_txt.text = vidTitle;
count++;
}
alphaSlide.addEventListener(SliderEvent.CHANGE,alphaChange);
function alphaChange(e:SliderEvent):void
{
vidPlayer.skinBackgroundAlpha = e.target.value;
}
colorChoose.addEventListener(ColorPickerEvent.CHANGE,changeHandler);
function changeHandler(e:ColorPickerEvent):void
{
var cp:ColorPicker = e.currentTarget as ColorPicker;
vidPlayer.skinBackgroundColor=Number("0x"+cp.hexValue);
}
注:错误在这句话:vidPlayer.addEventListener(VideoEvent.COMPLETE,changeVid); 展开
import fl.controls.ColorPicker;
import fl.events.ColorPickerEvent;
import fl.video.FLVPlayback;
import fl.video.VideoEvent;
var vidList_XML:XML;//用于保存XML对象
var vidTitle:String;//用于保存.xml文件里每个vid元素的name属性值
var count:int = 0;//用于追踪播放列表下一个应播放的视频是哪一个
var xmlLoader:URLLoader=new URLLoader();
//var vidPlayer:FLVPlayback=new FLVPlayback();//这句加不加都是错的,组件已经拖至舞台
xmlLoader.load(new URLRequest("vidlist.xml"));
xmlLoader.addEventListener(Event.COMPLETE,xmlLoaded);
function xmlLoaded(event:Event):void
{
vidList_XML = new XML(xmlLoader.data);
vidPlayer.addEventListener(VideoEvent.COMPLETE,changeVid);
}
function changeVid(e:VideoEvent):void
{
var nextVid:String = vidList_XML.vid[count].file;//利用这个变量设置vidPlayer实例的source属性
vidPlayer.source = nextVid;
vidTitle = vidList_XML.vid[count].name;
title_txt.text = vidTitle;
count++;
}
alphaSlide.addEventListener(SliderEvent.CHANGE,alphaChange);
function alphaChange(e:SliderEvent):void
{
vidPlayer.skinBackgroundAlpha = e.target.value;
}
colorChoose.addEventListener(ColorPickerEvent.CHANGE,changeHandler);
function changeHandler(e:ColorPickerEvent):void
{
var cp:ColorPicker = e.currentTarget as ColorPicker;
vidPlayer.skinBackgroundColor=Number("0x"+cp.hexValue);
}
注:错误在这句话:vidPlayer.addEventListener(VideoEvent.COMPLETE,changeVid); 展开
2个回答
展开全部
import flash.events.VideoEvent;
vidPlayer.addEventListener(Event.COMPLETE,changeVid);
vidPlayer.addEventListener(Event.COMPLETE,changeVid);
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
请问楼主解决了吗 我我也碰到了和你一样的问题 求教
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询