Jump to content
Search Community

5001: The name of package 'com.greensock' does not reflect the location of

hamutal test
Moderator Tag

Recommended Posts

Hello!

I got this error 5001: "The name of package 'com.greensock' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file."

 

My code is:

 

package Buttons{
 
import flash.display.Sprite;
import flash.events.*;
import com.greensock.*;
import com.greensock.easing.*;
 
 
public class OpenMenuButton extends Sprite {
 
function OpenMenuButton () {
 
this.addEventListener (MouseEvent.MOUSE_OVER,RolledOver);
 
}
 
private function RolledOver (mouseOv:MouseEvent):void {
TweenLite.to(this, 1, {scaleX:1.5, scaleY:1.5, ease:Back.easeOut});
 
}
 
I put them in the same folder.
 
Am I'm missing something?

 

thanks! 

 

 

Link to comment
Share on other sites

Did you put Buttons.as and TweenLite.as in the same folder? If so, that would explain the error.

 

TweenLite/Max must live in the com/greensock/ folder as it was provided to you, like this:

your_project/
    com/
        greensock/
            easing/
                Linear.as
                Strong.as
                // etc
            TweenLite.as
            TimelineLite.as
            // etc
    other_folder/
        Some_file.as
    Buttons.as
    Other_file.as

You should be able to just drop the com folder from the zip download in your project folder.

Link to comment
Share on other sites

Just make sure the "com" folder (which should also contain a "greensock" folder) is in the SAME folder as your FLA when you publish, like Jamie said.

/project/file.fla
/project/com/greensock/TweenLite.as
/project/com/greensock/easing/Back.as
...etc.

Also make sure you're using the correct version of the files (AS3 or AS2). I wonder if you're trying to use the wrong flavor or something (I doubt it). 

Link to comment
Share on other sites

First of all- thanks for replying :)

 

As far as I can see everything is as you say...

 

 

 

I'll write the folders layout in case I'm missing something:

 

Prog/

   project.fla

   project.swf

   com/

      greensock/

         TweenLite.as

         ...ect.

   UI/

      file1.as

      file2.as

      ...ect.

   Buttons/

      file1.as

      file2.as

      ...ect.

 

Also- it doesn't find it in the import "auto fill" (it shows only the Buttons and UI folders...) 

 

And all the files are AS3.

Link to comment
Share on other sites

Looks right to me, so maybe you've got a corrupt Flash install or something. Or maybe you put an ActionScript file inside the com/greensock directory that isn't supposed to be there (not a Greensock file). Very tough to say without seeing your files and directories. Feel free to zip up the directory and post a link to it here so we can try to publish on our end. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...