开发者

Creating Flex 3.5 components with Flash CS5

开发者 https://www.devze.com 2023-01-06 09:37 出处:网络
Is there 开发者_如何学JAVAa way to create components compatible with Flex 3.5 by using Flash CS5? I\'m stumped. Whenever I run the \"Convert Symbol to Flex Component\" command and then try to use the

Is there 开发者_如何学JAVAa way to create components compatible with Flex 3.5 by using Flash CS5? I'm stumped. Whenever I run the "Convert Symbol to Flex Component" command and then try to use the resulting .swc file in a Flex 3.5 app, I get multiple instances of the following error:

1046: Type was not found or was not a compile-time constant: Matrix3D.

1046: Type was not found or was not a compile-time constant: Vector3D.

Any help or suggestions?


I had the same problem. I found a work around, though. You need to create the component using Flash Builder by dragging a Flash Professional Component onto your application. (You must be in Design Mode to do this.) Then, in the properties sheet, there will be a button labeled "Create In Flash Professional..." Clicking this button will create a Flash Document with all the correct frameworks and sdks and launch Flash Professional.


The errors you are seeing are usually brought on by a version mismatch between the Flex SDK that the SWC was compiled against and the Flex SDK of your project.

When creating SWCs using the Flash Pro interface, I'm not sure if they can be used in Flex. Generally SWCs are not sharable between Flex and Flash. People either recompile the source code or generate a SWF and embed it or load it using a SWFLoader.

If you're using the Flex Component Kit for Flash make sure you're using the same kit that came with the SDK you plan to target.

0

精彩评论

暂无评论...
验证码 换一张
取 消