Posts Tagged ‘AS3’

Bug Fix and Discussion: Flex Error #1001: Digest mismatch with RSL framework_3.0.189825.swf. Redeploy the matching RSL or relink your application with the matching library.

Friday, March 28th, 2008

MyGeekLife is getting ready to go into limited Beta in May and we just migrated our code from Flex 2 to Flex 3. We are hopping to leverage some of the great advantages that Flex 3 has to offer eg smaller swf sizes, extended testing, cached framework, and superior CSS functionality. Unfortunately, after our implementations we started receiving the following error.

“Flex Error #1001: Digest mismatch with RSL framework_3.0.189825.swf. Redeploy the matching RSL or relink your application with the matching library.”

The interesting thing is this is only occurring on ½ of the swfs we are rendering. Anyway, there are a few hacks that we are looking into. The first one is to have our entire user base update to the latest version of flash. Yes, that is right even if you are running Flex 2 and everything looks great. Flex 3 can cause problems. I am not sure when Adobe updated the Flash player, but the newest version fixes the problem. If you look at Ted on Flex you will see that the updating bug should be fixed soon. The other solution, which we are currently attempting, is the following.

(This text was taken from http://www.duzengqiang.com/blog/article.asp?id=681, I believe their server is some where in Asia and can take a while to load)

 

This SDK is missing framework_3.0.189825.swf and rpc_3.0.0189825.swf (known bug).

Since your are missing framework_3.0.189825.swf in the frameworks\rsls directory, Flex Builder is unzipping the library.swf from framework.swc and copying it to the bin directory. You are getting the digest mismatch error
because the application is expecting an optimized RSL, not the
unoptimized RSL (library.swf).

The workaround is to create the optimized RSL for the SDK yourself. The
steps to create the optimized RSL are:

1. Unzip library.swf from frameworks\libs\framework.swc to the frameworks\rsls directory.
2. Optimize library.swf and rename it to framework_3.0.189825.swf

>optimizer library.swf –output framework_3.0.189825.swf –keep-as3-metadata=Bindable,Managed,ChangeEvent,NonCommittingChangeEvent,Transient

(more at Optimizing RSL SWF File)

3. Delete library.swf
4. digest –digest.rsl-file framework_3.0.189825.swf –digest.swc-path framework.swc

Now you should have the framework_3.0.189825.swf in the frameworks\rsls
directory has it should have been. You can repeat the same process for
rpc_3.0.189825.swf if needed.

Here are the 2 fixes we have found. If you have an additional fix, comment, or want to start a discussion, please feel free to post a comment.

You Rock,

S.A.M.

P.S. This blog will be updated as we discover the results of the second hack.

Sphere: Related Content

Flex: Creating a custom context menu item for an application

Wednesday, February 13th, 2008

Here is a little piece of code I would like to share with all my fellow Flex Geeks out there. This code explains how to create a custom context menu item for an app. If you have any questions, please feel free to ask. There are other similar flex resources at http://blog.flexexamples.com.

<?xml version=”1.0″ encoding=”utf-8″?>
<!– http://blog.mygeeklife.net/creating-a-custom-context-menu-for-an-application/ –>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”
layout=”absolute”
creationComplete=”contextMenuItems();”
backgroundGradientColors=”[#ffffff, #a9b4d8]”>

<mx:Script>
<![CDATA[

// Declare a bindable private variable

[Bindable]
private var cm:ContextMenu;

// This function initializes a new Context Menu

private function contextMenuItems():void {

// Declare ContextMenuItem variable

var myGeekLifeLink:ContextMenuItem = new ContextMenuItem(”MyGeekLife”);

// Add event listener which calls the myGeekLifeLink_menuItemSelect function declared below

myGeekLifeLink.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, myGeekLifeLink_menuItemSelect);

// Create new context menu

cm = new ContextMenu();

// Hide default context menu items

cm.hideBuiltInItems();

// Add link

cm.customItems.push(myGeekLifeLink);

// Apply context menu to application

application.contextMenu = cm;
}

// Navigates to new url when link is clicked

private function myGeekLifeLink_menuItemSelect(evt:ContextMenuEvent):void {
navigateToURL(new URLRequest(’http://www.mygeeklife.net/’));
}

]]>
</mx:Script>

<mx:VBox width=”100%” height=”100%” horizontalAlign=”center” verticalAlign=”middle”>
<mx:Panel width=”250″ height=”200″ title=”Example App”>
<mx:Text text=”Right click anywhere on the application to initialize the Context Menu. Click on MyGeekLife to be taken to the URL. ” width=”229″ height=”160″ fontFamily=”Arial” fontSize=”17″ color=”#000000″/>
</mx:Panel>
</mx:VBox>

</mx:Application>

Sphere: Related Content