Showing posts with label flex. Show all posts
Showing posts with label flex. Show all posts

Wednesday, July 27, 2011

what is the flex 4 equivalent of horizontalAlign="center" for layout





Monday, July 25, 2011

Flex Component: PanScrollingCanvas

I just found an awesome Canvas with Panning Scrolling .....with a nice effect.


The PanScrollingCanvas is a Flex container that scrolls its children on mouse move. Fully skinnable buttons appear when hovering over the container. The behavior of those buttons can be customized on the client side, by listening to events that this container will fire on button rollover, rollout, and click.


source

Wednesday, June 29, 2011

Drawable Canvas

The component itself is a transparent canvas (background alpha = 0), which means that you can put it on top of anything you like in order to be able to draw anywhere.
On the mouse down event I add a mouse move listener which adds points to an array, and I remove the listener on the mouse up event. These arrays are the lines.
In the updateDisplayList method I loop through all the held arrays and draw them onto the canvas.


source

Flex FlowBox Container

Awesome container i've been looking for!!!

A container which would lay its child components out in a horizontal manner like an HBox, but unlike an HBox, it needed to wrap the child components into a new row when they exceeded the available width. If the available height was exceeded, the container should then grow downwards if the height property has not been set to a constrained value. If the height is constrained, then scrollbars should appear


check out

source

Friday, June 24, 2011

Flex Share on twitter

//Twitter/Bit.Ly Share Imports
import flash.net.navigateToURL;
import mx.rpc.events.ResultEvent;
import mx.rpc.xml.SimpleXMLDecoder;
import mx.utils.ObjectUtil;


//Twitter/Bit.Ly Share Vars
private var bitLyLoader:URLLoader;


/*
* Call this function to share on twitter, passing your url trough bit.ly!
*/
private function twitterShare(articleUrl:String):void
{
// Insert your bit.ly account name & API Key bellow
var bitLyApiUrl:String = "http://api.bit.ly/v3/shorten?login=ACCOUNT NAME&apiKey=API KEY&longUrl="+articleUrl+"&format=xml";
var bitLyApi:URLRequest = new URLRequest(bitLyApiUrl);
bitLyLoader = new URLLoader(bitLyApi);
bitLyLoader.addEventListener(Event.COMPLETE, bitLyFinished);
}

/*
* Get the short link & post to twitter
*/
private function bitLyFinished(event:Event):void
{
// Lets decode the bit.ly answer!
var getLink:XMLDocument = new XMLDocument(bitLyLoader.data);
var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true);
var bitLyLink:Object = decoder.decodeXML(getLink);
// Insert your message bellow! Use %23 for trending topics! (Example: %23DigitalWorks)
var URL:String = "http://twitter.com/home?status=Currently reading "+bitLyLink+" %23DigitalWorks";
navigateToURL(new URLRequest(URL), '_blank');
}

Flex Share on facebook

/**
* Flex Share on facebook - quick & easy way
**/
public function ShareOnFacebook(shareUrl:String):void
{
var openUrl:String = "http://www.facebook.com/sharer.php?u="+shareUrl;
navigateToURL(new URLRequest(openUrl), '_blank');
}

Wednesday, April 13, 2011

Smoothing resized distorted images in flex

Problem: Images when loaded into flex look blurred, distorted or poor quality.

Solution: Fixing the loaded images using smoothing .


Hi guys , i think we all come across the problem of loading images into flex and disappointed by the way they look blurred or distorted in flex. By default images loaded into flex are not smooth.
I have written a small function that can be called on "complete" event of image loader component and rest you dont need to worry it takes care all . Above picture shows how clean image looks after after applying smoothing code .It even works if the image is zoomed or resized later .


//Mxml starts here




//call this function from where ever you need Image Smoothing .Code by http://askmeflash.com
private function smoothImage(evt:Event):void{
var myBitmap:Bitmap = ((evt.target as Image).content as Bitmap);
if (myBitmap != null) {
myBitmap.smoothing = true;>
}
}
]]>








//mxml ends here


Source:

Saturday, February 12, 2011

Removing the theme color from the Flex TileList

I have been looking for the solution ... Finally found it while searching the net.
Saved alot of time ...

Here it goes:

There have been a number of occasions when the designs for a UI implements some kind of grid layout to display its items. This is fairly simple to implement in flex by utilising the Flex TileList component. However more often than not the List's item renderers are required to look after their own states. In this case the TileLists Indicators are no longer required.

I have found the easiest way to remove the TileLists indicators is to set the ThemeColor to the background color of whatever the List is being displayed on. But what happens if the background contains an image or has a transparency value?

To do this you need to override the TileLists drawSelectionIndicator and drawHighlightIndicator methods.

**************************************************************

override protected function drawSelectionIndicator(
indicator:Sprite, x:Number, y:Number,
width:Number, height:Number, color:uint,
itemRenderer:IListItemRenderer):void
{
/* we don't need to do anything in here*/
}
override protected function drawHighlightIndicator(
indicator:Sprite, x:Number, y:Number,
width:Number, height:Number, color:uint,
itemRenderer:IListItemRenderer):void
{
/* we don't need to do anything in here*/
}


*************************************************************

Notice that the body to the above methods are empty. This is because we don't want the indicators to draw anything behind the renderers when the state changes.

Now just don't forget to cater for this inside your TileList's item renderer else the user will get confused as to which item is selected and which item their mouse is over. We wouldn't want that would we :)





Thanks for the solution
source

Wednesday, December 1, 2010

How to Create Flex container components with Flash CS4

The Flex Component Kit for Flash is incredibly powerful and allows you to combine your Flash design/development skills with the power of the Flex framework.


SOURCE: http://www.webkitchen.be/2009/02/11/video-tutorial-create-flex-container-components-with-flash-cs4/

Tuesday, September 7, 2010

Flash : opensource API, librairies, resources

Here are my list of open source google code projects for the Flash Platform. This is what I have seen over time, please add if you feel I missed anything. Many of them mayn0t be useful, or may be discontinued. This is from my list of os projects

  1. adobe-air-util - Adobe AIR AS3 Utility classes, no much updates.
  2. appcorelibOpen Source Flex Application Core Library
  3. as3awss3lib – ActionScript 3.0 library for interacting with Amazon S3
  4. as3barcodelibAn Actionscript 3 barcode decoding library
  5. as3bloggerlibActionscript 3.0 Library for Blogger Data API
  6. as3cannonballDOM+HTML+CSS+Browser Library for ActionScript 3.0
  7. as3corelib

    ActionScript 3.0 library for several basic utilities.

  8. as3cryptoCryptography library for ActionScript 3, including partial TLS 1.0 support
  9. as3dsAS3 Data Structures For Game Developers
  10. as3ebaylibActionScript 3.0 API for eBay
  11. as3exchangelibAn ActionScript library for talking to Exchange servers.
  12. as3facebooklibActionScript 3.0 API for Facebook
  13. as3fedexlibActionScript 3.0 library for accessing FedEx APIs.
  14. as3flexdbAS3FlexDB project is a open source lib that allows Adobe Flex applications to connect to a MySQL server

  15. as3flickrlibActionScript 3.0 API for Flickr
  16. as3gamelibActionScript 3 Game Lib
  17. as3isolibActionScript 3 Isometric Library
  18. as3libActionScript 3.0 standard library project
  19. as3mathlibFlex/Actionscript Math Library
  20. as3matrixA powerful Matrix Library built in Actionscript 3.0
  21. as3mp3streamplayerA library that allows you to play MP3 streams
  22. as3nativealertlibAn AIR alert that appears in a native window
  23. as3notificationlibA notification framework written in AS3 for the Adobe Integrated Runtime (AIR)
  24. as3plsreaderAn PLS (Playlist) reader for Adobe AIR / Actionscript 3
  25. as3powncelibActionScript 3.0 Library for Pownce full V2.0 implementation
  26. as3preferenceslibAn AIR library for storing preferences
  27. as3-rpclibActionscript 3 RPC libraries for flash-remoting(amf0), xml-rpc, json-rpc
  28. as3scribdlibActionScript 3.0 API for Scribd
  29. as3soundeditorlibActionscript 3.0 library for sound playback, spectrum display, and cue point display
  30. as3syndicationlibActionScript 3.0 library for handling syndication feeds.
  31. as3webserviceOpen-source Webservice class implementation in AS3 for Flash CS3 IDE.
  32. as3xlsRead and write Excel files in Flex
  33. as3youtubelibActionScript 3.0 API for YouTube
  34. ascolladaactionscript library for parsing Collada files
  35. asmailerActionscript 3 Mail API.
  36. assqlActionscript 3 MySql Driver
  37. assqliteutilsActionScript 3 SQLite utils
  38. beziercurvecreate and edit bezier curves on the fly, easy syntax
  39. benstucki

    – His open source as3 codes…

  40. bigroomActionscript 3 Source Code from Big Room
  41. birdeyeInformation Visualization and Visual Analytics Library
  42. braemarOpensource lightweight MVC framework for Flash development
  43. bulk-loaderA library for managing multiple loadings with Actionscript 3 (AS3).
  44. csvlibcsv parser for actionscript 3
  45. degrafaDegrafa is a declarative graphics framework for Flex.
  46. di-as3Dependency injection / Inversion of control container for ActionScript 3, Flash 9, and Flex 2
  47. displaylistmonitorMonitor Flash Display List
  48. efflexDesigner Effects for Flex
  49. everythingflexairlibeverythingflexairlib Library
  50. facebook-as3AS3 API to access Facebook’s Platform API
  51. fastas3 – ActionScript 3.0 Library for fast and fun development. FastAS3 is inspired by jQuery which is a new type of JavaScript library.
  52. flexfilteringControls and Collections for AS3 and Flex that support fast filtering across large datasets

  53. flexircclientActionScript 3 based IRC library
  54. flexwiresWires UI control library for Adobe Flex
  55. flexlibOpen Source Flex Component Library. I use this one often.
  56. flexstuffFlex stuff – Libraries and subprojects
  57. flexsurverylibraryCreate survey for Flex Applications
  58. flint-particle-systemActionscript 3 Particle System
  59. flvplayerliteA lightweight FLV player
  60. flvrecorderRecord BitmapData to an FLV-encoded file (for Adobe AIR)
  61. foam-as32D Rigid Body Physics Engine
  62. googleas3apiAS3 library on Googles Ajax API, search the web using Google in your Flash/Flex/AIR application
  63. icodecodericon file decoder
  64. lastfm-as3Actionscript 3.0 API to access the Last.fm web services
  65. masapiFlash/Flex/AIR AS3 Framework for the massive loading (MassLoad)
  66. metaphileA library for reading and writing file metadata in ActionScript 3
  67. minimalcomps – MinimalComps are a set of minimal user interface components for use in ActionScript 3.0 based projects.
  68. open-zoomOpen Source Framework for Multi-Scale Images and Zoomable User Interfaces (ZUI)
  69. opentubeA Flex Based Open Source Video Sharing Application
  70. pdfutilA simple AS3 library based on AlivePDF.
  71. popforgeActionScript 3 code sandbox for various packages
  72. queueloader-as3QueueLoader Actionscript 3.0
  73. redherringA light duty HTTP proxy for AS3
  74. reflexutilrun-time debugger for adobe flex components
  75. snackrSnackr, an RSS feed ticker for Windows/Mac/Linux built with Adobe AIR and Flex – http://snackr.net
  76. splinklibraryAn actionscript 3 library to ease the daily work
  77. splinkresourceAn actionscript 3 resource loading framework
  78. swfinjavascript toolkit for flash developers
  79. swizframeworkBrutally simple micro-architecture for Rich Internet Application development with Adobe Flex
  80. uicomponents-as3Lightweight AS3 UI component library
  81. urlkitFlex library providing a rule-based URL parser/generator for deep linking

Some Unit Testing Frameworks for the platform:

  1. as3flexunitlibActionScript 3.0 framework for unit testing. Its now moved tohttp://opensource.adobe.com/wiki/display/flexunit/
  2. flex-mojosFlex-mojos: Maven 2 plugins for Flex
  3. flexmonkeyFlex UI Testing Tool
  4. flexcoverCode Coverage Tool for Flex and AIR applications.
  5. fxspyInspect, edit and monitor your Flex application’s components properties and styles.
  6. FlexUnit – as3flexunitlibActionScript 3.0 framework for unit testing.

Non – goole hosted libraries:

  1. Sandy 3d engine – http://www.flashsandy.org/
  2. CASALib – Open source code library for Flex and AS3 projects. Read my review here
  3. Liquid Components for Flash
  4. FZip – FZip is an Actionscript 3 class library to load, modify and
    create standard ZIP archives.
  5. AlivePDF – ActionScript 3 Open-Source PDF Library
  6. ASSQL – Asql is a library for direct connections with Mysql, suitable for Flash CS3, AIR and Flex
  7. APE – ActionScript Physics Engine
  8. as3Query – Actionscript port of jQuery

AMF Remoting implementations

  1. FlourineFX – for .NET
  2. AMFPHP - Now giving way to ZendAMF
  3. ZendAMF

    – From Wade Arnold who made AMFPHP. Further development will only be in ZendAMF, so AMFPHP is kind of abandoned.

  4. PyAMF – AMF for Python

Assistive technologies:

  1. swfobjectSWFObject is an easy-to-use and standards-friendly method to embed Flash content, which utilizes one small JavaScript file
  2. SWFAddress – Deep linking for flex apps.

Some more links:

  1. List of 31 Flex APIs, Libraries, and components and tools by Sean Moore
  2. List of 21 AS3 API’s by Sean Moore
  3. AS3 Libs from EverythingFlex.com

Bon surf !


source: http://www.exagone.com/?p=92

Freelance