Browsing articles in "AIR"
Mar
10

Video: AIR 2.0 NativeProcess Example

By Joseph Labrecque  //  AIR  //  2 Comments

I’ve been looking for an opportunity to take advantage of the new flash.desktop.NativeProcess class within AIR 2.0 and was fortunate enough to have a quick project fall into my lap early this week that would serve as the perfect testing ground.

If you aren’t familiar with NativeProcess, it basically gives you the ability to interact directly with just about any process running on the host operating system. You can pass in any number of arguments into the program being invoked, and can even intercept messages being transmitted in response to your invocation.

The project basically involves building a custom interface upon the excellent HandBrake CLI for enabling server side directory polling along with custom transcoding presets complete with individual output destinations.

The following video is simply an overview of what is capable with AIR 2.0 – I hope this will be the first of many as I built this project to completion, especially as this is such an exciting (and powerful!) addition to the Flash Platform.

Feb
8

Help Improve Flash 10.1 and AIR 2.0*

Okay- Adobe has a great chance to show the world how solid Flash Player and AIR engineering can be. Like any development or engineering team, they have limited resources and need help from the outside world to make these the best releases ever. Tired of “buggy” Flash and “lazy” engineers ruining your browsing experience?** Here are some things you can do to actually contribute instead of flaming Adobe:

  • Download and install Flash Player 10.1 Beta 2 and AIR 2.0 Beta 2
  • Test the new beta runtimes with your content and applications.
  • Log bugs at bugs.adobe.com. Engineering teams use your bug reports to reproduce errors and improve the runtime quality.
  • Tweet: “Improve Flash 10.1 & AIR 2.0 via Beta 2 http://bit.ly/cty7Nm READ & RT #Flash #AIR #QUALITY”

If you’re a developer, test your current applications. If you are a user, give the runtimes a spin and see if anything goes bad. We all have a great opportunity to contribute to the continued success of these two runtimes- let’s all put in some effort and make a difference!

* This is a response to Ted Patrick’s post.
** I do not believe that Flash Player is buggy or that Adobe engineers are at all lazy.

Dec
17

Adobe AIR: Preventing Users from Closing the App

By Joseph Labrecque  //  AIR  //  5 Comments

One of the really cool additions to Adobe AIR 1.5.2 was the ability to invoke preventDefault() upon a FullScreenEvent when using StageDisplayState.FULL_SCREEN_INTERACTIVE. I always had a workaround for Windows but my method would always crash the app when run on a Mac. The ability to go full screen and lock that down is essential to kiosk-type applications. This does not prevent a user from closing out the app in some other way, however.

While working on an AIR-based kiosk project this week, I was given the request to prevent COMMAND+Q from closing the application on a Mac. They really wanted this thing locked down to the point where the only way to get out of the app would be to enter some random key combination. Took a little bit of digging around to figure out how to both prevent the default closing action but still allow the app to close in the event that the correct key commands were entered. I share this here as I can see others having this same need.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
					   xmlns:s="library://ns.adobe.com/flex/spark" 
					   xmlns:mx="library://ns.adobe.com/flex/mx"
					   width="400" height="400" applicationComplete="init()">
	<fx:Declarations>
		<!-- Place non-visual elements (e.g., services, value objects) here -->
	</fx:Declarations>
	<fx:Script>
		<![CDATA[
			import mx.events.CloseEvent;
			import flash.events.Event;
			import flash.display.StageDisplayState;
			import flash.events.KeyboardEvent;
			import flash.events.FullScreenEvent;
 
			private var commandEntered:Boolean;
 
			private function init():void {
				this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
				this.addEventListener(Event.CLOSING, appClosing, false, 0, true);
				stage.addEventListener(KeyboardEvent.KEY_DOWN, killApp, false, 0, true);
				stage.addEventListener(FullScreenEvent.FULL_SCREEN, displayStateChanged, false, 0, true);
			}
			private function displayStateChanged(e:FullScreenEvent):void {
				e.preventDefault();
			}
			private function killApp(e:KeyboardEvent):void {
				e.preventDefault();
				if(e.keyCode == 70 && e.ctrlKey && e.altKey){
					commandEntered = true;
					this.close();
				}else{
					commandEntered = false;
				}
			}
			private function appClosing(e:Event):void {
				if(!commandEntered){
					e.preventDefault();
				}
			}
		]]>
	</fx:Script>
	<s:Label text="CTRL + ALT + f" horizontalCenter="0" verticalCenter="0" fontWeight="bold" fontSize="32"/>
</s:WindowedApplication>

UPDATE: If you have a stateful application, you may want to consider the following information, as it may be disruptive in handling these events properly: http://beingwicked.com/development/flex-initialize-and-the-hassles-of-changing-state/

Nov
29

VidLoop 1.4.18 is out on Adobe AIR Marketplace

Just like the sign says… VidLoop 1.4.18 is out on Adobe AIR Marketplace.

It’s been a year since I released the initial version (built over last Thanksgiving holiday) and have been working on some revisions in the past few weeks with the intention of getting this new version out as an anniversary marking. Looks like I made it!

VidLoop

The new version adds the following features:

  • You can now present SWF files within a loop
  • VidLoop automatically rescans directories at startup and shutdown
  • You can choose to have a loop start automatically
  • I rewrote the transitions mechanism
  • Fixed some directory parsing bugs and other junk

I’m not claiming the thing is perfect or even rock-solid, but after receiving feature requests and thanks from many people regarding the usefulness of this little app… I think it deserves some continued support.

Aug
7

LiveStreamer AIR Application

I wrote a new AIR app called LiveStreamer available now via the Adobe AIR Marketplace.

This started as a simple mechanism to display a live RTMP stream from Flash Media Server to a client machine and related projection system. So… not for broadcast over the web- just sending a live stream from one physical location to another.

While developing the application, I came across the need to test an RTMP stream and it was so simple using this app that I decided to expand it. In the current version (0.9.0), it will accept RTMP and HTTP streams- just type in the URL and you can easily test it in order to verify that it is correct before trying to publish anything on a website or whatnot. You can also use it as a fullscreen projection or display mechanism as was originally intended.

If you have some FLVs or MP4s or whatnot on your local machine- you can just drag those into the app to watch them. I’m thinking about adding some playback controls and other options a bit later.

LiveStreamer

Application for display of video streams via RTMP, HTTP, or local filesystem. Just drag in a file or enter a stream address and away we go!

At the University of Denver, we have built a good number of AIR applications at this point. Some are internal data management tools, others are full, complex, private applications such as the VPS Projection system, and then we have small utility apps like this which others may also find some use for. These we make available to others free of charge as part of our community outreach.

About this Website

This is the website of Joseph Labrecque: Senior Multimedia Application Developer for the University of Denver and Owner of Fractured Vision Media, LLC. Joseph is an Adobe Higher Education Leader.

Adobe Higher Education Leader

Adobe Certified

Aggregated by AXNA

Follow me on Twitter!