"Definition mx.utils:Base64Encoder could not be found" in Flex Builder 3
I'm trying to edit an existing AS3 application (which was built using开发者_运维百科 Flash Develop) in Flex Builder 3.
The application uses Base64Encoder (using "import mx.utils.Base64Encoder"). This compiles without problems in Flash Develop but trying to build it in Flex Builder 3 (Mac version) gives an error:
"Definition mx.utils:Base64Encoder could not be found"
Indeed when using code completion (ctrl + space) in flex, on "import mx.utils." only 4 utils are shown in the list.
I've tried this using the Flex 3.2.0 sdk that came with Flex Builder 3 and the Flex 3.5.0 sdk which I downloaded from the adobe website.
Does anyone know why this might be? and how I could resolve this?
Thanks.
I've fixed this by adding 'framework.swc' to my library build path.
Instructions:
Right-click project and select 'properties'
Select Actionscript Build Path
Select 'Library Path' tab
Click 'Add SWC...' button
Enter [path to your sdk]/frameworks/libs/framework.swc
Click 'OK' to add swc
Click 'OK' to close properties
Re-build your project
You need to include [SDK]/frameworks/libs/rpc.swc file from Flex SDK
It's probably borrowed from the Flash class lib rather than the Flex one. There are plenty of base64 implementations out there that you could substitute.
精彩评论