Reputation: 4907
I've got some actionscript which begins with:
package obfus_plugin{
import org.flowplayer.model.Plugin;
import org.flowplayer.util.Arrange;
import org.flowplayer.model.PluginModel;
import org.flowplayer.view.Flowplayer;
public class obfus extends Sprite implements Plugin {
and when I try to publish, I get the error:
5001: The name of package 'obfus_plugin' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. C:\flowplayer\url_secure\src\actionscript\obfus_plugin\obfus.as
the location of the .as file is:
C:\flowplayer\url_secure\src\actionscript\obfus_plugin\obfus_plugin.as
In my classpaths I have:
C:\flowplayer\url_secure\src\actionscript\obfus_plugin
What am I doing wrong? Did I miss a directory somewhere? All help is GREATLY appreciated.
Upvotes: 1
Views: 2587
Reputation: 5942
The directory structure should match the package structure, with classpath as it's root.
package{} matches %classpath%.
package A{} matches %classpath%/A.
So, instead of:
C:\flowplayer\url_secure\src\actionscript\obfus_plugin
You should use, as classpath:
C:\flowplayer\url_secure\src\actionscript
or place the file in a new folder:
C:\flowplayer\url_secure\src\actionscript\obfus_plugin\obfus_plugin
or even use the default package in the .as file:
package {
import [...]
}
Upvotes: 2
Reputation: 120440
Have you tried moving the file to the suggested location?
`C:\Documents and Settings\***\My Documents\My Dropbox\Public\obfus_plugin\obfus_plugin.as`
It's telling you that's where it should be placed. From the classpath root, the actionscript file should live in a nest of folders that reflects the package name.
Say you have an actionscript file with class in package X.Y.Z, the file should live in folder %classpath%\X\Y\Z
Upvotes: 2