BTA Flexing

My passion RIAs…………..Shardul Singh Bartwal

Archive for August, 2009

Using Multiple Local Languages in Flex

Posted by Shardul Singh Bartwal on August 29, 2009

If you want to support a large number of the languages,then you will require to embed the ‘arial unicode ms’ font,but the embedding of this font is something different. If you will try to embed this font normally then it will give you compile time error. For embedding this font you will require to pass the compiler argument. Just go to the your compiler setting and add there
‘-managers=flash.fonts.AFEFontManager’ it will resolved your compile time error,and now you can use the wide range of the fonts from the different languages.

Advertisements

Posted in Uncategorized | 1 Comment »

SecurityError: Error #2123: Security sandbox violation: LoaderInfo.content.

Posted by Shardul Singh Bartwal on August 4, 2009

If you are using the Loader for loading the images,and you want to play with the bitmap of the image.May be couples fo times an issue can be occur with you. If you will host your application on any machine and your images will be on other machine then you will not able to load the images. And the bad thing is that you will also not find this Error without the debuger version of the flash player,and also it will work perfectly inside your flex builder i.e. development environment. I am assuming here that you have already used the cross domain file. Then to outcome from this problem you will require to add two more lines in the code.

I was written the code earlier like this.

var context: LoaderContext = new LoaderContext()
context.checkPolicyFile = true;
loader.load( new URLRequest( mineUrl ), context )

For out coming to this problem we have to add two more line here.

context.securityDomain = SecurityDomain.currentDomain;
context.applicationDomain = ApplicationDomain.currentDomain;

Hence your overall code will be something like this.

var context: LoaderContext = new LoaderContext()
context.checkPolicyFile = true;
context.securityDomain = SecurityDomain.currentDomain;
context.applicationDomain = ApplicationDomain.currentDomain;
loader.load( new URLRequest( mineUrl ), context )

Please don’t forgot to add the line below which is for adding the crossdomain file.If you have not already added this.

Security.loadPolicyFile( crossDomainPath );

Hope you will like this.

Posted in Uncategorized | 3 Comments »