补间动画问题
我写了这些代码,但是补间动画不起作用。你能帮助我吗?
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();
//*************************************************
}
i wrote these pieces of code, but motion tween doesn't work. can you help me?
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();
//*************************************************
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在测试 xml 幻灯片,但补间不能在 Flash 窗口上工作,但在浏览器窗口上可以工作,所以感谢您的回复
i was testing xml slideshow, but tween was not working on flash window but on browser window it works , so thanks for reply