C/C++ into AIR

Monday, March 3rd, 2008

Last week Ted Patrick wrote that they’re working in Adobe on a project to compile any kind of C/C++ code to ActionScript, making it runnable inside the Flash Player.

I’m not sure I understood this completely. Because if I got it right, this means that an infinite amount of platform-specific, legacy code will suddenly become cross-platform without any software that the basic AIR runtime. Ted says they’ve successfully ported Quake I, and that it ran OK.

This could be the beginning of a really big change in the entire software scenario, and seems worth a lot of buzz.

So maybe I got something wrong, but it seems pretty revolutionary stuff, isn’t it? If you’re reading this and by any chance could clarify this
to me I’d be very, very pleased. And forgive me if I got something wrong.

Update: sorry for the duplicated post. ScribeFire ain’t as reliable as I thought.

Changing the modalTransparencyColor and other PopUp styles in Flex

Thursday, January 31st, 2008

I bumped into this problem a few weeks ago and couldn’t figure out how to solve: we have this application with multiple popups, most with a black overlay behind them. But one specifically needed a white overlay.

The settings for this overlay are usually inserted into the main MXML <mx:Application /> tag or with the global style selector, as in:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
	modalTransparency=".5"
	modalTransparencyBlur="0"
	modalTransparencyColor="#000000">
</mx:application>

or

<mx:Style>
	global {
		modalTransparencyBlur: 0;
		modalTransparency: .5;
		modalTransparencyColor: #000000;
	}
</mx:Style>

But those setting are kept for the entire application and there is no apparent way to change those at runtime.

Gladly I chose to ask at the great blog.flexexamples.com if anyone could help me, and the great peterd posted a whole set of explanations on how to do it. Thanks a lot peterd!

Basically you can access the global style settings and runtime through StyleManager.getStyleDeclaration("global") and then use setStyle() to change them.

You better check out the entire explanation over there.