补间动画问题

发布于 2024-10-25 09:03:22 字数 1517 浏览 4 评论 0原文

我写了这些代码,但是补间动画不起作用。你能帮助我吗?

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟雨扶苏 2024-11-01 09:03:22

我正在测试 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文