MessageChannel class is inaccessable - actionscript-3

I am trying to create a MessageChannel between two workers in a Flash project, but when I attempt to debug or publish I get an error stating "VerifyError: Error #1014: Class flash.system::MessageChannel could not be found.". I am using Flash Pro, and, as far as I know, have correctly added and selected Flash Player 11.4 as a publishing target. Does anyone know what could be causing this error?

Finally figured out the issue - I was unaware that the debugger needed to be updated separately. Since the debugger has been updated, everything seems to be working properly.

Related

IntelliJ IDEA error 1172 with Flex project

I switched to IntelliJ IDEA for my Flex projects.
I just try to import a project in a new IntelliJ project, set up this project with the source (I can go to all my classes if I click on an occurence of the imports so the links are OK right ?), but when I try to build, I have the 1172 error with some simple classes : "Error:(19, 0) [TestProject]: Error code: 1172: Definition fr.romarin.utils:TimeUtils could not be found."
The same class imported and used in a new fresh project with the same setup is OK.
private function creationCompleteHandler(event:FlexEvent):void {
TimeUtils.formatLessThanTen(1); // works
}
So what is the problem ?
Thx a lot.
Ok so after 2 days stucked, I finally fix my problem.
I don't know why but contrary to Flash Builder and FDT to load the locales like in the Adobe doc, IntelliJ doesn't like theses commands and has his own found in this video.
After these changes, everything is OK and I could finally compile my project.
Well, I found the problem but not how to fix it yet :
It comes from my commands arguments to compile locales files :
-locale en_US fr_FR
-source-path ./src/locale/{locale}
-allow-source-path-overlap=true
As soon as I add these commands, I have got the 1172 and 1120 with some classes.
However, these commands work in Flash Builder or FDT.
So what's wrong ?
Thx.

LibGDX: Gwt logging not working in my project

Don't worry, I'm not asking you to fix all my bugs, I just wanted to know common causes for gwt/html logging to not work.
Here is my project:
https://github.com/vedi0boy/Archipelo
I cannot get logging to work at all in html. I used this code in a brand new LibGDX project and it worked (inside the main class):
#Override
public void create () {
Gdx.App.setLogLevel(Application.LOG_DEBUG);
Gdx.app.log("Test", "Test log message.";
}
I just don't get it. Is there something common that could be making basic html/gwt functions not work? My libgdx is update to 1.9.2. I can't seem to figure out why it works on a new project but not mine.
What should I do? Should I attempt to copy all the code to a new project? Thanks.
P.S. I am also unable to use a networking library that I need, and it also works on a brand new project.
The solution was simple. I made a while loop that did not continue until a connection to the server was established. Since javascript is single threaded, it got caught in an infinite loop.
The reason this has to do with logging is because LibGDX only loads up the log box when create is finished being run and my infinite loop was in create so it never got around to rendering the logs.
Lesson: Don't treat JavaScript as a multi-threaded language when using GWT, because it isn't.
You don't need to copy all your code to a new project, if you have doubts about your LIBGDX version you can update your corruent project to a recent V of libgdx,
use the build.gradle like follow :
gdxVersion = "1.5.2" // your gdx version here
for more info read this topic in the official WIKI

Flash Builder - Internal Build Error / Classes Must Not Be Nested

I've been working on a Flash Builder project for about a week and occasionally encounter one of these two errors when I build:
An internal build error has occurred. See the error log for more information.
1131: Classes must not be nested.
A quick Project > Clean fixes things up. When I opened my project this morning and tried to build it, I received the internal build error again. This time, however, Project > Clean results in 5 separate "Classes must not be nested" errors, all pointing to my main class declaration.
Running Project > Clean again leads back to the internal build error. If I Clean again, I get the 5 class errors again, and so on.
I'm using Flash Builder 4.6, Flex 4.6, and AIR 3.5. I haven't made any changes to my codebase since yesterday. Any ideas what might be causing this?
I had the same problem with flashb uilder 4.6,
when i try to compile the app out of the blue it says
"flash builder internal build error has occurred see the error log for more information"
to resolve this you have to check the compiler arguments
when this happens you wont be able to go to compiler argumnts GUI, you have to edit it in .actionScriptProperties file
remove -local and local names save the file and try to compile you would not get the error
to put back the local you have to rephrase the local as follows
-locale=en_US,us_EN
What worked for me was to remove all swc references from the project's compiler settings, then re-insert them.

VerifyError: Error #1014: class could not be found

I'm developing AS3 project using Flash Builder 4.5 (also with library Away3D 4.0 and Flex 4.5.1 SDK).
Also, I add my own SWC library, which I compile previously into my project.
It works find if I import class in my SWC library, however I want my swf run in a stand-alone flash player 11.
I follow this tutorial:
http://help.adobe.com/en_US/flashbuilder/using/WSe4e4b720da9dedb5-4dd43be212e8f90c222-7ffb.html
Now, I could run my app in a flash player 11, but I got an error in run time:
VerifyError: Error #1014: XXX class could not be found
And XXX is my class in SWC library. How should I fix this?
Merged into code means this, in project properties -> Flex Build Path -> Library Path -> Framework Linkage. Framework lingage has two options Merged into code and RSL. Chose Merged into code. This should solve your problem.
We had this problem when trying to build a project using a Native Extension.
Classes within the NE weren't being found at runtime, but were accessible in Flash Builder.
It turned out that by default the .ANE file wasn't copied to the device.
To fix this, change the following project property:
ActionScript Build Packaging -> Apple iOS -> Native Extensions -> Check 'Package' for the ANE
No idea why it wasn't included by default. When you uncheck 'Package' you get a warning telling you that it may cause runtime issues!
In my case, we had a nested reference to the same library which needed to load before the other library also using it. This fix can be accomplished by unchecking the 'Automatically determine library ordering based on dependencies' and moving the library up in the chain of Build path libraries. Flash Builder was unable to determine the correct order base on dependencies because we had 2 different versions of the same library. The error would only happen during run time.
I had this problem after installing AIR 3.9 and trying to upgrade a project.
It was also saying there was an RSL error, before throwing a succession of #1014 errors.
It worked after I set the textLayout.swc link type in Advanced ActionScript Settings to 'merged into code' instead of the default (RSL)
Hope this helps!
Since I landed on this page searching for this error message and none of the above solutions worked for me, here's how I finally managed to work around it:
It seems that this error happens particularly when you include old libraries that were compiled with the old compiler but compile your app with the new one. Unfortunately the error sometimes fires and when you compile again it doesn't; at other times it works fine in the debug version but then it fails in the release.
What worked for me is to include dummy objects in your main app which are instances of the class that the verify error complains about:
import some.classpath.to.TheClassThatFailsOnVerify;
function YourMainApp(){
var dummy:TheClassThatFailsOnVerify = new TheClassThatFailsOnVerify ();
}
At least in my case the errors only fired for classes that were not used directly in the app but only internally in the swc library code, so by having the dummy objects in the main app I force Flash Builder to include those classes in the compilation.
In some cases you might have to first find the swc that contains the class in question since it's not part of the library swc you use but it's again a library that that swc uses itself.

close air app, where is it?

Seems System.exit(0) and flash.system.System.exit(0) both throw the error "[Fault] exception, information=SecurityError: Error #2018: System.exit is only available in the standalone Flash Player."
I'm creating a fullscreen app and im simply want to add a close button that will close all windows and exit (i have a secondary window via NativeWindow open). Tons and tons of googling any nothing. Makes me wonder if im missing something super simple since all "chromless" apps would have to have this.
Poking around I found stage.NativeWindow but closing that does not exit the whole app.
*note I am building and testing in flashdevlop 4.0 with pure as3, no flex.
NativeApplication.nativeApplication.exit();
When in doubt, check the docs! :)
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/NativeApplication.html#exit()