I have a problem using Sociodox BASE64 LIBRARY library.
I’m totally newbie in Flash so please help.
I’ve connected the library with
import com.sociodox.utils.Base64;
After that I try to compile my project but get the following error:
Base64.as, Line 146: 1100: Syntax error: XML does not have matching
begin and end tags. Base64.as, Line 146: 1084: Syntax error: expecting
rightbrace before end of program.
Here is a screenshot of the errors:
Please advise!
It looks like the code uses short Vector initialisation syntax: new <int>[] which your compiler tries to interpret as XML.
What are you using to compile? Flash or Flash Builder? I know that Flash Builder 4.7 should be able to handle this syntax, at least when you're compiling with an AIR SDK that contains the new ASC2 compiler.
Related
I'm getting the error even though the import is not throwing errors:
1046: Type was not found or was not a compile-time constant: EncryptedLocalStore.
Here is my code:
import flash.data.EncryptedLocalStore;
var str:String = "Bob";
var bytes:ByteArray = new ByteArray();
bytes.writeUTFBytes(str);
EncryptedLocalStore.setItem("firstName", bytes);
var storedValue:ByteArray = EncryptedLocalStore.getItem("firstName");
trace(storedValue.readUTFBytes(storedValue.length)); // "Bob"
EncryptedLocalStore.removeItem("firstName");
I've checked and EncryptedLocalStore was introduced in AIR 1.0 (or 3.0). I'm using AIR 3.6. I'm also using this in a library project.
It's strange. I was somehow able to get rid of the errors by doing the following:
Clean
Restart
Select Include Adobe AIR libraries in the Project Properties > Compiler settings
Add -swf-version=19 to compiler arguments
Clean
Choose Use minimum Flash Player version
Clean
Change to different SDK
Clean project.
NOTE: It's working at this point. I then reversed back through those changes and after doing the following it still works.
Change back to original SDK
Clean
Uncheck Include Adobe AIR libraries in the Project Properties > Compiler settings
Clean
Remove -swf-version=19 from compiler arguments
Clean
Remove Use minimum Flash Player version and enter Flash Player 15.0.0
I'm back to where I started but now it's working?
UPDATE:
OK I figured it out:
Select "Include Adobe AIR libraries"
Switch SDK (Clicking apply doesn't work)
Errors should go away
Switch back to previous SDK
For some reason, when I use package_as3 in FlasCC I can't import any classes to use as a var.
package_as3
(
"#package private\n"
"import flash.system.MessageChannel;\n"
"var mc:MessageChannel;\n"
);
When I try to build anything that has this code in it, I get this:
Error: Type was not found or was not a compile-time constant: MessageChannel.
whenever I use the compiled SWC in Flex.
EDIT:
This doesn't just apply to flash.system.MessageChannel; it seems to happen to anything that gets imported.
A few things to try out
Syntax
I don't think you are supposed to wrap each line in quotes, nor add \n for string termination, so that's one thing that need mending.
SDK
The MessageChannel class requires SDK version 4.6 and above so did you select the correct SDK and add it to your buildpath?
Runtime
Also the MessageChannel interface did not get run-time support until version 14.0.0 (AIR or Player), so in project properties -> ActionScript Compiler, did you set the 'Require Flash Player Version' to version 14.0 or above?
I'm trying to run my Game created using cocos2d-x-v2.2.3 (language cpp) for windows phone. But it shows following error.
error C2440: 'type cast' : cannot convert from 'void (__cdecl StartScene::* )(void)' to 'cocos2d::extension::SEL_CCControlHandler'
If I include pch.h file in all class file above error is removed then new error created. The error is
"Cannot open include file: 'pch.h': No such file or directory"
Though pch.h and pch.cpp are presented in CocosDenshion. In this circumstances what should i do?
Thanks in Advance
i think this because you use wrong function, fowllow this (CCObject::SEL_CCControlHandler)(CCObject, CCControlEvent) so the func you use must have func(CCObject*, CCControlEvent),
Hi, I am a beginner in AS3 and came across this particular error:
VerifyError: Error #1014: Class JSON could not be found.
at Function/http://adobe.com/AS3/2006/builtin::apply()
at flash.external::ExternalInterface$/_callIn()
at Function/<anonymous>()
I was trying out the native JSON and everything seemed to be fine on the IDE (FlashDevelop). I am also using Flash Player 11, Flex SDK 4.6.0 and AIR 3.1 as describe on Adobe AS3 Native JSON
Any ideas?
Please make sure that you have Flash player 11.2 playerglobal.swc located at:
\frameworks\libs\player\11.X
where X denotes the Flash player 11 release version 1,2,3. Please also note that you need to specify the following in teh compilation constants:
-swf-version=13 (FP11.1)
-swf-version=15 (FP11.2)
Once you do that, you should be able to get the native JSON API working.
Is is possible to debug actionscript via Flash Builder to see line number where exception happened? Currently i only see error code and description of error.
Any good articles are welcome.
Thanks.
If you catch an error you can trace the result of the
getStackTrace()
method. look here: as3 reference
In the compiler options panel of your run configuration, set -debug=true. This should enable the output of line numbers for all stack traces, including those of uncaught errors.