Past thoughts on ‘ActionScript’

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.

Flash vs. Flex?!

Friday, December 7th, 2007

I wonder why Adobe (and the numerous evangelists doing a great job promoting and explaining Flex) insists on marketing Flex and Flash as opposed, or at least very, very different things?

Flex is a framework. A bunch of very useful code that streamlines and support the [earlier] exasperating process of writing applications in ActionScript. But it’s written AS3, produces SWFs, runs in the Adobe Flash Player. When you’re writing a Flex preloader you even find out that the whole of Flex code is put in the Frame 2 of a Flash timeline, with the preloader in frame 1. There’s nothing you can do with Flex that you couldn’t eventually do with straight AS3, even in the Flash IDE timeline.

I do see that people from a AS1/2 background might have some initial difficulty understanding the difference (I know I did), but why try to make it so different? OK, Flex is totally targeted toward applications, but many sites nowadays can’t be discerned in many ways from very visual applications.

No one will try to prove or at least say that CakePHP is different from PHP. and most certainly there will be no one trying to show how Rails is opposed in anyway to Ruby. It’s like comparing apples and apple juice!

Ted Patrick is writing on this, and that’s what got me thinking.

Just wanted to say it. I told I’d blog anything from now on.

OK, we do 3D… But how do we design for it?

Monday, October 15th, 2007

Last week, I wound up at this amazing demonstration of the amount of elements you can draw on the screen with Actionscript 3 and Papervision 3D.

1234 Elements: I’ve actually gotten more in a better machine, with more time to spare

The picture shows 1234 elements, but I actually got to around 2500 earlier. Wow! OK: I’ll grant that Papervision manages the screen so that everytihng that isn’t necessary is not drawn, and that the element are not interactive, and have no animation within them. But this mindblowing nonetheless.

Hold on, this post is not YAPD (Yet another Papervision demo); it’s not even on Papervision itself. It’s that this one demonstration of orderly colourful animated elements in a 3D, depth-of-field-enabled environment, seems just like one of those things that seems to set a milestone on technology. It’s a very real proof that the combination of Papervision and the AVM2 can finally be used on a real project, not a deployed extension of a demo.

But this got me thinking (and threw me in a very productive discussion with my friend Daniel Morena): are web designers (myself included) ready to design for a 3D web? It’s been not even a week since I wrote on the difficulty most of us have with articulating a new visual language that is truly unique to the web! How could we jump from no letting go of magazines and brochures to stepping into a completely interactive, immersive 3D space?

3D is not the answer to everything, but it may just solve some very difficult design issues we may have. The thing is: we don’t know how to design for 3D. The web (and the GUI as a whole) has been a 2 dimensional environment forever. We got as far as creating tabs and overlapping windows to emulate some familiar sense of depth that helps users organize information on the screen. But really going three-D, and making a whole website that truly makes use of this opportunity, is hard.

A friend forwarded me a link to a post by Kevin Sweeney, in which he demonstrates his utter in-satisfaction with everything that has been built with PV3D until now. I can’t tell for sure, but I do believe the origin for such disappointment is that: things have not been designed to be 3D, they’re that way simply because technology allowed.

Extending a PV3D demo doesn’t count. As well as creating some layout in which some two-dimensional plates float, and end-up parallel to the screen and actually being needed. I believe we need to embrace the 3D. I’m just not sure we all know how to design for it yet.