Why is Apollo Alpha On Adobe Home Page?

At first I did not think much of seeing the Apollo alpha version being released last week. I have followed the Apollo progress since early last year by keeping tabs at Adobe labs and attending or and viewing the great on-line presentations.

But it took a day or so for the light to go on that this was an alpha version and it was on the Adobe home page!

Adobe has plenty of new marketing initiatives in play such as Adobe Creative Suite 3. So it does not appear they are in need of some attention.

Thus the importance they are placing on Apollo appears very significant to holler about it on the home page.

The alpha supported operating systems are:

Windows XP with Service Pack 2 (SP2)

Vista Home premium edition

Mac OSX 10.4 on PPC or Intel

Categories
Articles

Using External Style Sheets to Drive Flash Skins

One of my favorite items is to develop Flash components where the skins and even sizes are controlled by external data. Or as we say they are data driven.

One technique to deliver those parameters is via style sheets.

Flash allows you to create any style property you want. So you are not limited to just CSS standards. For example you can create a style named outerBorderGutterWidth. Flash will provide it nicely in the StyleSheet object.

I recently created a slide out menu component. It contains default skin and size parameters. Its data is dynamically driven as you might expect. But also its skin defaults are dynamically changeable both at design time and run time.

The component can open close by sliding up, right, down and left. The slide’s tween can do any of the easing in the Flash Tween component code such as bounce, elastic, regular, strong, back and none. As well the speed is a property of the component.

When the component is accessed on stage as a drag and drop or in code or in code, these properties can be set. On stage we use the Flash component parameters panel. In code we set these properties via the init parameter of attachMovieClip method. As well we can expose class properties for runtime access per design needs.

Great for the programmer! But can we give access to less technical user?

Part of the component properties is a style selector. As well as part of an overall site framework a style sheet is made available to component. If the style selector contains custom properties they override any created at instantiation either from attachMovie code or on the components parameters panel.For example a properties in the style sheet selectors may be

.testSelector{

backgroundColor:)xff0ff;
openDirection:up;
openCloseTweenEasing:Bounce;
openCloseTweenSeconds:1;
scrollBarVisiblity:always;

}

Thus the open direction is up, it uses a bounce easing for one second. I do like bounce. And the scroll bar is visible even when there are not enough items to merit it.
When the component is used in a movie, the selector as well the other properties can be set via the attachMovie init object property or in the component parameters panel.
In the component we might have these as initialization parameters for example:

[Inspectable(name=”style selector (ex:myStyleSelector)”)]
public var _styleSelector:String;
private var __styleSelector:String;

[Inspectable(name=”open position” enumeration=”Top,Left,Right,Bottom”, defaultValue=”Bottom”)]
public var _openPosition:String = “Bottom” ;
private var __openPosition:String ;

[Inspectable(name=”Open close animation easing”, enumeration = “Strong, Bounce, Elastic, Regular, Back, None”)]
public var _openCloseTweenEasing:String = “Regular”;
private var __openCloseTweenEasing:String;

In the constructor I copy the initialization properties to a private variable to prevent access after initialization. Thus they are write once unless they are exposed via a method.

The component then will choose the selector properties as an override to those in code or in the components properties panel. For example in the constructor or in an initialization function.

Also in the constructor on in an initialization method at style object is obtained from the framework loaded stylesheet and the properties are checked for overrides as follows:

__styleSheet = _global.styleManager.getStyleSheet();
__style = __styleSheet.getStyle(“.” + __styleSelector);
if (__style.openCloseTweenEasing != undefined)
{
__openCloseTweenEasing = __style.openCloseTweenEasing;
}
This gives a level of component customization in the system that does not require touching code. Generally users do not change style sheets, so a technician without programming or Flash skills may be required. However via content server interfaces users can get at style values in a code controlled environment. The content servers can generate style sheets.

At least with AS 2 and Flash 8 we sure do have a number of ways to initialize a component: attachMovie init parameter, Flash components parameters panels and  dynamically from data sources including style sheets. Still we have traditional methods such as passing them as a constructor argument list or creating a constructor argument class.

Categories
Articles

Application Software Online Predictions by Lon

I predict this year, 2007, will be the year computer users more and more test using online software like Goggle Office. This year will also be the year we will see more applications available at a beginners level. See Adobe Brings Video Editing Online. Beyond that, Adobe plans to take Photoshop online buzz is all about today.

Primarily the days of downloading the “free” or “trial” version are going to disappear. Rather you will work with a lite version for free but only online. This will allow software companies get potential customers for paid upgraded versions and other services as well as potential advertising revenues.

I believe next year, 2008, will be the year that marks a large paradigm shift to software companies offering software online and more so users accepting the use of that software as their standard.

Categories
Articles

Flex 2 Publishing with Source

You can publish the source code for a Flex application. Users can use the context menu and see a “View Source” menu choice if you include the viewSourceURL attribute for the Application class.

Ex:

When the context menu is selected the document with source is loaded into the primary web browser.

If you test this locally with the mxmlc compiler, you will encounter a security error so you
might want to compile with the -use-network=false switch temporarily so you can play.

More information can be found at: Publishing application source code sdfs

Categories
Articles

Local SWF Launch and Actionscript 9 UrlRequest and Flex Sdk 2 mxmlc

I was recently trying the URLRequest class in Actionscript 9 and hit this runtime error:

SecurityError: Error #2148: SWF file file:///C|/Documents%20and%20Settings/Lon/My%20Documents/Flash/Flash9/mxmlc/Loader/LoaderEx01.swf cannot access local resource file:///C|/Documents%20and%20Settings/Lon/My%20Documents/Flash/Flash9/mxmlc/Loader/PablumPicasso.jpg. Only local-with-filesystem and trusted local SWF files may access local resources.
at flash.display::Loader/get content()
at LoaderEx01/::imgLoaded()

The code example is was trying is:

package {
import flash.display.*;
import flash.net.URLRequest;
import flash.events.Event;
import flash.system.Security;
import flash.text.TextField;
public class LoaderEx01 extends Sprite {

//private var context:LoaderContext = new LoaderContext();
private var container:Sprite = new Sprite();
private var pictLdr:Loader = new Loader();
public function LoaderEx01()
{

var sandBoxType:String = String(Security.sandboxType);
var display_txt:TextField = new TextField();
display_txt.text = sandBoxType;
addChild(display_txt);
addChild(container);
var pictURL:String = "PablumPicasso.jpg"
var pictURLReq:URLRequest = new URLRequest(pictURL);
// To load swf locally and use Flex SDK 2binmxmlc add -use-network=false
// argument. The Flash 9 Alpha will allow swf to load locally and load image.
pictLdr.load(pictURLReq);
pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
}
private function imgLoaded(e:Event):void {
addChild(pictLdr.content);

}
}
}

I was using the Flex SDK 2 mxmlc compiler to create the swf file. Now it compiled perfectly. When I went to launch the swf from the local file server I got the security error message. However if I tried this in the Alpha version of the Flash 9 IDE it worked fine.

After a bit of research I found the option you need to set for mxmlc. It is -use-network=false. Once I added this switch to the command line the resulting swf could be loaded locally. I am using a Windows (DOS) batch file and so the resulting file appears as follows with the new switch:

"C:Program FilesAdobeFlex Builder 2Flex SDK 2binmxmlc" "-use-network=false" "C:Documents and SettingsLonMy DocumentsFlashFlash9mxmlcLoaderLoaderEx01.as"
Categories
Humor

What is Wrong With This Program?

The program or code is unintentionally doing exactly the wrong process perfectly most of the time.

Categories
Articles

It Is the Apple of My IEye

Is it a sign of technology changing? Apple Computer Inc. has dropped the word computer from its name. The company known for making the personal computer popular and claiming the better GUI interface with the Mac in now known as Apple Inc.

Cannot imagine being called Apple, Inc in the 1970’s when computing was perculating into social consciousness. What would we have thought? Was it a grower of apples, a distributer of apples, a canner of apples, what?

We would not even have winked a thought that it would have been a TV, music or a phone enterprise.

Of course we have the IPod and now the IPhone from Apple. These products embed computer technology. Embedding computer technology are predictions of the 1980’s and 1990’s – computers in everything from doorknobs to fingernails. As well science fiction writers play with stories of embedded intelligence evolving to where we do not control it or understand it (Spiderman 2 if you are looking for a more recent example).

I am not yet an IPod owner. I do see more folks running around with IPod patches (IPods strapped to the upper arm or other body parts). I suspect will not be waiting to be an IPhone owner unless there is a compelling business (money to be made) reason. I am likely to be a holdout for IShades – sun glasses that contain my phone, computer and internet access. Real cool idea for a modern Dick Tracy television series.

But why stop there, how about IEyes. Just pluck them out and place the biotech versions in your sockets. Bink once you see the world. Blink again you see I Love Lucy. Blink again you are Googling. Blink again you see spam. Blink again …

Well Ithink Ibetter Igo Inow. May many happy bits flow your Iway.

Lon Hosford

What Is Apollo?

Apollo is for developing desktop internet applications using mainstream technologies including, HTML, Javascript, Ajax, Flex and ActionScript.

Apollo is something akin to Java for the desktop. Apollo is a cross platform runtime aimed more at RIA (Rich Internet Applications) where as Java is more broad in its functionality.

There is a well established after market to run Flash desktop applications that can interface with the operating system. Zinc is an example of many products meeting a wide variety of needs. Because Flash is an internet downloaded program, its security sandbox prevents direct interaction with the operating system. The third party products provide a operating system wrapper the user approves for installation. The wrapper provides the same interface Flash has with the web browser. The web browser is a wrapper however also constrained by internet security expectations and as such cannot control the operating system.

Thus Apollo will knock a dent in the sluggish and IMHO boorish Java client and as well the dated cumbersome Microsoft desktop UI solutions.

Apollo runtime will be free. Adobe will likely provide a development tool to purchase. Or more likely it will be simply an extension of the Flex Builder tool.

The development link is at Adobe labs.