BTA Flexing

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

Archive for July, 2010

Saving Image to File System Using Flex 4

Posted by Shardul Singh Bartwal on July 4, 2010

It is possible for us to saving any image to our computer from flex application( without any server code).Below is
the demo application.Please not that this is the feature of the flash player 10. So It will not work if your flash player is
older than flash player 10.


<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
 xmlns:s="library://ns.adobe.com/flex/spark"
 xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
 <fx:Script>
 <![CDATA[

 import mx.graphics.ImageSnapshot;
 import mx.graphics.codec.JPEGEncoder;
 private function saveImageToFileSystem():void
 {
 var jPEGEncoder:JPEGEncoder = new JPEGEncoder(500);
 var imageSnapshot:ImageSnapshot = ImageSnapshot.captureImage(imgCanvas, 0, jPEGEncoder);
 var fileReference:FileReference = new FileReference();
 fileReference.save(imageSnapshot.data, "img123.jpg");
 }
 ]]>
 </fx:Script>

<mx:VBox horizontalAlign="center" verticalAlign="middle">
<mx:Canvas id="imgCanvas">
<mx:Image source="images/image1.jpg"/>
</mx:Canvas>
 <s:Button click="saveImageToFileSystem()" label="Save Image"/>
</mx:VBox>


</s:Application>




Posted in Flex, Flex 4 | 4 Comments »

Mobile Applications in Flex

Posted by Shardul Singh Bartwal on July 4, 2010

Great news from Adobe that now we can create the web,desktop as well as the most awaited mobile applications only from the single framework.One more platform open for all the flex guys.”Hero” is the code name for this sdk.

For detail please visit:-

http://opensource.adobe.com/wiki/display/flexsdk/Hero

Please also explore for detail:-

http://download.macromedia.com/pub/labs/flex/mobile/flexmobile_whitepaper.pdf

Enjoy Flexing……..

Posted in Flex, Flex 4, Mobile Applications with Flex | Leave a Comment »