BTA Flexing

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

Archive for the ‘Uncategorized’ Category

Spelling checking feature in flex by Using ’squiggly.

Posted by shardulbartwal on September 23, 2009

Spelling checking feature in flex by Using ’squiggly.

Today I explore the spell checking feature in flex using ’squiggly’.Now we can easily get the spell checking feature in our Application which are more concerned about Text Entries. Its really really nice. Its an spelling checking engine for flash Player and Adobe AIR.

Please explore the link below for details about ’squiggly’.
http://labs.adobe.com/technologies/squiggly/

You can download ’squiggly’ from here.
http://labs.adobe.com/downloads/squiggly.html

You can easily use it in your flex application. And live demo is here at adobe’s site.
http://labs.adobe.com/technologies/squiggly/demo/

Enjoy Flexing………….

Shardul Singh Bartwal

Posted in Uncategorized | Leave a Comment »

Play and Stop Swf in Flex

Posted by shardulbartwal on September 21, 2009

Play and Stop Swf in Flex
Many of times I have seen people to looking for requirement when they want to stop and play the swf out side the swf. This becomes more important when you  want  to  play or stop the swf’s which are not created by you.Below is the code  for  the  same  requirement.  In  this  demo  Application ,  I   am  using a Loader for playing the swf. Hope it will be helpful for you if you require.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="OnCreationComplete()">
<mx:Script>
<![CDATA[
		import mx.core.UIComponent;
		private var loader:Loader; 

		private function OnCreationComplete():void
		{
			var url : String ="assets/MyanimatedSwf.swf";
			loader = new Loader();
			var request:URLRequest = new URLRequest(url);
			loader.load(request);
			loaderHolder.rawChildren.addChild(loader as DisplayObject);
		}

		private function onStop():void
		{
		var mc : MovieClip = loader.content as MovieClip;
		mc.stop();
		}

		private function onPlay():void
		{
		var mc : MovieClip = loader.content as MovieClip;
		mc.play();
		}
]]>
</mx:Script>
<mx:VBox width="100%" height="100%" horizontalAlign="center"
	verticalAlign="middle">
		<mx:Canvas id="loaderHolder" width="500" height="500"/>
		<mx:Button label="Stop" click="onStop()"/>
		<mx:Button label="Play" click="onPlay()"/>
</mx:VBox>
</mx:Application>

Enjoy Flexing………….

Posted in Uncategorized | Leave a Comment »

Using Multiple Local Languages in Flex

Posted by shardulbartwal 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.

Posted in Uncategorized | 1 Comment »

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

Posted by shardulbartwal 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 | 2 Comments »

Diffrence between invalidateDisplayList and invalidateList

Posted by shardulbartwal on July 31, 2009

invalidateDisplayList vs invalidateList

I found a very nice link about the difference between these two, and want to share with you .

http://stackoverflow.com/questions/74269/what-is-the-difference-between-invalidatelist-and-invalidatedisplaylist

 Many Many thnx to mike chambers for providing this important information.

 

Shardul Singh Bartwal

Posted in Uncategorized | Leave a Comment »