views:

461

answers:

1

I have developed a flex application using the data visualization components. I am now trying to optimize the application and one of approaches I am trying is to use Runtime Shared Libraries.

I have configured Flex Builder to deploy with Runtime Shared Libraries and have added the .swz file for the framework, datavisualization and rpc share libraries. After deploying, my application loads, however my axis values within each of my charts are missing. The axes themselves are shown, however they do not have their label units displayed. The series themselves are displayed too.

I have tried this using the 3.4 SDK and also the 3.2 SDK within Flex Builder. I also tried compiling flex using the mxmlc ANT tasks and got the same results.

I made sure that the framework RSL is getting loaded first and I also made sure that the global flash cache has been cleared before I tested.

I can see from my access logs that the .swz files are getting loaded the first time I make a request for my application, so I am confident that I properly cleared the flash player global cache.

Does anyone know why my axis values would be missing only when I deploy with RSL??? Switching back to Merged mode, my application works fine and it is only when I deploy with RSLs that I get the issue.

I have also tried to compile using only the framework RSL and not the datavisualization or rpc RSLs (keeping them in merged mode) and I get the same results, no axis values.

Any help is appreciated.

Thanks.

A: 

I was having this same issue using 3.4.0.9271. After some trial and error, I figured out a hacky solution. I am going to open a bug report for this. Here are a few notes and an example:

  1. This only happens if your chart is using an embedded font. As far as I can tell, device fonts are fine.
  2. As you discovered, the loading of the framework rsl appears to be the guilty party.
  3. In the initialization phase, the embedded fonts are available to the application - trace out the Font.enumerateFonts array to see. I was a little surprised that my embedded fonts were available.
  4. Registering the fonts explicitly appears to do the trick
  5. I don't know what repercussions this may have on load time, font conflicts, etc

Example: register embedded Lucida font within the Application's initialize phase

[Embed(source="/assets/fonts/Lucida Grande.ttf",fontName="LucidaGrandeEmbedded", fontStyle="normal")
private var myNormalLucida:Class;

private function onInitialize():void {
  Font.registerFont(myNormalLucida)
}
Matt Dressel