我编写了这些代码片段,但补间动画不起作用。你能救我吗?
function loadXML(event:Event):void{
sliderXML=XML(sliderXMLloader.data);
var xmlDoc:XMLDocument = new XMLDocument();
xmlDoc.ignoreWhite = true;
var menuXML:XML = XML(sliderXMLloader.data);
xmlDoc.parseXML(menuXML.toXMLString());
//var X:int = 100;
for each(var listItem:XML in sliderXML..listItem){
strTitle[sliderMaxNum] = listItem.itemTitle.toString();
strPosterLink[sliderMaxNum] = listItem.posterLink.toString();
strVideoLink[sliderMaxNum] = listItem.videoLink.toString();
var _temp:Loader = new Loader();
poster.splice(sliderMaxNum, 0, _temp);
poster[sliderMaxNum].load(new URLRequest(strPosterLink[sliderMaxNum]));
var posterClip:MovieClip = new MovieClip(); //load the movieclip
posterClip.addChild(poster[sliderMaxNum]); //convert poster[sliderMaxNum] to movieClip
addChild(poster[sliderMaxNum]);
poster[sliderMaxNum].x = slider_bg.width;
poster[sliderMaxNum].y = 28;
poster[sliderMaxNum].addEventListener(MouseEvent.CLICK, poster_click(sliderMaxNum));
sliderMaxNum ++;
}
LastSliderNum = sliderMaxNum - 1;
//*************************************************
var myTween:Tween = new Tween(poster[0], "x", Strong.easeOut, 500, 100, 5, true);
myTween.start();
//*************************************************
}
答案 0 :(得分:0)
我正在测试xml幻灯片,但补间不能在Flash窗口上工作,但在浏览器窗口上工作,所以感谢回复