Flex : Cotainer class – backgroundAttachment

Note : Same post as previous one.


Today, I come to know another one Gem of Flex.

A need arise in my one project, while my development,

I have to create same functionality as done in HTML.

i.e. HTML – Body tag we provide backGround image with size ” fixed “.

<body style=”background:url(images/background.png) fixed”>

So, when ever we scroll the contents,

the background image will not be scrolling, only contents will scroll.

Same type functionality, I need to achieve in flex.

So I dwell deep into Flex frame work and got one more Pearl…!!! Oh, that’s consistent.

That’s why I like flex more than oteher tech.

This time, the pearl is, style property : backgroundAttachment

The ” backgroundAttachment ” is of mx.core.Container class style property.

Continue reading

Flex Video Tutorials


Be happy, Adobe has announced an entire week for Flex Video Tutorials.

There are some exercises too given, to dirty your hands with and to brighten your skills.

Initially first Three days videos are listed. Schedule for other days will be declared later on.

So, Enjoy Flexing… 🙂

Mayur Rami

Solve Flex Bugs and get Flex Books : Amazing

Flex is really going Innovative ways.

Now you can be a, Flex 3 Contributor.  Solve 3 Bugs from Flex Bugs list JIRA and you will get a Flex Book of your wish from Amazon by Adobe Flex Team. Isn’t it amazing…!!

This is rally a very innovative way to make community more aware and to understand the details of the SDK of Flex 3 (Flex frame work) with ActionScrpt 3, as well as AIR.

Even you can get MAX 2008 registration.

For the first two contributors to have 10 patches committed, we’ll pay for your MAX 2008 registration (any region).

One more thing which like, too is :

Incentive Program Rules (subject to adjustment at any time)

  • You must follow our Coding Conventions
  • You must be a citizen of Earth (no proof required)
  • You must be helpful in providing book options in your wish list that won’t get the Flex team fired if we buy it
  • You must not deluge the system with silly bugs in an attempt to provide fixes

Flex is in real mean an Open Source.

Enjoy flexing . . .

Mayur Rami 🙂

Close PopUps, TitleWindow, Panel etc by clicking the modal in Flex

I got one query, how to close Popups ( TitleWindow, Panel etc. ) just by clicking on Modal.

A functionality which we found in HTML / Javascript based modal (with lightbox ), some thing we can see now a days in Yahoo Mails, when we see images attached in our mails.

See, Modal is actually a FlexSprite instance in Flex frame work (same as well for AIR ). The Modal is created by SystemManager in Flex.

So, if we want to just close ( or to perform any business logic ), it is very easy, just listen for an Event.

The event is : ‘ mouseDownOutside ‘ .
A simple example is as below…
There are two files : 1) ModalTitleWindow.mxml 2) ModalClose.mxml

Continue reading

AIR SDK settings for ADT & ADL

We all know that AIR based applications run in two different flavors

  1. swf
  2. html

As a flex developer, I generally use FlexBuilder IDE to create Flex based AIR applications.
But few days back I did some experiment and try to develop an AIR base application through
pure HTML and JavaScript combination.

Though Flex and Acitonscript are my pet technologies but this time I tried a different combination.

To run AIR Applications two command line tools available.

  1. adt
  2. adl

The ADT tool is used to create packaged Installer of application ( which need to be installed first to work on application. ) and

The ADL tool is used to launch AIR application without installing it. ( This tool is mainly useful while developing the application. )

So, will have to configure these tools first and it’s very simple ( It remembers me of my initial days as a Java Programmer, in those day, we had to configure java / javac commads for compilation and run ). Let’s go…

Note : The steps are for Windows platform.

  1. You can download from AIR SDK or here
  2. Unzip the .zip file and save it on your disk. ( we will refer this path as [SDK_PATH] e.g. c:\airsdk_v1).
  3. The point is, you should have at least the following three directories: /bin, /lib and /runtime. (By default they are in same .zip file and you need not to copy/paste them at one place.

But for, those user who, already, have Flex 3 SDK and if they want to set this — without download the separate .zip file. Then just copy these three directories i.e. ‘bin’, ‘ lib’ and ‘runtime’ copy and paste them in a one single directory so as they maintain their corresponding relative path.

) The ADL and ADT command-line tools are located in the bin directory.

  1. Now, we have to just set the system ‘ PATH ‘ to execute the commandline application from anywhere on the system
    1. Open the System Properties dialog box and click the Advanced tab. You can find this in the System
      settings in the Control Panel.
    2. Click the Environment Variables button.
    3. Select the PATH entry and then click the Edit button. Add the path to the bin directory to the end of the
      current variable value, separating it from previous values with a semicolon:
      ; [SDK_PATH]/bin
    4. Click OK to close the panels.

To test the installation, open a new Windows command prompt (Start -> Run -> command), and type adt.

and if everything is correctly done you will get outcome like :

adt -package SIGNING_OPTIONS <air-file> <app-desc> FILE_ARGS
adt -prepare <airi-file> <app-desc> FILE_ARGS
adt -sign SIGNING_OPTIONS <airi-file> <air-file>
adt -checkstore SIGNING_OPTIONS
adt -certificate -cn <name> ( -ou <org-unit> )?
( -o <org-name> )? ( -c <country> )?
<key-type> <pfx-file> <password>
adt -help

SIGNING_OPTIONS: -storetype <type> ( -keystore <store> )?
( -storepass <pass> )? ( -keypass <pass> )? ( -providerName
<name> )? ( -tsa <url> )?
FILE_ARGS: <fileOrDir>* (( -C <dir> <fileOrDir>+ ) |
( -e <file> <path> ))* -C dir

Enjoy AIR 🙂

Flex and Actionscript 3 coding conventions

It is nice to have a standardization on any product. Same rule applies to softwares also.

Recently, Adobe has given a Coding convention guide line.

Go and check at Flex SDK coding conventions and best practices.

From the perspectives of a software developer it is even better to work with such kind of standards, especially when we are working in team and that to also in a ” on shore – off shore ” fashion.

One request to Flex team at Adobe once this document gets fully complete, please, release its PDF version too.

Happy Flexing. 🙂

Mayur Rami

Alert and Popup modal, transparancy, color and blur changes

Today, I am going to post some thing on Popup custom settings. We can change some properties like Popup modal, transparency, color and Blur.

These properties are of style. This has been a very long avaited request from my designer friends. (especially by : Mandu)

In flex ‘<Application />’ tag has mainly four attributes related to modal properties of pop-ups.

  1. modalTransparency
  2. modalTransparencyBlur
  3. modalTransparencyColor
  4. modalTransparencyDuration

Their default values are “0.5”, “3”, “0xDDDDDD” and “100” respectively. Changes to these properties are applicable to entire application level.

But, we can do same changes to separate components too. ( As I have shown in my example.)

Let me show… in image (1) We can see the default Alert / Popup window of flex

Noraml flex alert / popup customized Flex popup / alert

Continue reading