Category Archives: Flash

Windows 8 “Modern UI” Flash Player BLACK-list

So… remember back in September of 2011 when Microsoft declared that Flash Player and other “plugins” would be barred from Internet Explorer in the Modern UI version of the browser?

Remember in May of 2012 when Microsoft relented and in place of an all-out ban, devised a troublesome whitelist which developers had to submit requests to Microsoft to be included upon? What a mess, right?

Well, starting tomorrow – the whitelist becomes a blacklist – essentially freeing up almost all Flash Player content on the web when viewed in Internet Explorer 10 on all platforms which support IE10.

Excellent news!

Cootie Crush! Starling game for Android

My children are absolutely in love with this game (and so am I)!

Crush swarms of cooties beneath your fingertips. Clear them all before time runs out and advance to the next challenge. Cootie crushing fun for everyone!

Casual game geared toward children – but challenging for adults as well. Beat your high score and race the clock!


Get it on Google Play

This game was developed in Starling as part of the One Game a Month effort.
logo

Even though I’m monetizing the game via the Google Play store – I am still making the source code available through my GitHub account: https://github.com/josephlabrecque/CootieCrush.

Flash Runtimes Roadmap Updated for 2013

Adobe has updated the Flash Runtimes Roadmap whitepaper for the new year and there are some significant changes from previous iterations. Some of this is good, some questionable… and some bad:

  • New documentation of the SWF file format has been made available (good)
  • XC APIs are no longer designated as Premium Features (good)
  • New info on “Folsom” and “Geary” (good)
  • ActionScript “Next” development has been cancelled (questionable)
  • Flash Player “Next” development has been cancelled (questionable)
  • AIR for Windows 8 “Modern UI” has been cancelled (bad)
  • Web-based VM work hinted at (good)

On top of these announcements, Adobe has recently submitted the RTMFP p2p protocol for consideration as an open web standard and has been loudly trumpeting their gaming initiative and has increased funding toward the Away Foundation who are building AIR-based tooling for the Away3D framework. All of this news is very good and welcome.

Let’s examine some snippets from the roadmap:

Adobe will focus its future Flash Player development on top of the existing Flash Player architecture and virtual machine, and not on a completely new virtual machine and architecture (Flash Player “Next”) as was previously planned.

In general, I’m disappointed that the new runtimes and language are not happening… even though I do understand the reasoning for it. It would certainly be disruptive (though some would argue that disruption is what is needed), but this initiative demonstrated that Adobe was invested in the long term. This is now somewhat questionable. 

Adobe AIR is available and supported for Windows 8 Desktop on x86-based computers. Adobe currently has no plans to support Adobe AIR for Windows 8 Modern UI applications.

In my opinion, lack of support for the Windows “Modern UI” is a huge gap in the cross-platform story of AIR – perhaps even larger than the current Linux-sized hole we are now dealing with. The stated reasoning behind killing off Flash Player for Android was to focus on mobile AIR. Ooops.

Adobe plans to continue its next-generation virtual machine and language work as part of the larger web community doing such work on web-based virtual machines.

This is interesting. Really interesting. Does this mean Adobe envisions taking what has been done for the stillborn Flash VM and writing some sort of JavaScript-based virtual machine that is truly cross-platform with some of the advantages of AS3/Flash? Such an initiative could have tremendous possibilities if this is the case. Adobe is keeping tight-lipped about these plans… but hopefully we’ll hear something by MAX.

There is a lot more to the roadmap. I simply examined the bits I have the most concern/interest about in this post. I suggest that everyone go over and read it for themselves if any of this is of interest.

For those interested in public discussion, there is a very active one going on over on Google Plus with contributions from Adobe employees and the community. Join in.

Notes around Starling and the Display List

I learned a couple of neat things while working on TelemetryEASY that have to do with some limitations of Starling and also communication between Starling and the traditional display list. You might wonder… why bother using Stage3D frameworks at all for a simple utility app? Mostly to increase my familiarity with Starling and especially to discover some of the little trouble points I’m writing about here, along with some solutions.

Problem #1: NativeDragManager

TelemtryEASY allows for a user to drag and drop files onto the utility app from the desktop or file system. Using AIR, this is pretty easy using flash.desktop.NativeDragManager. The problem comes into play when you are using a Stage3D rendering view like Starling though; because when using the acceptDragDrop() method, you must pass in an object which extends flash.display.InteractiveObject… and there seems to be no equivalent for Starling.

So what I ended up doing was mixing the display list and Starling and using a normal Flash Sprite to accept the drag and drop procedure. Now, you are not supposed to mix Stage3D and the display list for performance reasons… but nothing much is really going on here – so it is  suitable concession.

private function addedToStage(e:Event):void
{
	this.removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
	
	_dragTarget = new Sprite();
	_dragTarget.graphics.beginFill(0x00000, 0);
	_dragTarget.graphics.drawRect(0,0,stage.stageWidth,stage.stageWidth);
	_dragTarget.graphics.endFill();
	this.addChild(_dragTarget);
	_dragTarget.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER, onDragEnter);
	_dragTarget.addEventListener(NativeDragEvent.NATIVE_DRAG_DROP, onDragDrop);
			
	if(this.stage)
	{
		this.stage.align = StageAlign.TOP_LEFT;
		this.stage.scaleMode = StageScaleMode.NO_SCALE;
	}
			
	DeviceCapabilities.dpi = 200;
	DeviceCapabilities.screenPixelWidth = stage.stageWidth;
	DeviceCapabilities.screenPixelHeight = stage.stageHeight;
			
	this.loaderInfo.addEventListener(Event.COMPLETE, loaderInfo_completeHandler);
}

So we have a basic Sprite serving as a drop target overlaying the Starling render view. Problem solved.

Problem #2: Stage3D Communication

The second problem was also a bit tricky and I’m sure there is probably more than one way to handle this. I need to be able to pass a modified string variable from my document class (where all of the processing is occurring) down through my Starling classes in order to update a status message view (Feathers component) being rendered deep within the application.

To accomplish this, I created a small method within the document class which simply accepts string values to pass on through to the primary Starling class defined when we instantiate Starling itself. This was probably the most tricky bit to the entire process; figuring out how to access a member of that main Starling class, com.fracturedvisionmedia.telemetryEASY.Main, from the document class root.

private function updateMessage(s:String):void
{
	(_starling.stage.getChildAt(1) as Main).message = s;
}

We can then invoke this updateMessage() method from wherever we want in the process. In this instance, I’m invoking it whenever the native process (Python) exits in order to let the user know what’s going on.

private function onExit(e:NativeProcessExitEvent):void {
	if(e.exitCode == 0){
		updateMessage("Telemetry Tag Added!\n\nHooray :D");
	}else if(e.exitCode == 1){
		updateMessage("Looks like Telemetry is already enabled.\n\nGood for you!");
	}else{
		updateMessage("I AM ERROR");
	}
}

Within the main Starling class, com.fracturedvisionmedia.telemetryEASY.Main, we create a small public variable (or method, if you prefer that instead) to retain any changes fed in through the document class. This variable will hold the new string values to be drawn from by other Starling classes.

public var message:String;

The final piece (in this case) is to have a listener which runs every frame to update the text view by polling the root Starling class, com.fracturedvisionmedia.telemetryEASY.screens.MainMenuScreen, for changes fed in through the document class.

override protected function initialize():void
{
	status = new ScrollText();
	status.text = "Drag a SWF here to enable advanced telemetry.";
	status.addEventListener(Event.ENTER_FRAME, checkMessage);
	this.addChild(this._status);
	status.textFormat = new TextFormat("Arial", 14, 0xffb400, true, false, false, null, null, "center");
}

private function checkMessage():void
{
	status.text = (this.root as Main).message;
}

This enables any updates from the traditional Flash side of things to be pickup up on by the Starling classes and have appropriate modifications rendered on screen!

Flash Builder 4.7 and Adobe Scout 1.0 Released

Two new major Flash Platform releases have occurred: a new version of the Flash Builder development tool and a brand new product: Adobe Scout! This is part of the larger Adobe Game Developer Tools initiative – part of the Creative Cloud.

Flash Builder 4.7
After two beta releases on Adobe Labs, Flash Builder 4.7 has now been released!
This release introduces new development features and enhancements to Flash Builder and provides support for the new Apache Flex SDK and the new ActionScript Compiler 2.0.

So what are the new features in this version of Flash Builder?

  • Flash Builder is now a 64-bit application
  • Support for the Apache Flex 4.8 SDK
  • Support for the Adobe Scout 1.0 product
  • New ASC 2.0 compiler support for ActionScript Projects
  • Support for creating and managing ActionScript Workers
  • Configuring multiple build targets for multi-screen projects
  • Support for customizing ADT and ADL parameters
  • Support for creating ActionScript Library Projects
  • Real time error highlighting using the ASC 2.0 compiler
  • Enhanced Developer Productivity Features including new Quick Assists
  • Advanced support for iOS deploy/test/debug/sim

Note that Design View, as previously indicated, no longer exists in Flash Builder 4.7. If Design View is desired, you will probably want to use Flash Builder 4.6. Note that both versions can be installed in parallel!

Adobe Scout 1.0
Some of you may be confused about the name… “what is Scout?”… well, Scout is the 1.0 product name of the former Project ‘Monocle’. It’s out now, as part of the Creative Cloud Game Developer Tools. Not only that, but much like Edge Animate – the full version of Scout is FREE for a limited time. After Scout transitions to a paid offering, it will still be available for free with advanced telemetry features disabled.

Adobe Scout is the next-­generation profiler for Flash content running on both the desktop and on mobile devices. It gives you insight into the behavior of your Flash content that simply wasn’t possible in the past.

Scout relies on the new telemetry feature, which was introduced in Flash Player 11.4 and AIR 3.4. This feature gathers detailed information about the internals of the Flash runtime, as well as the ActionScript that it executes, and sends it all to Scout. Scout presents this data clearly, concisely, and graphically, so that you can quickly diagnose performance problems with your content.

To get detailed telemetry data to appear, a project must be compiled in such a way to enable this feature. This can be easily done with Flash Builder 4.7, or through other, less-supported means. Even without advanced telemetry enabled, there is still a good deal of information which can be gathered through the use of Scout.