Smoothing BitmapData in an Image Component from other domains ASDoc(s), AIR Applications and You.
Sep 22

Quick Fix:
If you have an error reading “Unable to resolve a class for ResourceBundle: logging.” you need to add the local/en_US/framework_rb.swc library to your ActionScript project.

The longer version:

So my team and I were interested in using the built-in flex logging framework provided for Adobe for a new internal logging app. We started looking into it and after determining that it wouldn’t add any unnecessary weight to our flex projects we decided to go with it.

However, we wanted to standardize on a logging framework that would also work for low-weight ActionScript 3 projects. So I figured, “well, they’re just classes, I’ll add the libraries and start using them.” So I went into my project properties and added the framework.swc library and my “Definition mx.logging:Log could not be found” error went away.

Except I got this great new error “Unable to resolve a class for ResourceBundle: logging.” . . . huh?

After looking around I found a post on moock.org: How to use Tween in an ActionScript Project (Flex Builder 2). His specific example was for using the Tween class in a normally Flex-less project. However, it seems to be the fix for other cases where you want to use Flex components/classes in an AS2 project.

The problem is that the framework_rb.swc contains the IResourceManager and ResourceManager classes that the Log class references as well as the logging.properties file.

I’m not sure what this means for localization, though, since the framework_rb.swc is inside the locale/en_US directory. My work doesn’t ever involve localization so I haven’t really looked into any further. Anybody have any thoughts on that?

Also, just as a note, the “100kb of dependant code” Moock references is specific to his use of Tween and its dependance on UIComponent. It does not mean that you get the 100kb just for touching the Flex libraries.

One Response to “Using Flex Components/Classes in ActionScript 3 Projects - ResourceBundle error”

  1. Flex logging target on AIR | by Hans Van de Velde Says:

    [...] library to your ActionScript project. For more information, check out this blog post: http://www.kevin-fitzpatrick.net/blog/?p=12 addthis_url = ‘http%3A%2F%2Fwww.novio.be%2Fblog%2F%3Fp%3D231′; addthis_title = [...]

Leave a Reply