在ActionScript Mobile项目中找不到fl.transitions.Tween

时间:2011-07-27 15:02:31

标签: actionscript-3 mobile tween

我正在为Android开发一个ActionScript移动项目。

当我添加以下导入时,编译器说找不到。

import fl.transitions.Tween;

如何将Tween用于移动项目?

package{
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.events.MouseEvent;
    import fl.transitions.Tween;
    import fl.transitions.easing.Strong;

    public class spriteButton extends Sprite
    {
        private var alphaOver:Tween;
        private var alphaLabelOver:Tween;
        private var alphaLabel:Tween;

        public function spriteButton(newLabel:String)
        {
            myLabel.text = newLabel;
            myLabelOver.text = newLabel;
            myLabelOver.alpha = 0;
            buttonMode = true;
            mouseChildren = false;
            addEventListener(MouseEvent.MOUSE_OVER, handleMouseOver);
            addEventListener(MouseEvent.MOUSE_OUT, handleMouseOut);
            addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
        }

顺便说一句,我是ActionScript 3.0开发的新手。

我收到了这个错误:

The import fl could not be found.
The import Tween could not be found.

Description Resource    Path    Location    Type
1172: Definition fl.transitions:Tween could not be found.   spriteButton.as /Test01/src line 4  Flex Problem

1 个答案:

答案 0 :(得分:0)

如果您是AS3新手,请使用此库:http://www.greensock.com/tweenmax/来处理补间对象。