ActionScript 3.0 :: Compile Package File - Error: A File Found In A Source-path Must Have The Same Package Structure?

Dec 19, 2011

I have an actionscript file,it has a package name,it locate C:demo directory,like follows:

package demo{
import flash.display.*;
public class ABC extends Sprite{[code]............

Then I compile above code like following command,but it raise following error:

C:>mxmlc demoABC.as
Loading configuration file C:sdkframeworksflex-config.xml

C:demoABC.as: Error: A file found in a source-path must have the same package structure '', as the definition's package, 'demo'.Where is wrong above command?

View 1 Replies


Similar Posts:


ActionScript 3.0 :: The Package Does Not Match The File Path

Apr 20, 2010

The package does not match the file path

View 4 Replies

ActionScript 3.0 :: Package - How To Say Path To The Main File?

Aug 27, 2010

how to package entire project. I mean to say that i have large project and i want to manage all files. I have main fla file, some xml files. some .as files. right now all this in one folder. i mean to say how to say path to the main file.

View 1 Replies

ActionScript 3.0 :: Back Again. Class Package File Path?

Aug 4, 2011

I had some trouble yesterday with the statement of the file path after the package statement in classes. but now i am encountering something totally strange. I created a simple class to test if my file path naming was correct, it works great it is called hello world. then started to work on the class that i actually want to make...and it gives me an error stating that the file path name is incorrect. it is the exact same as the hello world class, and in the exact same location (same folder as the .fla) here is the code for all three:

HelloWorld.as:
ActionScript Code:
package {

[code].....

View 3 Replies

Actionscript 3 :: Flex Compilier Says Source-path And Package Definition Mismatch?

Oct 7, 2010

Here's the issue: I have three files in the same package: com.foobar

The directory to these files is:

C:..mylibrarysrccomfoobar

then inside I have foo.as and bar.as

When I try to run mxmlc C:..mylibrarysrccomfoobarfoo.as I get the error:

A file found in a source-path must have the same package structure ' ', as the definition's package, 'com.foobar'.

To that I say: it does. The package is com.foobar. The structure goes ..[url]....I've found a few other forum posts on the web about this error, and it seemed like the user had to make the directory matching the package name, which I already have.

View 4 Replies

Actionscript 3.0 :: Setting Relative Package Source Path In Settings Flash CS4

Jan 27, 2009

I am having some trouble setting relative package source path in the ActionScript Settings Flash CS4.Below is the folder structure on my computer.[code]The only way it will work is with an absolute path like /Users/ jenrosamond/Desktop/Tri-Template/classes.This project is getting moved around to several different machines though, so that absolute path isn't going to work.

View 1 Replies

Flash :: IDE - Cs3 Compile Error 1017 - Package Namespace?

Sep 27, 2007

Word to the Flash Genies-- Heres my wish that hopefully someone else is struggling with an enormously mind-boggling bug in flash cs3-- when I try to create a public class that extends any of the native flash display objects, and I put this in its own package, even after specifically importing the specific class OR the package wildcard .* the fla that I'm compiling returns error 1017-- Base Class Definition not found. The fla is set to the correct classpath. This situation slipped from 'minor annoyance' to 'mind boggling' after I moved the directory to a different pc with cs3, reset the local classpath and it compiled perfectly. So then I moved the directory to a mac, running flex builder, and made a tester file to use the class, which compiled perfectly.

For some wierd reason, this particular computer cannot compile, even though nothing had changed in the actual class. Maybe it is important to note that this machine is running Vista (and perhaps should not be!)? Maybe it is important to note that the package is part of an SVN directory? Maybe it is important to note that after re-saving the same class file, changing only the class name (from BitmapSprite to BSprite) enabled it to compile on this machine, even though both the mac and other pc (running windows XP) could compile the class as BitmapSprite. I'm not sure if the name change or just re-saving allowed it to compile--but maybe it's significant that the new named instance was not committed to svn.

View 3 Replies

Flash :: ActionScript 3 Package Structure And Directory Structure

Jan 23, 2011

I seem to run into compile issues in Flash Builder when I import 3rd-party libraries at the wrong level in the directory structure. For example, sometimes I'll import a library one level too deep into its directory tree, and the package explorer ends up excluding the prefix root-level package, usually "com." or "net.". Even though the content of the source itself doesn't change, this will cause compile errors.

Thus: Is it a 1) convention or 2) language requirement that a class's package structure (e.g., "foo.bar.Class") must match its path location (e.g., foo/bar/Class.as)?
If it's a language requirement, why is it a requirement? Wouldn't that overdetermine the package structure, since it is already specified in the source code and quite happily consuming the first three to eight columns of each line? If it's not a language requirement, are my compile errors just a result of Flash Builder enforcing the convention?

View 1 Replies

Eclipse :: Flex Compiler Error: "put Definition In A Package" For Classes That ARE In A Package

Oct 13, 2009

This is with Flexbuilder 3.2, Eclipse 3.3.2.I am moving my development environment to a new machine. Actionscript classes that compiled in the old environment now get a compile error:

A file found in a source-path must have an externally visible definition. If a definition in the file is meant to be externally visible, please put the definition in a package.I do declare the package in these classes - I think failure to declare the package is the usual reason for this error.To add to the mystery, many classes in this project compile without errors.

View 1 Replies

Actionscript 3 :: Flex - Package Structure Isn't Right

Jul 15, 2010

My code is:

[Code]....

Taking the package name out lets it compile, but when it is in it tells me it the package structure isn't right, but I'm not sure what I'm doing wrong. Is it an error I made? Or possibly my version of mxmlc is corrupt? I compile it with

View 2 Replies

ActionScript 3.0 :: 5001 Error " The Name Of Package 'flashdev' Does Not Reflect The Location Of This File" ?

Dec 22, 2009

5001: The name of package 'flashdev' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file.this is the error i get.Ill tell you what ive done.first i created a .as file.i have created a package like:

package flashdev{

//code here
public class ooclass{}

}

then i create a .fla file and sai

import flashdev.ooclass

defined a new() class here

.... and then i get this error. I thwen tried to set folder locations within flash cs3 and still couldnt get it to work.What can i be doing wrong

View 2 Replies

ActionScript 3.0 :: Output Error:the Name Of The Package "greet" Does Not Reflect The Location Of This File?

May 23, 2010

output error: The name of package 'greet' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. C:Documents and SettingsIgalMy DocumentsmeirangreetGreeter.as
 
I keep on recieving this output error although my source path is set to C:Documents and SettingsIgalMy Documentsmeirangreet.
 

View 1 Replies

Actionscript 3 :: Imports And Package Structure In Flex?

Apr 15, 2010

I've got a problem how to organise files and packages in AS3/Flex project. A short intro to the problem:

The files structure in the project is (and should stay) like this:

libs/Class1/src/<files>
libs/Class2/src/<files>
libs/Class3/src/<files>

The amxmlc compiler source-path variable points to:

libs/

I need it because I have to subclass Class1 in Class3. That pushes me to put all the classes into packages that look as weird as this:

package ClassX.src { /* ... */ }

So in practice it looks like that:

package Class3.src
{
import Class1.src.Class1; // I prefer direct imports
public class Class3 extends Class1 { /* ... */ }
}

Is there a way to keep the files/folders structure and get rid of src in the package name. Changing the files structure or direct pointing compiler into base-class directory in not an option.

View 2 Replies

ActionScript 3.0 :: Flash - Directory/Package Structure?

Feb 17, 2011

There are many articles available online regarding directory structure best practices, but none of them seem to fit exactly what I need/would like. That, and it seems regardless of what I try, I always get a "5001: The name of package '[package name]' does not reflect the location of this file..." error. This is my current directory structure:

Code:
- colorselector
- assets

[code].....

View 1 Replies

Actionscript :: Flash - Package Naming And Directory Structure?

May 8, 2010

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:flowplayerurl_securesrcactionscriptobfus_pluginobfus.as

the location of the .as file is:

C:flowplayerurl_securesrcactionscriptobfus_pluginobfus_plugin.as

In my classpaths I have:

C:flowplayerurl_securesrcactionscriptobfus_plugin

View 2 Replies

ActionScript 3.0 :: Creating Reusable Class - Package Structure?

Nov 19, 2009

I have been working on creating a package of reusable code for myself. I frequently create projects that have a set of panels, which I re-skin for each particular project, and each panel has its own body of functionality.There are about 10 different panels that could be used in a given project, but not each panel is used in every project. Some projects use 5, some use 8, some 10 etc. My problem is that when migrating the panels to a new project, I don't nessicarily want to have every single panel in the library with appropriate exports etc. if it's not going to be used in the project.

For example

PHP Code:

package panelPack {public class Main extends MovieClip{public function Main(){}public function activatePanel1():void{var panel1:Panel1 = new Panel1();}public function activatePanel2():void{var panel1:Panel1 = new Panel2();}public function acti

[code]...

Then I have something like a config class that would have code like this:

PHP Code:

activatePanel1();activatePanel3();activatePanel5(); 

Then each class is something like this, referencing a library item that is exported:

PHP Code:

package panelPack {public class Panel1 extends Panel{public function Panel1(){var closeButton:SimpleButton = this.closeB;var submitButton:SiimpleButton = this.submitB;..........}}} 
I don't have to have panel1, panel2.....panel10 in the library if i'm only activating 1, 3, and 5!If i don't have those items in the library i get all kinds of undefined properties buttons etc. Everything that in the MC that gets exported.

View 1 Replies

ActionScript 3.0 :: Organise Folder / Package Structure For The Classes?

Aug 4, 2009

Im learning about Classes. Simple question for you all. What is the best/standard way to organise my folder/package structure for the classes I write, in particular to placing Main.as for example. Some structures I have seen in other source code are:

[Code]...

View 6 Replies

Actionscript 3 :: Cross - Project Folder / Package Structure Best Practise?

Aug 25, 2010

I'm currently looking at structuring my teams projects into a consistent manner that properly utilises packages and is easily version-controlled (via SVN). I'm interested in any 'best practise' with regards to project structuring and how to use consistent packaging without lumping everything into a gigantic [URL] folder structure whilst maintaining that package structure. I'm also keen to use the src/bin/lib folder structure within each project.

View 2 Replies

Package My App+videos Into One File?

Nov 23, 2010

I have a 3.5MB SWF that points to ~80 FLVs that range in size from 3MB to 10MB.

Is there a way I can package all of these files into one ~500MB file that can be run locally? My client wants sales people to take this app around with them on their laptops and not require the internet and I don't want them to have 100 files to mess with.

View 2 Replies

ActionScript 3.0 :: Passing X And Y Values Into A Package From Main Package

Dec 18, 2009

I am having troubles passing an x and y argument into a package function that creates a projectile on stage at the tank.gun's x and y.I have attached a zip of the code I am working on.[code]

View 6 Replies

ActionScript 3.0 :: ASDoc Only Documents 1 Package Function Per Package?

Jan 27, 2010

I'm running into this weird thing with ASDoc. It will only document one package function per package.For example.I have these two functions:

gs.util.printf
gs.util.ftrace

In these files:

gs/util/printf.as
gs/util/ftrace.as

The only function that get's documented in ASDocs is "printf". But I know it can do more than one. As an example, in the livedocs [URL] There are more than one functions documented.

View 2 Replies

ActionScript 3.0 :: Flex Script Source In Source Path Cannot Be Found

Jan 11, 2010

So inside my src folder I have my app.mxml file. I have a source directory pointed to my actionscript library.It appears that Flex does not look inside that source directory including an .as file within the master mxml file.

Code:
<mx:Script source="com/domain/something/somethingelse/app.as"/>

I could just have the main app.as file inside the src folder along with my app.mxml file but it would be nice if it could live in the actionscript library.

View 1 Replies

ActionScript 3.0 :: Flex Source In Source Path Cannot Be Found

Aug 21, 2009

So inside my src folder I have my app.mxml file. I have a source directory pointed to my actionscript library.It appears that Flex does not look inside that source directory including an .as file within the master mxml file.[code]I could just have the main app.as file inside the src folder along with my app.mxml file but it would be nice if it could live in the actionscript library.

View 2 Replies

Flex :: Compile An ActionScript Class That Is In A Package To A Swf Using Builder 3?

Jul 11, 2009

How do I configure an ActionScript Project in Flex Builder 3 Pro so that I can compile an ActionScript class that is part of a package into a swf. For example, the class that I want to compile to swf is:

package utils {
import flash.display.Sprite;
public class Tool extends Sprite {[code]....

RootASProject is being produced by one developer, subASProject1 and subSubASProject1a by another developer, utils.Tool by yet another person.This directory structure enables each person to independently build modules and other resources, and quickly test the entire product.It is also important to note that these resources are loaded at runtime.So, class definitions must be fully qualified. For example, Tool.swf contains/defines "utils.Tool" not "Tool".

Developing with just the Flash IDE, this directory structure is not a problem. We create a Tool.fla and assign utils.Tool as it's Document Class then in the Flash IDE's Publish Setting, we set the class path to be NOT the current directory (.), but instead the RootASProject directory. If it were set to the current directory, the error would be: A file found in a source-path must have the same package structure '', as the definition's package, 'utils'. ToolTool.as. We're familiar with this error message and so I recognize that the Flex IDE is by default looking in the current directory for a subfolder, utils, to match the packaged class.

In the Flex IDE, I can add the utils parent, RootASProject, as an additional source path, but I do not know how to stop flex from looking in the current directory first.Using an ant build file, I can set the source path to RootASProject and the mxmlc is able to build utils/Tool.swf just fine. Apparently, it uses just the source paths passed to it, and does not automatically look for utils in the current directory.

View 2 Replies

Flex :: Import A File From A Internal Package

Feb 6, 2012

I'am trying to import an actionscript file in a internal package in my project. From Java and am used to this to like this import Services.myClass. But the IDE doesn't suggest any classes when I type import Services. So how can I import my AbstractIdManager.as file? Inside this actionscript file, there is a public class named AbstractIdManager which extends EventDispatcher My project structure looks like this: I want to use the AbstactIdManager class in my View videochat.mxml

View 1 Replies

ActionScript 3.0 :: Possible To Open Extention Package File?

Jul 25, 2009

is it possible to open extention package files and modify it??

View 2 Replies

ActionScript 3.0 :: Package Folders Into Custom File?

Nov 24, 2009

I have a number of folders that contain data for my application. These data will change a lot through the application, creating different functionality for my app. What I want to do is package these folders into a customized file, like zip but not necessarily compressed and then in some way open it through flash and look into the folders. But the user will only have to copy paste the one single package file and not 4 or 5 folders of files every time and maybe leaving something important behind.

View 0 Replies

Do Package Names Have To Be Relative To Fla File Location

Jul 27, 2009

I'm trying to do some restructing of a flash codebase, and I was wondering if anyone could clarify something for me as I'm unsure whether what I'm trying to do goes against a fundamental priciple of flash development or I'm being confused by the Flash CS4 user interface(I've got a java development background, so some of the interaction between fla files and the like is somewhat difficult at times to get my head around). I've done several searches but can't seem to find any similar problems, apologies if any exist.

Basically, I want to restructure my codebase and move my fla files around by putting them at a different location in the directory structure.

Existing structure:
basecompany namecomponent name

where fla files are stored in base, and code is stored in company namecomponent name, and code in said location is in the company name.component name package.

What I want to do is move my fla files from base to component name for each individual project. The actual location of the code is unchanged, but the fla files no longer compile, giving me a 5001 error - package name does not reflect location. I'm assuming that this is because the relative location is different - as far as the fla file is concerned, the code it is referencing is located at component name, not company namecomponent name. Is it possible to make the CS4 publisher understand that the fla file is not at the root of the package structure, and if so how?

View 1 Replies

ActionScript 3.0 :: Targeting Which Xml File To Load Inside Of A Package

Jul 7, 2010

Okay I'm working on a pretty big project, and the last thing I need to do is get this content to display. Here's my lil problem. So I'm loading buildings, and when clicked on, I'm loading a movieclip from the library that has a slideshow movieclip on the first frame, however this slideshow is packaged externally. This slideshow has a "xmlPath" that is defaulted to a XML file. My question is... what kind of code can I use to control which xml is loaded when loading that packaged slideshow?

[Code]....

View 3 Replies

ActionScript 3.0 :: The Name Of Package 'packageTest' Does Not Reflect The Location Of File

Oct 11, 2010

Because I was having so much trouble using packages in my other programs I created two simple classes to figure it out. I have placed these two classes in a folder named packageTest and even made a new path there in flash preference.

[Code].....

I am running them from a .fla file with packageTest.FirstPackage set as the document class. I receive the following error when I compile. 5001: The name of package 'packageTest' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. C:UsersDirkDesktopRuckuspackageTestPackageTr aveler.as

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved