Flex Alert Default Button (ok) disable

Flex Alert default “OK” button disable

Solution :

var alert:Alert=Alert.show(“RIA Enginner “);


Flex Alert window text selection disable

How to disable in Flex Alert window text/content?


var alert:Alert=Alert.show(“V.Kumar  Chennai”);

The Architecture of a Rich Internet Application

Whether you are using Flex, Ajax, Silverlight, JavaFx, or some other RIA technology, the basic architecture is going to be pretty similar… In most cases you will typically have have a stateful client application and a separate services layer on the backend. It is important to understand this differentiation, and to understand that this plays a huge role in how you design and build your applications.

RIA lends itself more to client-server development, rather than tradition web development where state is maintained on the server in application or session scope. The client thus knows about itself, and types of data it is requesting. It will request only the data it needs from the server, and no extra markup. This often leads to a cleaner services layer and less-complicated server requests, even in some cases a reduced overall load on the server.

It is also important to understand the sub-architectures within the overall architecture of the application. In the big picture, you have the client communicating with the server through a services layer. Whether you are using AMF remoting, XML over HTTP, JSON, or SOAP does not necessarily matter. There are pros and cons to each, which I may discuss at length in the future, but for now I’m focusing on the architecture itself.

Each component of the larger architecture has an architecture of its own. You may hear people discussing the use of MVC in their applications, but the interpretation of MVC depends on who is doing the talking.

Model-View-Controller (MVC) is a software architectural pattern where an application is broken into separate layers for the data model, the user interface (view), and the business logic. The logic, model, and views are decoupled, and communicate through an intermediary controller. This pattern enables both abstraction of logic, and reuse of code/components throughout the application. You can read more about MVC here.

In traditional web development, there was basically a singular MVC. Where the page requests were handled by a controller, which delegates how a page is processed and how the how the data is inserted into the view (or how data is pushed into the model).

In the RIA world, you really have two layers of MVC. There is an MVC inside of the client application itself, and an MVC in the backend services as well. Not every application uses a formal MVC or a full blown framework for handling the client and services, but each side typically has at least a rudimentary MVC-type of functionality.

The MVC on the client manages the interaction between you and the user interface. You invoke commands, update views, load data, etc… The client MVC maintains the state of the application, handles all requests to the server for data, and controls how the data is presented in the view.

The MVC on the server handles requests from the client. The services-layer MVC processes the requests from the client application, and delegates actions on the server. This could be saving data in a database, updating the file system, some kind of analytical processing, or returning chunks of data to the server. The big differentiation here is that there is no user interface. Instead of a user interface, the view would be the format of the data the is being returned to the client application. In this case the view would determine the result format (JSON, XML, etc…). Another benefit of a differentiated service layer is that you can already have the infrastructure built to create a public API on top of you services logic, if you have the need (or desire) to maintain one.

There is no definitive choice of technology for RIA. You can do lots of cool things with lots of different technologies. Back ends can be written in Java, ColdFusion, PHP, Rails, .NET, etc… On the client side, there are established MVC frameworks for Flex/Actionscript and AJAX, some emerging ones for Silverlight, and adapted Java frameworks for JavaFX. The determination of both the back-end and the front-end should be determined by the needs and capabilities of your application, and also your existing infrastructure.

AS3 Full Browser Background Image

Fairly simple ActionScript 3 implementation of a full browser background image.

Class Features

Supports minimum scale size, which if set, will clip rather than scale the image if the stage is resized below this point
Dispatches a Loaded and Loading Event
Supports a removal event

View Example
Here is an example; http://www.noponies.com/dev/as3_fullbrowser/

Source Files
Here are the relevant source file; ActionScript 3 Full Browser Background Files

Class uses tweenLite for alpha fade. This is one line, and is easy to remove.

Adobe AIR security.

Today marks the official release of Adobe AIR, a platform for developing desktop applications using web-based technologies. Let’s see what this tool offers and what security implications it carries.

Adobe AIR (once known as Adobe Apollo) is a run-time environment that bundles several web-enabling technologies and makes them available on the desktop. According to Adobe’s Mike Chambers, Adobe AIR “leverages a number of open source technologies,” including:

* Tamarin – implements JavaScript/ECMAScript, used in Firefox, Flash
* SQLite – lightweight database engine
* WebKit – renders HTML, used by Konqueror browser in KDE and Safari

Adobe AIR allows developers who know how to write traditional web-based applications to use their skills (HTML, AJAX, Flash, etc.) to write local desktop applications. Applications built using Adobe AIR include AOL Top 100 Videos player, eBay Desktop, and NASDAQ Market Replay.

ISC reader Richard Gurley emailed us a question regarding security concerns associated with the this powerful development platform. Two categories of threat vectors come to mind:

* A malicious Adobe AIR application may act as a trojan and do “bad things” to the victim’s local system.
* A web-style vulnerability (XSS, etc.) in an Adobe AIR application may allow an attacker to target the application’s data or the victim’s local system.

Desktop-Specific Threats of Adobe AIR Applications

The set of first threat vectors is similar across desktop applications that run locally. Adobe implemented sandboxing to limit some actions a local Adobe AIR application. Adobe’s documentation makes it clear that the sandboxes are not meant to mimic the rigorous restrictions of a web browser’s sandbox. Adobe AIR FAQ points out that “applications deployed on Adobe AIR have powerful desktop capabilities and access to local data.”

Adobe AIR applications need to be digitally signed, to assist the end-user in determining whether to trust the application’s author. However, the certificates can be self-signed, and many users will ignore the trust warnings and run even those applications that come from untrusted sources. This is not a new issue, and it is not unique to Adobe AIR.

Ron Schmelzer, an analyst at ZapThink, expressed his concerns with the ability of existing anti-virus tools to protect against rogue Adobe AIR applications in an October 2, 2007, InfoWorld article:

” ‘The current generation of spyware, virus, and malware [detection] products have no visibility into running AIR programs,’ Schmelzer wrote in an e-mail. ‘As such, there is a high possibility for malicious AIR applications — which are no longer security-restricted to the browser sandbox and are free to manipulate local machines — to spread into the wild.’ “

I am more optimistic about the ability of existing anti-virus suites to detect improper actions of an Adobe AIR application through behavioral techniques that observe any local programs. Such techniques involve checking for suspicious registry, file system, and network actions that a malicious application would exhibit regardless of the framework within it operates. However, since I have not experimented with Adobe AIR applications, this is purely a hypothetical assessment. (Perhaps those more familiar with inner-workings of anti-virus tools or with Adobe AIR applications would like to comment?)

Web-Specific Threats of Adobe AIR Applications

The other, and perhaps more significant set of threats to consider is tied to those of any web applications. Vulnerabilities in a web application could allow an attacker to launch attacks based on Cross-Site Scripting (XSS), SQL injection, local link injection, and other techniques associated with traditional web applications.

The most interesting security repercussion of a platform such as Adobe AIR is that it merges traditional web application techniques with the more-permissive security models of local applications. Consider a hypothetical example where an Adobe AIR application allows the user to open and execute a local file. An XSS-style vulnerability in an application could allow a remote attacker to inject a malicious JavaScript into the application that would attempt to execute a local program of the attacker’s choice. This is more difficult to execute when the script runs within the confines of a web browser, than if the script runs within a more permissive sandbox of Adobe AIR.

Adobe’s Lucas Adamski wrote an excellent article describing the Adobe AIR security model. In his write-up, Lucas describes the two sandboxes implemented by Adobe AIR and outlines the security risks that the developers of Adobe AIR applications need to consider. He also points to the security documentation Adobe wrote to assist developers in addressing some of these challenges. Lucas highlights the need for developers to follow Adobe’s security recommendations to create resilient applications:

” However, the privileges inherent in a full desktop application mean the developer can sometimes find ways around these restrictions. The reality is that doing so will almost certainly introduce a large amount of security risk into the application and for the end users of the application. Thus Adobe strongly recommends that developers stay within the restrictions placed by the AIR security model, and carefully consider the cost of implementing rigorous security mitigations for bypassing them. In most cases the development cost of these mitigations will significantly exceed the cost of finding an alternative solution that stays within the bounds of the security model. “

Undoubtedly, many developers will be unaware of Adobe AIR security best practices or will knowingly take shortcuts that expose end-users to attacks. Will our destkop lock-down practices and anti-virus tools compensate for such conditions? I hope the answer is “yes,” but I suppose only time will tell.

Mac OS X 10.5.2 Special Report: Adobe application slowness, fixes

Various Adobe applications may be extremely slow to launch after the Mac OS X 10.5.2 update. Clearing font caches may resolve the issue.

MacFixIt reader Jeffrey HIldt writes:

“Using Insidersoftware’s Font Smasher (the co. that makes Font Agent Pro, my font mgmt. choice) I cleared the font caches of my system and Adobe apps and that seems to have done the trick. At least Ps is staying open without going into a Program Error loop.

You can use Smasher, like Jeffrey, or Linotype’s FontExplorer X (in the application, choose Tools > Clean System Font Caches and Tools > Clean Application Font Caches).

Actionscript 3 class zip library FZip

FZip is a cute little Actionscript 3 class library,that enables you to load standard ZIP archives and extract contained files while the archive is still loading,modifying,and creating standard ZIP archives. It parses ZIP archives progressively, allowing access to contained files while the archive is loading.

To download source: http://ntt.cc/2008/01/19/actionscript-class-library-fzip.html

Software converts images into PDF in a snap

Snapter Ice (snapter.atiz.com/) converts specific types of images taken with a digital camera and produces the same kind of results as if you scanned the subject matter with a flatbed scanner.

To find out your IP address

In below URL, you can find  your public and private IP-Address.  Tools to analyze, optimize and secure your internet connection.


Flex Removing Duplicates from an ArrayCollection [Filter function]

I needed a Filter function to remove duplicate items from an Array Collection so I thought I’d do a quick post to share the code.

< ![CDATA[
import mx.collections.ArrayCollection;

private var tempObj:Object = {};

private var filterBtnCol:ArrayCollection = new ArrayCollection(
[{label:”Frank Black”}, {label:”NOFX”}
, {label:”Jawbreaker”}, {label:”Frank Black”}, {label:”NOFX”}, {label:”Jawbreaker”}
, {label:”Frank Black”}, {label:”NOFX”}, {label:”Jawbreaker”}]

private function filterCollection():void {
// assign the filter function
filterBtnCol.filterFunction = deDupe;
//refresh the collection

private function deDupe(item:Object):Boolean {
// the return value
var retVal:Boolean = false;
// check the items in the itemObj Ojbect to see if it contains the value being tested
if (!tempObj.hasOwnProperty(item.label)) {
// if not found add the item to the object
tempObj[item.label] = item;
retVal = true;

return retVal;
// or if you want to feel like a total bad ass and use only one line of code, use a tertiary statement 😉
// return (tempObj.hasOwnProperty(item.label) ? false : tempObj[item.label] = item && true);

« Older entries