I have a pure ActionScript project. I'm using Flex Builder on a Mac, Flex SDK 3.4 and I've even added the playerglobal.swc from the Flash folder to the project's library path. I get autocomplete when I add
import flash.net.NetStreamPlayOptions;
import flash.net.NetStreamPlayTransitions;
But when I run the movie, I get:
VerifyError: Error #1014: Class flash.net::NetStreamPlayOptions could not be found.
I don't get it.. What must I do to use those classes?
It looks to me like the NetPlayStreamingOptions class isn't available In the Flex 3.4 SDK. I changed my build target to Flex 4 (flash player 10) and it compiles fine.
Related
I am porting over a Flex application from 4.1 to 4.5 and have run into some issues with the AdvancedDataGrid classes being found. The application compiles ok under 4.5.1 but at runtime I get the following error:
VerifyError: Error #1014: Class mx.controls.advancedDataGridClasses::AdvancedDataGridRendererProvider could not be found.
It appears that what was the old datavisualization.swc was divided into to libraries (advancedgrids_4.5.21328.swf and charts_4.5.21328.swf) both of which are present in my project. is there anything in the configuration that I need to update?
I am currently using Eclipse Java EE IDE for Web Developers (Helios Service Release 1)
Many thanks,
Ian
Verify error really means that there's something wrong with versions of classes you are trying to access at runtime.
First of all, you can try plaing with 'merged/rsl' settings. Second, you can double-check your includes or try to build your app outside ide, with ant task, for example.
You will have to merge your libraries into code. This might be helpful -
VerifyError: Error #1014: class could not be found
I am trying to run my Flex project, however on runtime I get the error:
VerifyError: Error #1014: Class mx.core::DesignLayer could not be found
So I have added an import statement for the Design layer class: import mx.core.DesignLayer, and now I get the error on compile:
Definition mx.core::DesignLayer could not be found
What is DesignLayer? Why it could not be found even tough I import it?
Thanks.
You are probably building new functionality with an old SDK. Or perhaps you are reusing a third-party component that was built with a newer SDK inside you application built with an older SDK.
In either event the DesignLayer class was introduced in Flex version 4, as stated in the docs. So if you're building your application with some flavor of Flex 3, it makes sense the DesignLayer class can't be found, simply because it isn't there.
Go have a look in the framework's source code at [sdk-path]\frameworks\projects\framework\src\mx\core. In Flex 4+ you'll find the file DesignLayer.as there. Not so in Flex 3.
I am working on a feature for an application that requires Flex 4 functionality. Due to some migration issues of the application from Flex 3.5 to 4.0, I have decided to implement this feature as a module that is compiled with Flex 4.0. The theory is that the application would remain compiled in Flex 3.5 and load the module when it needs it.
Here is the module loading code:
public function loadDiagModule():void {
var moduleLoader:ModuleLoader = new ModuleLoader();
moduleLoader.url = "module/DiagrammerModule.swf";
moduleLoader.loadModule();
moduleLoader.addEventListener(ModuleEvent.READY, onModuleReady);
}
protected function onModuleReady( moduleEvent:ModuleEvent ):void
{
var moduleInfo:IModuleInfo = moduleEvent.module;
var sample:IDiagrammerModule = moduleInfo.factory.create() as IDiagrammerModule;
Application.application.addChild(sample.testRender());
}
Unfortunately, I am encountering a runtime error when I load the module in the application:
VerifyError: Error #1014: Class mx.modules::ModuleBase could not be found.
at flash.display::MovieClip/nextFrame()
at mx.core::FlexModuleFactory/deferredNextFrame()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:631]
at mx.core::FlexModuleFactory/update()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:401]
at mx.core::FlexModuleFactory/moduleCompleteHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\FlexModuleFactory.as:718]
I suspect that this may be a result of a mismatch in ModuleBase's class definition in Flex 3.5 and 4.0. Is there some kind of configuration change with my application and/or module project that would remedy this error?
Here's some info on my configuration:
IDE: Flash builder 4 plugin
App project
SDK: Flex 3.5
framework linkage: Merged into code
Additional compiler arguments: -locale=en_US,ja_JP -source-path=./locale/{locale}
Module project
SDK: Flex 4.0
framework linkage: Use SDK default (runtime shared library)
Copy non-embedded files to output file: true
Generate accessible SWF File: true
Additional compiler arguments: -locale en_US
Loading modules compiled in a different version of the SDK is possible since Flex 3.2, however there are compatibility considerations you must consider.
It's called The Marshall Plan, and you can read more information about it here and hereEssentially the host application establishes different sandboxes for the modules, and communication between them is limited (although still very possible).
Hope that helps.
I'm trying to use the Flex 4 SDK's mx.rpc package in a Flash application.
I imported Flex's rpc.swc (Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs\rpc.swc) into my project by adding it to the list in Flash's "Publish Settings/Flash/ActionScrip 3.0 Settings/Library Path". It seems like I have access to the classes, however when I compile I get this error:
1046: Type was not found or was not a compile-time constant: [mx.rpc]::IResponder.
There's no location or line for the error either. Any idea how to get this to work? TIA!
Notes:
I'm using Flash Builder 4 and Flash CS5
Importing the rpc.swc wasn't enough. I added the entire Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs\ folder to the library path, and that fixed the problem.
The IResponder Interface is included in the framework.swc. That one and rpc.swc should be enough if those are the only flex features you are using.
I am refactoring a hugh action script solution in Flash builder (beta 2) using the flex 4 sdk.
The project does NOT use the mx framework.
What i want to have is:
A big 'MAIN' project
several small 'MODULE' projects. each 'MODULE' class refrences the 'MAIN' project as an External reference (doesnt compile into swf) - this is done by setting link type = external in the 'MODULE' project properties -> library path.
'MAIN' loads a 'MODULE' project on runtime using the 'loader' class.
the problem:
I recieve an error from the MODULE project:
VerifyError: Error #1014: Class [some class in MAIN] could not be found.
PLEASE HELP!
Check which application domain you are loading your module into. The app domain needs to be able to access the class you have externalised or you'll get that error.
It might just be a bug with the beta version of the sdk. It seems like the import of a class in a module created in another project doesn't force it's inclusion in the main swf.
try putting a dummy dependency in you main application class, like:
private var forcedImports:Array = [MyClass];
It fixed some of my problems before.