Flash AS3: Spontaneous 5001 error, relating to letter-case of folder - actionscript-3

After updating some sound files in the .fla library, I started getting 5001 (name of package does not reflect location) errors for every file in an unrelated folder.
I understand the 5001 error, had it many times during development, but it was usually a case of a package typo, or a file in the wrong folder. Here, however, it seems to be some sort of letter case issue.
In the "Location" section of the "Compiler Errors" output, it lists the locations of every error (ie, every class in the /options/ folder) as "C:\Users...\powerups\Options\ClassName.as", note the upper-case \Options.
However, when I look at the (Windows) properties of any files in the /options/ folder, it confirms that the folder is lower-case, listing its location as "C:\Users...\powerups\options".
When I let Flash auto-suggest the package path it just suggests what it already was.
I fixed it on one occasion without changing anything by closing Flash and reopening, but then it starting occurring again after a few successful compiles. Have not had any luck since - tried recreating a fresh folder, letting Flash recreate the project files, and restarting.
I'm fairly certain I haven't changed any relevant code - the only thing I've been doing is adding some sound clips to the library and updating old ones.

Are you shure that you have correct settings in the tab "Advanced ActionScript 3.0 Settings" of the Flash IDE?
Maybe this link will be usefull for you.

Related

Is there a way to compare two .exes to see what differs between them?

Is there a tool / process by which I can decompile two .exes (one of which runs on a handheld device, the other which doesn't) so that I can get a glimpse into what differs/what the problem may be?
Of course, seeing that one has "00xA" where the other has "00xB" won't help me. I mean a way to see code that differs, or more likely, a compiled resource or config file difference, or some build option or so?
I'm almost positive the problem has nothing to do with code per se (if/while/switch statements, etc.) but with the project setup.
I cannot compare the working source, as it does not exist - I only have the .exe from which it came. The source I have available is a "reasonable facsimile" of it, but not exactly the same, at least not in project settings and configurations, etc.
UPDATE
Re: this page, I'm not familiar with some of the terminology; specifically, where it talks about a "FLATRELEASEDIR" - WTH?
Will this work to test my CE-bound* .exe on my PC:
Run depends.exe*
Open my CE-bound** .exe
Stare in wonder at the amazing plethora of errata and data
?
*Supposedly not to be confused with "adult diapers"
** "bound" as in, "that's where it's headed"
UPDATE 2
Here's what I see when running Dependency Walker on my app:
...but note my dilemma here.
UPDATE 3
Here's what I did to try to replicate my handheld environment on my PC as best as possible:
I wanted to just copy over the whole dad-burned thing (the entire handheld device representation from Windows Explorer), but it won't let me do that - it's not copyable, so I copied over just the "Program Files" folder (which contains the subfolder of my app and a couple of other folders which I don't know are standard or custom/peculiar to us).
This is from the handheld device where the .exe in question does run properly, so obviously (theoretically?) there should be no missing modules - Dependency Walker should run it and say all is well.
However, it doesn't; I get the same results as the one p[a,o]sted above.
Note: This is true even after selecting "Options > Configure Module Search Order... > The Application Directory > Move Up in Dependency Walker.
So since even an .exe that runs fine tests out as being "not ready for CE-time", how can I use this to accurately test which, if any, necessary files are missing?
Do I need to copy over other folders, too, or what?
UPDATE 4
So, the (supposedly?) missing modules are:
API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
DCOMP.DLL
GPSVC.DLL
IESHIMS.DLL
If true, then why does the .exe run on the handheld?
Note: Other folders on the handheld are:
Application Data => only contains "desktop.ini"
BTExplorer
My Documents => contains a "desktop.ini" and several SQLCE databases (*.SDF)
profiles => contains an empty "default" folder
Recycled => contains a single ".lnk" file
Temp => contains a handful of ".tmp" files
Windows => contains a slew of folders and files, including several .DLLs, but none of those listed above
The "Program Files" folder has a ".NET Compact Framework" subfolder, but it is empty.
In the \Windows\AppMgr folder, there are some interesting files, such as:
Microsoft .NET Compact Framework.DAT
Microsoft .NET Compact Framework.DLL
...several other DAT/DLL pairs, including:
Symbol Managed Class Libraries.DAT (no corresponding DLL)
...and even a pair:
SSCS HHS.[DAT,DLL]
-- which is our company acronym (SSCS) and name of the project (HHS)
What generates these? From where are they referenced??
Another possible piece of the puzzle is that the handheld device on which the .exe does not work does not have a \Windows\AppMgr folder, and thus does not have those .DAT/.DLL files listed above...
UPDATE 5
Another oddity:
After reading this: "Files that install in the GAC go in the\Windows directory" in the book "Microsoft .NET Compact Framework" by Andy Wiggly, et al, I tried copying the Windows folder from the handheld device to the spot on my PC below the folder named "3910ProgramFilesFolderCopy" which looks like this in Explorer:
C:
3910ProgramFilesFolderCopy
Program Files
Windows <= tried to copy the "Windows" folder from the handeld on top of "3910ProgramFilesFolderCopy" so it would end up here
...but it only copies a few files before borborygmas occurs (electronic borborygmas, that is) and it tells me, "the system cannot find the file specified"
Heavens to Murgratroid!?! Why does it find some but not all? Looking at the Windows folder on the handheld in Windows Explorer, I see that many of the precious DLLs are greyed out:
Arggh, double-arg, and (&c)
For PC you could try .NET Reflector.
http://www.red-gate.com/products/dotnet-development/reflector/
You may try to use dependency walker to undestand wich DLL/APIs they need and check if those are supported on your device.
http://geekswithblogs.net/WindowsEmbeddedCookbook/archive/2011/02/02/using-dependency-walker.aspx

CHM compiles fine, but won't open

I use a program that spits out HTML and hhp projects containing data from my databases.
I then compile that hhp with Microsoft HTML Help Compiler (hhc.exe).
It works well, but unfortunately for few projects, hhc compiles fine, but chm file is unusable.
It reports "Cannot open the file: mk:#MSITStore‎: FileName"
I have no problem with other chm files on my system. I have no problems with other chm I compile. If I remove several topics from my project produced file works again. It doesn't matter what topics I remove. Files that don't work are almost twice the size of files that work, even tho the html and project file is almost the same (very few changes), which leads me to think compression fails silently if size or structure of some file isn't right.
Does anyone have experience like this and what could be the reason?
For those that want to see example, this project will compile and work fine:
Working chm project
And this one compile but fail to open:
Chm that fails
I experienced the identical problem. The CHM was double the usual size and could not be opened. The CHM compiler did not report any error. Removing any random HTML file enabled opening the CHM. I generated many other CHMs on the same day, and all the others were OK.
I worked around the problem in the following way:
I added a very small HTML file to the project. It is a copy of one of the other files in the project, so if a user finds it in a search, it does no harm.
I entered the file name in the HHP.
I recompiled the project in the CHM compiler.
The CHM shrank to the normal size, and it opens normally.
I had exactly the same problem and can say it's all a matter of size and most likely an error in the compression module of hhc.
When I added some lines of documentation the size of the CHM-file increased from 1.6 to 3.1 MB and it could not be opened anymore.
This problem could not only be fixed by removing files but also by adding files.
So I wrote some additional documentation, added it to the project and everything was fine again.
There are a number of reasons why the MS HH compiler may crash.
(1) Invalid filenamesfile and file
The HTML Help compiler does not like some filenames e.g. spaces in a filename can still cause some minor problems with HTML Help. Best to replace spaces with underscores. Avoid "#" in file and folder names.
Try and stick with these characters _, a..z, A..Z, 0..9.
Do not use periods apart from in the normal file extension. Example: A filename such as xxx.h001.gif is identified incorrectly as a HTML file. The compiler then attempts to parse the binary file and crashes.
Do not use file or folder names containing ".chm".
(2) Avoid compiling on a network drive and try to compile on local drive.
(3) Use MJ’s Help Diagnostics to ensure that all the help viewer components are properly installed and registered.
http://helpware.net/downloads/#MJs
(4) Delete the file “hh.dat”, which you should find in this subdirectory:
\Documents and Settings\%username%\Application Data\Microsoft\HTML Help
This file stores information about all the HTML Help files on your system (Favorites, window size and position, etc.), and can cause the files to misbehave if it has somehow been corrupted.
(5) You need to debug your help system. You need to identify the file(s) that are crashing the compiler.
I normally remove sections of the web by renaming or moving folders and files, then recompile. Keep adding and removing sections until the compiler does not crash. Eventually you will find one or two files that are causing the problem. You may also need to debug these files by temporarily removing sections of the HTML file.
I see 0 byte files in the input? Maybe the compiler can't handle that?

Hidden code in Flash CS6

I downloaded some code earlier from a tutorial and I need to look it over so as I can see where I am going wrong, yet I am struggling with it. In theory, it should have rather a lot of code, 100 lines or so at least, but when I open it I get:
import TBG07a;
var mygame:TBG07a = new TBG07a(this);
and I'm unsure why. I checked the Actionscript (3.0) properties, nothing hidden, I checked everything I can think of but it's 1 frame, 1 scene, 1 layer.... I can't think where any of the rest of the code would appear. It is of course a .fla file and it works completely when I run it.
I'm probab;y missing something stupid here but I'm unsure, can anybody help at all?
Ta.
John.
John, check out the directory where *.fla file is located, if there are any .as files in that folder? If no files found, then check fla's Library pannel, if any movieclips there have "AS Linkage" property filled (if so, try editing those movieclips). Also you may check out "File"->"ActionScript Settings"->"Source Path" list (by default it consists only one "." folder).

How to save flash and actionscript

I have a flash app (chat) with the sources, which is .fla and 7 .as files.
Project is saved in CS6.
I can edit what I want, but I have problem saving it. I have poor knowledge about flash and Action Script, so I need some help saving the project.
Thank you!
Check the "compiler error" panel. If there's anything in there, Flash will refuse to execute any command and will just play the frames sequentially. If there's nothing there, the .fla file is probably not linked to the code in the first place. Look for the "class" attribute under "Properties" -> "Publish" and set to the name of the main .as file.
I assume you did not write the app on the first place. If you are trying to take some code & trying to learn from it (or get it to run), go step by step.
First find the entry point of the app. See any code in the timeline?? Anything on the frames?
If yes, starting following it.
If not, there would be a document class specified in the stage properties...start from there.
Beyond this, Share more details, for a better answer....

Getting Type not found error implementing source in as3

I am trying to just compile and run the demos from this article:
Flash talks to max msp via osc
I am using Flash Develop and Flex SDK with an up to date version of air.
When I run the demo: "as3_MaxFlashHarmony" I get an error I don't know how to fix. The source for the entire project is here:
the project
But specifically the error I am getting says:
col: 30 Error: Type was not found or was not a compile-time constant: OSCMessage.
here is the as3 file that it is specifically referencing:
//IHarmonyApp.as
package
{
import org.tuio.osc.OSCMessage;
public interface IHarmonyApp
{
function updateOSCData(msg:OSCMessage):void;
}
}
It uses the libraries Tuio, MinimalComps, and MonsterDebugger. The thing I don't get is that how can it not find OSCMessage if OSCMessage is properly imported? the IDE is making fine references to it and I can open it's declaration. OSCMessage is a public class. I don't get it.
To give some extra info for potential answers, the IDE flashdevelop can find the library org.tuio.osc.OSCMessage just fine, it gives the error regardless of if org.tuio... is a source path or not, and the overall path does not contain any special characters. I don't know if that might matter, but I feel like this is me making a stupid mistake somewhere. I can provide my project zipped if need be.
Thanks!
Edit 9:48, 8/25/12
I do have the file path org/tuio/osc/OSCMessage.as in my project, and the file OSCMessage exists. FlashDevelop can find it just fine and I can navigate to declaration at that location. This is why I got stumped.
Thanks again
In your AS3 folder apart of your de folder you would need to have org folder with relevant folders and classes.
For example to import org.tuio.osc.OSCMessage you would need a file:
../YourPackageRoot/org/tuio/osc/OSCMessage.as
The other way is including a SWC file (all folders and classes zipped into one swc file).
You can include the swc file in FlashDevelop by right clicking the swc file and selecting Add To Library