项目不会建立在flashdevelop中,无法弄清楚原因

时间:2013-01-21 21:57:42

标签: flash flash-builder flashdevelop

我在尝试使用Flash开发项目时遇到这些错误我想知道是否有人可以帮助我

  • C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(63): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(7): col:11错误:定义gs:找不到TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(94): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(93): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(92): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(91): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(91): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(89): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(88): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(68): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(67): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(66): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(65): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(64): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(63): col:4错误:访问未定义的属性TweenLite。 C:\ flash \ Projects \ FM104 \ Audio Player \ src \ EqualizerAnimation.as(62): col:4错误:访问未定义的属性TweenLite。

这里现在是均衡器动画动作脚本文件,记住我有零闪光技能我们已经失去了我们的Flash开发人员

package  
{
    import flash.display.MovieClip;
    import flash.events.*
    import flash.utils.Timer;

    import gs.TweenLite;
    import gs.easing.*;

    /**
     * Controls the equalizer animation
     * @author FM104 
     */
    public class EqualizerAnimation
    {

        private var eq:MovieClip;
        private var eqTimer:Timer;


        public function EqualizerAnimation():void
        {
            eq = Main.instance.player.Eq; 
        }


        /**
         * start timer
         * @param
         * @return void
         */
        public function start():void
        {
            eqTimer = new Timer(100, 0);
            eqTimer.addEventListener(TimerEvent.TIMER, startAnimation);
            eqTimer.start();
        }


        /**
         * stop
         * @param
         * @return void
         */
        public function stop():void
        {
            try {
                eqTimer.removeEventListener(TimerEvent.TIMER, startAnimation);
                eqTimer.stop();
                stopAnimation();
            } catch (err:Error) {}
        }


        /**
         * animate the eq bars
         * @param   evt
         * @return void
         */
        private function startAnimation(evt:TimerEvent):void
        {
            TweenLite.to( eq.Bar1, 0.1, { height:( Math.floor(Math.random() * (30 - 10 + 1)) + 10 ) } );
            TweenLite.to( eq.Bar2, 0.1, { height:( Math.floor(Math.random() * (30 - 10 + 1)) + 10 ) } );
            TweenLite.to( eq.Bar3, 0.1, { height:( Math.floor(Math.random() * (30 - 10 + 1)) + 10 ) } );
            TweenLite.to( eq.Bar4, 0.1, { height:( Math.floor(Math.random() * (30 - 10 + 1)) + 10 ) } );
            TweenLite.to( eq.Bar5, 0.1, { height:( Math.floor(Math.random() * (30 - 10 + 1)) + 10 ) } );
            TweenLite.to( eq.Bar6, 0.1, { height:( Math.floor(Math.random() * (30 - 10 + 1)) + 10 ) } );
            TweenLite.to( eq.Bar7, 0.1, { height:( Math.floor(Math.random() * (30 - 10 + 1)) + 10 ) } );
        }


        /**
         * stop animating
         * @param
         * @return void
         */
        private function stopAnimation():void
        {
            /*
            TweenLite.to( eq.Bar1, 0, { height:30 } );
            TweenLite.to( eq.Bar2, 0, { height:30 } );
            TweenLite.to( eq.Bar3, 0, { height:30 } );
            TweenLite.to( eq.Bar4, 0, { height:30 } );
            TweenLite.to( eq.Bar5, 0, { height:30 } );
            TweenLite.to( eq.Bar6, 0, { height:30 } );
            TweenLite.to( eq.Bar7, 0, { height:30 } );
            */
            TweenLite.to( eq.Bar1, 1, { height:1 } );
            TweenLite.to( eq.Bar2, 1, { height:1 } );
            TweenLite.to( eq.Bar3, 1, { height:1 } );
            TweenLite.to( eq.Bar4, 1, { height:1 } );
            TweenLite.to( eq.Bar5, 1, { height:1 } );
            TweenLite.to( eq.Bar6, 1, { height:1 } );
            TweenLite.to( eq.Bar7, 1, { height:1 } );
        }

    }

}

1 个答案:

答案 0 :(得分:0)

如评论所示,您需要添加TweenLite库。 TweenLite网站上有说明:http://www.greensock.com/get-started-tweening/#installing

从您的代码中,看起来使用了旧版本的TweenLite,因此您必须更改以“gs”开头的所有import语句,例如:

import gs.TweenLite;
import gs.easing.*;

致com.greensock:

import com.greensock.TweenLite;
import com.greensock.easing.*;