An internal build error has occurred – Flex
While debugging on my current project, my flex builder got crashed with out any known reason.
And when I restart my Flex builder I got this error.
An internal build error has occurred. Right-click for more information.
Well just to start with…
-
No information provided at all on right clicking.
- You don’t get jumped on the location. Strange but don’t know why?
- Shows error at line -1. Where to find this line?
After googling for a while I encounter that many of the Flex developer has faced this similar error. Have a look what 9Media has to say for the same. They have compile some of the most interesting set of reason found for this error.
I was more interested in the 2nd point which talks about “adl.exe” process. I couldn’t locate the specified process.
After, trying hare I restarted my system. Well, yes it solved my problem too.
So, my conclusion is that there might be any other process which still running (considering my last action i.e. debugging the application).
I also tried the empty “switch“ case. And yes, it is one of the reason for this error. I guess Flex builder throws a general error for all these unknown and strange reasons.
Hope Adobe came up with little bit more creative and informative error messages in next build.
Finding Client Machine Capabilities using Flex / Flash
In my current project Flipbook, we needed to tackle with the resolution settings on the Client side.
After googling for a while, we came to know about a very handy API from Action Script 3.0 named Capabilities. Many importent system setting on Client machine can be viewed using it which includes …
- System Resoultions
- Operating System
- Version
- Player Type
- Audio Capabilities
- Video Encouder
Using various properties for Capabilities class, you can determine different client side settings in your application. For ex. I needed to set the browser resolution based on the Current Client Resolution settings. Certainly it’s preety good to know this API.
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute”
creationComplete=”onCreationComplete(event);”>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
import flash.system.Capabilities
public function onCreationComplete(event:FlexEvent):void
{
showCapabilities();
}
private function showCapabilities():void
{
trace("avHardwareDisable: " + Capabilities.avHardwareDisable);
trace("hasAccessibility: " + Capabilities.hasAccessibility);
trace("hasAudio: " + Capabilities.hasAudio);
trace("hasAudioEncoder: " + Capabilities.hasAudioEncoder);
trace("hasEmbeddedVideo: " + Capabilities.hasEmbeddedVideo);
trace("hasMP3: " + Capabilities.hasMP3);
trace("hasPrinting: " + Capabilities.hasPrinting);
trace("hasScreenBroadcast: " + Capabilities.hasScreenBroadcast);
trace("hasScreenPlayback: " + Capabilities.hasScreenPlayback);
trace("hasStreamingAudio: " + Capabilities.hasStreamingAudio);
trace("hasVideoEncoder: " + Capabilities.hasVideoEncoder);
trace("isDebugger: " + Capabilities.isDebugger);
trace("language: " + Capabilities.language);
trace("localFileReadDisable: " + Capabilities.localFileReadDisable);
trace("manufacturer: " + Capabilities.manufacturer);
trace("os: " + Capabilities.os);
trace("pixelAspectRatio: " + Capabilities.pixelAspectRatio);
trace("playerType: " + Capabilities.playerType);
trace("screenColor: " + Capabilities.screenColor);
trace("screenDPI: " + Capabilities.screenDPI);
trace("screenResolutionX: " + Capabilities.screenResolutionX);
trace("screenResolutionY: " + Capabilities.screenResolutionY);
trace("serverString: " + Capabilities.serverString);
trace("version: " + Capabilities.version);
}
]]>
</mx:Script>
</mx:Application>
Flex : Embed Fonts with Unicode
Our on going application is having requirement to manipulate fonts. There is a one conventional way to embed fonts with .swf i.e. using CSS.
In CSS, we normally specify the source and fontFamily .
@font-face
{
src: url(‘../assets/fonts/ARIAL.TTF’);
fontFamily: “Arial”;
}
Let’s say my application need to support around 100 multiple font families. if you embed all of them that’s become a huge .swf.
What we can do is to allow only the Alphabets, numbers and some special characters to be embed. Yes, we can achieve this using Unicode . For ex.
@font-face
{
src:url(‘../assets/fonts/ARIAL.TTF’);
fontFamily: “ARIAL”;
flashType: true;
unicodeRange:
U 0041-U 005A, /* Upper-Case [A..Z] */
U 0061-U 007A, /* Lower-Case a-z */
U 0030-U 0039, /* Numbers [0..9] */
U 0020-U 002F, /* Punctuation */
U 003A-U 0040, /* Punctuation */
U 005B-U 0060, /* Punctuation */
U 007B-U 007E; /* Punctuation */
}
By specifying the Unicode values of all the character to be embed we can reduce the size of font embed drastically. Also, it can be used as a validation for Input controls also.
I will be looking forward to use this feature in many more possible ways.
File I/O Error #2038 in Flex File Upload
While working on my current assignment, where we were required to allow File upload using .Net in back end. Well things worked smoothly like creating a web service in .Net 2.0 and integration with Flex 3.0. I won’t fall in the details of creating Web Service and passing parameters. The weired issue (which turns out to be an obvious) is to allow the rights/permission to the Upload directory under Virtual Directory.
The Web Service is supposed to upload the Image (which is passed as parameter from Flex) to the local folder of the same directory level. In order to upload/copy an image, we need to provide write permission on that folder.
We have given Anonymous Access to the Virtual directory(which should be avoided) for Application demo. But as in IIS 6.0 the IUSR_XXX account is dramatically low-privileged, ANY function but reading static content (.html, .jpg, .bmp) is disabled by default. Check out what Microsoft has to say on IIS 6.0 on http://technet.microsoft.com/en-us/library/bb693984.aspx.
More IIS 6.0 settings can be viewed on http://www.apdsoft.com/afo/iis6.htm
Until and unless, we gave the full read,write and delete rights on the Upload directory to the IUSER, it was getting File I/O error.
So there it is folks, if you are getting Flex File I/O Error #2038, checking rights/permission is one of the few points to take care first.
