difficulty with package definition - actionscript-3

i have the .fla file in a folder named sample.In sample i have another folder named one which contains the classes.i have set the source path for classes to this one folder.Now in the class file i have
package one
{ // code
}
but i m geting the error "C:\Users\gaurav\Documents\sample\one\CDK.as, Line 1 5001: The name of package 'one' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. C:\Users\gaurav\Documents\sample\one\CDK.as" ... can someone plz help me with it...

Packages reflect an identical folder structure to your project.
If your project is in:
C:\Users\gaurav\Documents\sample\sample.fla
package one would be in:
C:\Users\gaurav\Documents\sample\one
If your package namespace root is the same as your FLA, there's no need to set a source path for classes.
If you set a source path for classes as a folder, one must be a child of that folder.
ie: setting source path to one implies one\one would define package one, as in:
C:\Users\gaurav\Documents\sample\one\one
Otherwise, you can add a source path to your Flash for classes at a different folder location than your FLA, such as a common source folder.

Related

SSIS to get the particular file from multiple files and copy to different folder

my question is how we will create SSIS package to get the particular file from multiple files and copy to different folder
Need Help
You can use File System Task in your package control flow.
Configure the properties as below:
DestinationConnection: Enter the full file path of the folder you want to move your file to e.g c:\Users\ToTest
Operation: Change to Move file.
SourceConnection: Enter the full file path of the folder where your file is, including the file name and extension e.g c:\Users\Test\testfile.csv
You'll need at least two components.
Use a Foreach Loop container with the default Foreach File Enumerator on the Collection tab. Set Folder: to \YourFolder and build an expression under Files: to identify the particular file you're interested in.
Inside the Foreach Loop container, add a File System Task to Copy the file from the Source folder to the Destination folder.

SSIS - Delete Unknown-Name Folder Within A Known Directory

I am writing a SSIS package, and at one point I am working with a certain folder that I know the path for, and need to delete a folder inside that, but I don't know the name (path) of the inner folder.
So for example, I know this path: C:\Known, but there will be a folder inside 'Known' that I would like to delete. Like C:\Known\ Unknown
I can't use a File System Task and delete the unwanted folder, because I don't know the name of the folder, and I can't use a File System Task to delete all the directory contents of 'C:\Known', because it also contains .jpeg files that I need to keep.
Any thoughts? A solution to get the name of the Unknown folder, or delete any folders inside 'C:\Known' is acceptable.
You can add this code to a Script Task to delete all subdirectories in a path while not deleting any other file types:
foreach (string subdirectoryPath in Directory.GetDirectories(knownPath, "*", SearchOption.AllDirectories))
{
Directory.Delete(subdirectoryPath);
}

AS3 package does not reflect location

I have an fla class referencing 'com.poole.blackjack.game', and a folder path starting at the fla root of 'com\poole\blackjack\game'.
When I compile, I get:
'C:\Users\Stephen\Desktop\Blackjack\com\poole\blackjack\Game\Player.as, Line 1 5001: The name of package 'com.poole.blackjack.game' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. C:\Users\Stephen\Desktop\Blackjack\com\poole\blackjack\Game\Player.as'
I tried changing the reference and folder name to 'Game', but get:
'C:\Users\Stephen\Desktop\Blackjack\com\poole\blackjack\game\Player.as, Line 1 5001: The name of package 'com.poole.blackjack.Game' does not reflect the location of this file. Please change the package definition's name inside this file, or move the file. C:\Users\Stephen\Desktop\Blackjack\com\poole\blackjack\game\Player.as'
It's like flash is misinterpreting the filepath, though it has worked up until now. Very annoying!
It seems like your package is using 'game' - lowercase g
And you path in the error message is 'Game' - uppercase G
I'd verify that your folder structure case matches the package case.
your error :
When I compile, I get: 'C:\Users\Stephen\Desktop\Blackjack\com\poole\blackjack\Game\Player.as
your package :
'com.poole.blackjack.game'
Much later than the post, but we encountered a similar issue. It seems there is a bug with the buildsystem / IDE that if you have a file and a directory with the same name, things might get mixed up.
In our case, in the same directory we had a class called Util and a directory called util, and it didn't compile with the same error.
Our fix was changing the Util class to a different name.

How To Reconfigure Class File Paths In a FLA File?

I have a lot of library assets linked to external as3 classes. I would like to change the structure of the packages containing the linked classes, but if I do so, all links will get broken.
Is there any way to automatically or at least easily tell the FLA file where to get the new class files from? Could a FLA file be configured to read this sort of information from a configuration file?
You can add a folder to the source paths in ActionScript Settings. So if you had linked all your classes relative to the 'myClasses' folder, and then you moved everything to a different folder, you'd just have to update that one source path and it would find all the classes again.
Also, maybe this obvious, but I didn't realize it for a long time:
You can edit the class linkage right in the Library panel (without having to open the Properties for each symbol). Just double-click the linkage path.

Referencing ActionScript file

I have a process set up to create action script files. They hold functions that are called upon by my flash project. How can i reference these files so that the project knows the functions are there.
with asp.net i would simply reference the .js file. Is it the same process?
The process of importing files to be used by Flash is pretty straightforward:
At the top of each external file there will be a package declaration, it basically represents it's path from the .fla file.
For example:
package com.site.objects
The above represents an ActionScript file within a folder objects, within site, within com whose parent folder also contains the .fla file.
When you're importing external files, you always start from the directory containing the .fla. This is always necessary with the exception of importing external files that are in the same directory as the file you're trying to access the class from.
The import statement for the above example will look like this:
import com.site.objects.MyClass;
Once you've done this, you'll be able to:
Create instances of the imported class.
Access static properties and methods defined within the class.
Extend the class to create a new class which will inherit it's properties.
etc