Monday, October 26, 2009

Adobe Flex: Expanding Control Box / Hiding-Showing Control Panel

Adobe Flex: Expanding Control Box / Hiding-Showing Control Panel



Wednesday, October 14, 2009

Using AlivePDF in an online Flex application

Using AlivePDF in an online Flex application


Tuesday, October 13, 2009

Adobe Flex - Sorting an ArrayColleciton by Date

Adobe Flex - Sorting an ArrayColleciton by Date

/**
* @params data:Array
* @return dataCollection:Array
**/
private function orderByPeriod(data:Array):Array
{
var dataCollection:ArrayCollection = new ArrayCollection(data);//Convert Array to ArrayCollection to perform sort function


var dataSortField:SortField = new SortField();
dataSortField.name = "period"; //Assign the sort field to the field that holds the date string


var numericDataSort:Sort = new Sort();
numericDataSort.fields = [dataSortField];
dataCollection.sort = numericDataSort;
dataCollection.refresh();
return dataCollection.toArray();
}


Bundled Deployment of Adobe AIR applications in Windows using NSIS (Nullsoft Scriptable Install System) - Single Step Method

Bundled Deployment of Adobe AIR applications in Windows using NSIS (Nullsoft Scriptable Install System) - Single Step Method

Using the script, we programmatically launch the bundled runtime installer that we created using Adobe AIR bundled runtime installer

Single Step Method

!define PRODUCT_NAME "SP 2009"
!define PRODUCT_VERSION "2.1.0"
!define PRODUCT_PUBLISHER "SP Group"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
Icon "C:\Inst\SP.ico"
OutFile "SPInstaller.exe"
Section -Prerequisites

SetOutPath "C:\Inst"
SetOverwrite ifnewer
installProgram:
MessageBox MB_YESNO "Install SP 2009?" /SD IDYES IDNO endInstall
File "SP 2009 Installer.exe"
ExecWait 'C:\Inst\SP 2009 Installer.exe'
endInstall:
SectionEnd

Bundled Deployment of Adobe AIR applications in Windows - Using the Adobe AIR bundled runtime installer

Bundled Deployment of Adobe AIR applications in Windows - Using the Adobe AIR bundled runtime installer

ADOBE® AIR™ 1.5 Runtime Redistribution Instructions -http://help.adobe.com/en_US/AIR/1.5/air_runtime_redist/air_runtime_redist.pdf

Adobe AIR Runtime Redistribution Instructions
Once you have an Adobe® AIR™ Runtime Distribution License Agreement with Adobe® Systems Incorporated, you
may redistribute the Adobe AIR installer and installer files.

Obtaining permission to redistribute the runtime
To obtain permission to redistribute Adobe AIR, read the Adobe AIR Runtime Distribution Agreement and apply for
a license: http://www.adobe.com/products/air/runtime_distribution1.html
Also, be sure to read the Adobe AIR FAQ page, which contains important information on the runtime distribution
and license terms: http://www.adobe.com/products/air/runtime_distribution_faq.html
Important: You may distribute Adobe AIR with your product only if you follow the Adobe AIR Runtime Distribution
License Agreement application proces



We start with the assumption that the Adobe AIR runtime has not been installed on the target machine that we intend on installing our Adobe AIR application.

The AIR application we intend to install is called 'SP.air'


We must therefore create a bundled installation package that must

Install the Adobe AIR runtime on the target machine if not previously installed before proceeding to install the AIR application.
Update the Adobe AIR runtime if the existing installation is an older version.
Update the AIR application if the existing installation is an older version.
Install the AIR application with a prerequisite that the Adobe AIR runtime is installed.


This article shows us three different ways to go about creating a “windows based” bundled installation package for an AIR application.

Using the Adobe AIR bundled runtime installer

“”

Step 1: Download the Adobe AIR bundled runtime installer from the download site.
( Mac: DMG file, Win: ZIP file)

Step 2: Extract the contents of the file to a bundled runtime installer directory
e.g. C:\Installer\

Step 3: Rename the Adobe AIR installer to match the AIR application name.
e.g. Adobe AIR Installer.exe is changed to “SPInstaller.exe”

Step 4: Add the configuration file '.airinstall.cfg' to the bundled runtime installer directory.
e.g. C:\Installer\.airinstall.cfg

Step 5: Edit the airinstall.cfg to include the relative path to the AIR file to be installed
e.g. if the AIR file is located in C:\Installer\AirApp\SP.air,
we include the path “AirApp/SP.air” in the .airinstall.cfg file

The contents of the bundled runtime installer directory can now be deployed on a CD, DVD, USB, or DMG. Double clicking the renamed installer file will launch the bundled runtime installer.


We can only install one application at a time.

Thursday, October 8, 2009

Bundled Deployment of Adobe AIR applications in- Windows using NSIS (Nullsoft Scriptable Install System) - Two Step Method

“ Nullsoft Scriptable Install System (NSIS) is a script-driven Windows installation system with minimal overhead backed by Nullsoft, the creators of Winamp. NSIS has risen to popularity as a widely used alternative to commercial and proprietary products like InstallShield.
NSIS is released under a combination of free software licenses, primarily the zlib license, thus making NSIS free software “ - wikipedia.org

There are two approaches that we can take.

Bundled Deployment of Adobe AIR applications in Windows using NSIS (Nullsoft Scriptable Install System)
Two Step Method

1.Using the script, we programmatically detect from the registry whether Adobe AIR runtime has been installed.
2.Installs the Adobe runtime if not previously installed and then install the


!define PRODUCT_NAME "My Application 2009"
!define PRODUCT_VERSION "2.1.0"
!define PRODUCT_PUBLISHER "My Group Pty Ltd"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
Icon "C:\InstallFiles\MyAppIcon.ico"
OutFile "MyAppInstaller.exe"
Section -Prerequisites

SetOutPath "C:\InstallFiles"
SetOverwrite ifnewer
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Adobe AIR" "DisplayVersion"
IfErrors notinst
Goto installProgram
notinst:
MessageBox MB_YESNO "Install Adobe AIR Runtime?" /SD IDYES IDNO endInstall
File "AdobeAIRInstaller.exe"
ExecWait "C:\InstallFiles\AdobeAIRInstaller.exe"
Goto installProgram

installProgram:
MessageBox MB_YESNO "Install My Program?" /SD IDYES IDNO endInstall
File "MyApp.air"
ExecWait '$PROGRAMFILES\Common Files\Adobe AIR\Versions\1.0\Resources\airappinstaller.exe /C:\InstallFiles\MyApp.air'
endInstall:
SectionEnd