Adobe Flex is a software development kit released by Adobe Systems for the development and deployment of cross-platform rich Internet applications based on the Adobe Flash platform. Flex applications can be written using Adobe Flex Builder or by using the freely available Flex compiler from Adobe.
Wednesday, July 27, 2011
Monday, July 25, 2011
Flex Component: PanScrollingCanvas
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
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
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
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
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
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
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
- adobe-air-util - Adobe AIR AS3 Utility classes, no much updates.
- appcorelib – Open Source Flex Application Core Library
- as3awss3lib – ActionScript 3.0 library for interacting with Amazon S3
- as3barcodelib – An Actionscript 3 barcode decoding library
- as3bloggerlib – Actionscript 3.0 Library for Blogger Data API
- as3cannonball – DOM+HTML+CSS+Browser Library for ActionScript 3.0
- as3corelib
- as3crypto – Cryptography library for ActionScript 3, including partial TLS 1.0 support
- as3ds – AS3 Data Structures For Game Developers
- as3ebaylib – ActionScript 3.0 API for eBay
- as3exchangelib – An ActionScript library for talking to Exchange servers.
- as3facebooklib – ActionScript 3.0 API for Facebook
- as3fedexlib – ActionScript 3.0 library for accessing FedEx APIs.
- as3flexdb – AS3FlexDB project is a open source lib that allows Adobe Flex applications to connect to a MySQL server
- as3flickrlib – ActionScript 3.0 API for Flickr
- as3gamelib – ActionScript 3 Game Lib
- as3isolib – ActionScript 3 Isometric Library
- as3lib – ActionScript 3.0 standard library project
- as3mathlib – Flex/Actionscript Math Library
- as3matrix – A powerful Matrix Library built in Actionscript 3.0
- as3mp3streamplayer – A library that allows you to play MP3 streams
- as3nativealertlib – An AIR alert that appears in a native window
- as3notificationlib – A notification framework written in AS3 for the Adobe Integrated Runtime (AIR)
- as3plsreader – An PLS (Playlist) reader for Adobe AIR / Actionscript 3
- as3powncelib – ActionScript 3.0 Library for Pownce full V2.0 implementation
- as3preferenceslib – An AIR library for storing preferences
- as3-rpclib – Actionscript 3 RPC libraries for flash-remoting(amf0), xml-rpc, json-rpc
- as3scribdlib – ActionScript 3.0 API for Scribd
- as3soundeditorlib – Actionscript 3.0 library for sound playback, spectrum display, and cue point display
- as3syndicationlib – ActionScript 3.0 library for handling syndication feeds.
- as3webservice – Open-source Webservice class implementation in AS3 for Flash CS3 IDE.
- as3xls – Read and write Excel files in Flex
- as3youtubelib – ActionScript 3.0 API for YouTube
- ascollada – actionscript library for parsing Collada files
- asmailer – Actionscript 3 Mail API.
- assql – Actionscript 3 MySql Driver
- assqliteutils – ActionScript 3 SQLite utils
- beziercurve – create and edit bezier curves on the fly, easy syntax
- benstucki
– His open source as3 codes…
- bigroom – Actionscript 3 Source Code from Big Room
- birdeye – Information Visualization and Visual Analytics Library
- braemar – Opensource lightweight MVC framework for Flash development
- bulk-loader – A library for managing multiple loadings with Actionscript 3 (AS3).
- csvlib – csv parser for actionscript 3
- degrafa – Degrafa is a declarative graphics framework for Flex.
- di-as3 – Dependency injection / Inversion of control container for ActionScript 3, Flash 9, and Flex 2
- displaylistmonitor – Monitor Flash Display List
- efflex – Designer Effects for Flex
- everythingflexairlib – everythingflexairlib Library
- facebook-as3 – AS3 API to access Facebook’s Platform API
- fastas3 – ActionScript 3.0 Library for fast and fun development. FastAS3 is inspired by jQuery which is a new type of JavaScript library.
- flexfiltering – Controls and Collections for AS3 and Flex that support fast filtering across large datasets
- flexircclient – ActionScript 3 based IRC library
- flexwires – Wires UI control library for Adobe Flex
- flexlib – Open Source Flex Component Library. I use this one often.
- flexstuff – Flex stuff – Libraries and subprojects
- flexsurverylibrary – Create survey for Flex Applications
- flint-particle-system – Actionscript 3 Particle System
- flvplayerlite – A lightweight FLV player
- flvrecorder – Record BitmapData to an FLV-encoded file (for Adobe AIR)
- foam-as3 – 2D Rigid Body Physics Engine
- googleas3api – AS3 library on Googles Ajax API, search the web using Google in your Flash/Flex/AIR application
- icodecoder – icon file decoder
- lastfm-as3 – Actionscript 3.0 API to access the Last.fm web services
- masapi – Flash/Flex/AIR AS3 Framework for the massive loading (MassLoad)
- metaphile – A library for reading and writing file metadata in ActionScript 3
- minimalcomps – MinimalComps are a set of minimal user interface components for use in ActionScript 3.0 based projects.
- open-zoom – Open Source Framework for Multi-Scale Images and Zoomable User Interfaces (ZUI)
- opentube – A Flex Based Open Source Video Sharing Application
- pdfutil – A simple AS3 library based on AlivePDF.
- popforge – ActionScript 3 code sandbox for various packages
- queueloader-as3 – QueueLoader Actionscript 3.0
- redherring – A light duty HTTP proxy for AS3
- reflexutil – run-time debugger for adobe flex components
- snackr – Snackr, an RSS feed ticker for Windows/Mac/Linux built with Adobe AIR and Flex – http://snackr.net
- splinklibrary – An actionscript 3 library to ease the daily work
- splinkresource – An actionscript 3 resource loading framework
- swfin – javascript toolkit for flash developers
- swizframework – Brutally simple micro-architecture for Rich Internet Application development with Adobe Flex
- uicomponents-as3 – Lightweight AS3 UI component library
- urlkit – Flex library providing a rule-based URL parser/generator for deep linking
Some Unit Testing Frameworks for the platform:
- as3flexunitlib – ActionScript 3.0 framework for unit testing. Its now moved tohttp://opensource.adobe.com/wiki/display/flexunit/
- flex-mojos – Flex-mojos: Maven 2 plugins for Flex
- flexmonkey – Flex UI Testing Tool
- flexcover – Code Coverage Tool for Flex and AIR applications.
- fxspy – Inspect, edit and monitor your Flex application’s components properties and styles.
- FlexUnit – as3flexunitlib – ActionScript 3.0 framework for unit testing.
Non – goole hosted libraries:
- Sandy 3d engine – http://www.flashsandy.org/
- CASALib – Open source code library for Flex and AS3 projects. Read my review here
- Liquid Components for Flash
- FZip – FZip is an Actionscript 3 class library to load, modify and
create standard ZIP archives. - AlivePDF – ActionScript 3 Open-Source PDF Library
- ASSQL – Asql is a library for direct connections with Mysql, suitable for Flash CS3, AIR and Flex
- APE – ActionScript Physics Engine
- as3Query – Actionscript port of jQuery
AMF Remoting implementations
- FlourineFX – for .NET
- AMFPHP - Now giving way to ZendAMF
- ZendAMF
– From Wade Arnold who made AMFPHP. Further development will only be in ZendAMF, so AMFPHP is kind of abandoned.
- PyAMF – AMF for Python
Assistive technologies:
- swfobject – SWFObject is an easy-to-use and standards-friendly method to embed Flash content, which utilizes one small JavaScript file
- SWFAddress – Deep linking for flex apps.
Some more links:
- List of 31 Flex APIs, Libraries, and components and tools by Sean Moore
- List of 21 AS3 API’s by Sean Moore
- AS3 Libs from EverythingFlex.com
Bon surf !
source: http://www.exagone.com/?p=92