Solved

flash develop problem when trying to build a package

Posted on 2013-01-21
1
276 Views
Last Modified: 2013-02-06
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(63): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(7): col: 11 Error: Definition gs:TweenLite could not be found.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(94): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(93): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(92): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(91): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(91): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(89): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(88): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(68): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(67): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(66): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(65): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(64): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(63): col: 4 Error: Access of undefined property TweenLite.
C:\flash\Projects\FM104\Audio Player\src\EqualizerAnimation.as(62): col: 4 Error: Access of undefined property TweenLite.

Open in new window


here is now Equalizer Animation action script file bearing in mind i have zero flash skills we have lost our flash developers




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 } );
        }

    }

}

Open in new window

0
Comment
Question by:jonathanduane2010
1 Comment
 
LVL 8

Accepted Solution

by:
section25 earned 500 total points
ID: 38806115
The as file is looking for the TweenLite script which it can no longer find. The TweenLite script need to be in the path. I don't know how you have (or had) your file structure but just so you know, if you want to include another script by using:

import gs.TweenLite;

you need to have the path to file accessible from the as script, as in:

C:\[path to your as]\gs\TweenLite.as
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question