Archive for the ‘Actionscript 3’ Category

Incubator News Roundup (Molehill)

Sunday, February 27th, 2011

NOTE: this post was last updated with new links on March 9, 2011

New and truly revolutionary versions of Flash Player and Adobe AIR named “Incubator” (formerly Molehill APIs) were made available on Adobe Labs. To those who are unfamiliar with the new release, it features hardware accelerated 3D graphics support.

As Adobe puts it: “The Adobe® AIR® and Adobe Flash® Player Incubator is a technology preview program for more adventurous developers who are willing to experiment with Flash Platform runtime features that are in early development stages.”

New Incubator builds of Adobe Flash Player and Adobe AIR available here:
Download Incubator Builds and check Wiki

If you are keen on exploring 3D capabilities right away, you can use one of the pre-release versions of the popular 3D frameworks that also announced Incubator support. To see a list of all features that are included in the Incubator builds, check out this post.

3D frameworks supporting Molehill:

Here are some LIVE demos:

(make sure you have Flash Player Incubator installed first)

Added on March 9:

Added on March 8:

Added on Feb 27:

Videos (only new stuff):

Just Source Code:

Tutorials and Articles:

Related News:

Now, let’s change the web!
Follow me on twitter @pauliusuza for more news and updates on #flash and #molehill

MAX 2010: 3D in Flash, AIR for Android and TVs, Controller Support!

Monday, October 25th, 2010

Day one of Adobe MAX 2010 announcements brought some pretty amazing things, and the conference is just getting started!

3D support in Flash

First of, the most important announcement in my mind, full 3D support in Flash Player. While there’s no details about the technology itself, we have seen Kevin Lynch demo a 3D racing game which looked nowhere far from stunning and the processor was hovering around 0-1% of CPU. This is HUGE! With the current adoption rate of Flash Player (73% in 3 months) it will be the most popular 3D gaming platform once released to the wild, surpassing Unity3D and other smaller competitors in no time.

Game Controller Support

This is epic as well – Kevin Lynch demoed controlling a game running inside a browser using mouse and then switching to a steering wheel and a PS3/XBOX type controller. By itself it means that Flash will finally be able to use a whole new range of game controller devices. However I think that this might be a hint to a whole bigger announcement Adobe could make in the next few days – PS3 support? Xbox? Who knows… ;)

AIR for Android and TVs

AIR for Android SDK is now publicly available for download. Any developer building an app in AIR can now package their app for sale in the Android Market. Also it is now possible to build an app for Google TV, which runs Android. Adobe blog has more info.

Stage Video

Native performance for video running inside Flash on tabled devices, mobiles and desktop. Again, awesome!

You can experience MAX conference streaming live using new Flash Player P2P technology:
http://max.adobe.com/online/

Let’s see what day 2 of MAX 2010 brings us!

Alchemist 2 – AIR for Android

Saturday, October 23rd, 2010

Today we have released the second version of our award winning puzzle – Alchemist 2 and this time it’s for Google Android platform and it’s build using Adobe AIR 2.5 for Android.

Alchemist 2 features a lot of improvements over it’s predecessor, including a completely new gameplay engine, new gorgeous graphics, adaptive AI and unlockable achievements.

Buy Now! | Get FREE DEMO

IDev.tv plugin store is now live!

Friday, August 13th, 2010

We have just added a plugin store to IDev.tv where you can purchase (and sell, please contact me for details) all kinds of goodies for IDev.tv platform. Go check it out!

Every account now also comes with affiliate program where you can earn money by sharing IDev.tv with your friends. To start using it, just sign up and check out “Affiliate Settings” section inside your IDev Account!

Beta Testers Wanted – www.IDev.tv

Monday, August 2nd, 2010

For a while now, we at InRuntime have been working on a new product for Flash Platform and just couple of days ago we have released a public beta to the wild (woohoo!)

It’s called IDev and it’s an advanced XML based template system for building fully functional Flash websites. It comes in three parts: a ready to use website (SWF + XML), a SWC library for developers and a set of online tools located at www.idev.tv.

You should be interested in IDev if:

- You are a freelancer making Flash websites for a living (IDev serves as a perfect base for freelance development, allowing you to mix and re-use components to create unique online experiences)

- You are an Actionscript 3 developer making standalone Flash components and you would like to earn some cash (You will be able to easily port and sell your components as IDev plugins)

- You are a person / company who wants to set up their website without putting your hands in the code or hiring a programmer (IDev is fully customizable through XML, so you don’t have to know how to program)

Sign Up, Talk, Share!

We think that IDev is a great product and we would like to ask your assistance in getting it off the ground. Go to www.idev.tv and SIGN UP, test it out by downloading your own copy from Launchpad and let us know what you think about it. To make the visit worthwhile, we are giving away all our existing IDev plugins for FREE for every new user.

If you like IDev as much as we do, please SHARE IDev.tv with your friends!

My take: HTML5 vs. Flash

Thursday, April 29th, 2010

Recently the steam has built up to the level where it needs to be set free, so here is my take on the whole HTML5 vs. Flash matter:

HTML5 by itself does not provide scripting or styling

HTML5 is a markup language, markup as in “the collection of tags that describe the specifications of an electronic document, as for formatting”, nothing more. To build anything more useful than a bunch of static text and media you will need to rely on…

CSS and Javascript

That’s right, RELY being the key word here. You might have heard (or experienced) that CSS and Javascript support across browsers is fragmented and broken due to vendor inability to talk with each other and to find a common understanding when defining web standards.

But how bad is it exactly? How does it look when you put it in perspective with a technology like Flash?

Mouse Events

In Flash Player’s Actionscript 3 you have a rich set of mouse events that allow you to distinguish between different states interaction with interface elements. These events allow to create complex user interface elements, nested navigation items, drop-down menus and even multitouch interfaces that work flawlessly. See a full list of supported events here.

In Javascript, you have to check with this compatibility table from QuirksMode.org which looks like a Christmas tree. It’s sad but browser vendors have chosen to implement mouse events so differently that most of the time it’s impossible to get something to work without using tons of compatibility code and sometimes it’s just not possible at all (for example this will never run on Opera).

Consistency

A table of currently supported HTML5 tags can be found here (note the dominating RED color).

Whereas Flash Player 10 supports consistent API through operating systems and devices and is currently deployed on 97% of all internet-enabled computers worldwide (data taken from here)

Clipboard

In Actionscript 3 setting clipboard contents is as easy as calling [as]System.setClipboard(contents)[/as] In Javascript… well since the native clipboard functionality is only supported in Internet Explorer you will have to EMBED A FLASH FILE and use a js-to-flash bridge to set the clipboard:

[js]
function copyIntoClipboard(text) {
var flashId = ‘flashId-HKxmj5′;
/* Replace this with your clipboard.swf location */
var clipboardSWF = ‘http://appengine.bravo9.com/copy-into-clipboard/clipboard.swf’;
if(!document.getElementById(flashId)) {
var div = document.createElement(‘div’);
div.id = flashId;
document.body.appendChild(div);
}
document.getElementById(flashId).innerHTML = ”;
var content = ‘‘;
document.getElementById(flashId).innerHTML = content;
}
[/js]

Video

Let me quote diveintohtml5.org for this one: “There is no single combination of containers and codecs that works in all HTML5 browsers. To make your video watchable across all of these devices and platforms, you’re going to have to encode your video more than once.”

Hey, thanks but NO THANKS.

I will not go into details on this topic since it was covered many times over before me but currently HTML5 video tag support is fragmented and implementations are slower than Flash due to browser’s inability to leverage hardware acceleration. More information here and here. In other words, it’s a complete mess.

Styling

So here’s a simple example in Actionscript 3, let’s draw a semi-transparent box with rounded corners and and rotate it by 7.5 degrees:
[as]
with(shape.graphics) {
beginFill(0xB4B490,0.6);
drawRoundRect(0,0, 100, 100, 12);
endFill();
}
shape.rotation = 7.5;
[/as]

Makes sense? Sure does.
Now let’s take a look at HTML and CSS code required to achieve exactly the same result:
[html]

[/html]
[css]
#box {
/* Color and Transparency */
background-color: #B4B490;
background-color: rgba(180, 180, 144, 0.6); /* FF3+, Saf3+, Opera 10.10+, Chrome */
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr=’#99B4B490′,EndColorStr=’#99B4B490′); /* IE6,IE7 */
-ms-filter: “progid:DXImageTransform.Microsoft.gradient(startColorStr=’#99B4B490′,EndColorStr=’#99B4B490′)”; /* IE8

/* Dimensions */
width: 100px;
height: 100px;

/* Rounded Corners */
-moz-border-radius: 12px; /* FF1+ */
-webkit-border-radius: 12px; /* Saf3+, Chrome */
border-radius: 12px; /* Opera 10.5, IE 9 */

/* Rotation */
-moz-transform: rotate(7.5deg); /* FF3.5+ */
-o-transform: rotate(7.5deg); /* Opera 10.5 */
-webkit-transform: rotate(7.5deg); /* Saf3.1+, Chrome */
filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod=’auto expand’, M11=0.9914448613738104, M12=-0.13052619222005157, M21=0.13052619222005157, M22=0.9914448613738104); /* IE6,IE7 */
-ms-filter: “progid:DXImageTransform.Microsoft.Matrix(SizingMethod=’auto expand’, M11=0.9914448613738104, M12=-0.13052619222005157, M21=0.13052619222005157, M22=0.9914448613738104)”; /* IE8 */
zoom: 1;
}
[/css]

See those values next to filter and -ms-filter? HOW THE HELL should I calculate those matrix values by heart without opening my scientific calculator every time I need to adjust the rotation angle?!

And why do I have to repeat the same statement over and over again for each crappy browser implementation? -moz-o-webkit-ms-gimme-a-break.

And worst of all, why after going through all of this nonsense it still works only on 25% of all browsers?!

[EDIT] By popular demand, here’s how it looks in JS + canvas:
[html]

Alternate text.


[/html]
[js]
var drawingCanvas = document.getElementById(‘drawing’);
if(drawingCanvas.getContext) {
var width = 100;
var height = 100;
var radius = 12;
var x, y = 0;
var ctx = drawingCanvas.getContext(’2d’);

ctx.fillStyle = “rgba(180,180,144,0.6)”;
ctx.beginPath();
ctx.moveTo(x,y+radius);
ctx.lineTo(x,y+height-radius);
ctx.quadraticCurveTo(x,y+height,x+radius,y+height);
ctx.lineTo(x+width-radius,y+height);
ctx.quadraticCurveTo(x+width,y+height,x+width,y+height-radius);
ctx.lineTo(x+width,y+radius);
ctx.quadraticCurveTo(x+width,y,x+width-radius,y);
ctx.lineTo(x+radius,y);
ctx.quadraticCurveTo(x,y,x,y+radius);
ctx.fill();
ctx.rotate(7.5*(Math.PI/180));
}
[/js]

Any better? I thought so… Oh, and if you want this on IE, you have to use a compatibility library.

Licensing

This is a point that gets mentioned over and over again, so let’s see:

  • Wikipedia states that “On March 14, 2007, WebKit developer Dave Hyatt forwarded an email from Apple’s Senior Patent Counsel, Helene Plotka Workman[3], which stated that Apple reserved all intellectual property rights relative to WHATWG’s Web Applications 1.0 Working Draft, dated March 24, 2005, Section 10.1, entitled “Graphics: The bitmap canvas” [4], but left the door open to licensing the patents should the specification be transferred to a standards body with a formal patent policy.”. Today, Canvas is still a copyrighted property of Apple Inc.
  • HTML, JS and CSS parser implementations of most of the browsers are closed source (with few exceptions).

Now on the opposite side we have this:

Still not convinced?

What Else?

Finally, here’s a list of cool functionality that you will miss out on if you choose HTML5, JS and CSS over Flash:

  • Sockets
  • Video and audio streaming
  • Microphone and webcam access
  • Embedded fonts (don’t get me started)
  • Multitouch
  • Native 3D transforms
  • Graphics shaders and other C++ based extensions (Alchemy)
  • DRM

Conclusion

Summing up I would like to say that I like HTML5 *very much* for what it is – a semantic upgrade to HTML4. But please don’t call it something like “Flash Player Killer” because doing so simply does not make sense.

Flash is a superior technology allowing for rich and true cross platform experience and it’s here to stay for a long long time whether you like it or not.

Flame wars commence… If you have a different point of view or want to add something to the discussion, please leave a comment below. You can also send me a shout at @pauliusuza on twitter.

Alchemist for Adobe AIR on Android

Tuesday, February 16th, 2010

At this year’s Mobile World Congress 2010 in Barcelona Adobe Systems Inc. officially announced the much anticipated Adobe AIR for Smartphones and Mobile Devices. Using Adobe AIR, developers and designers will be able to build standalone applications to target devices running the Google Android operating system.

Adobe’s own Michael Chou was kind to feature our “Alchemist” game in their technology announcement post which you can see here.

Alchemist on Motorola Droid

We at InRuntime Ltd. have been working closely with Adobe for the last couple of weeks to deliver our new games across a range of new platforms and devices using pre-release and lab versions of Adobe CS5 family products. As a result of that “Alchemist” game is currently available in three formats:

  • Adobe Flash 10.1 version for web (optimized for mobile) – play for free
  • Native app for iPhone and iPod Touch – info | purchase
  • Adobe AIR Mobile for Google Android (technology preview)

If you are attending MWC 2010 this year, make sure to stop by Adobe’s booth at Stand 1D45 in Hall 1 and see “Alchemist” running on a wide range of devices!

During the next few weeks I will be posting information on our company website and this blog about cross-device and cross-platform development using the exciting new tools available in Adobe Creative Suite 5 (CS5). Please follow us on Twitter @inruntime and @pauliusuza to get the latest updates!

Thanks!

How to market your iPhone app

Saturday, January 2nd, 2010

When we were building our first application “Alchemist”, we have compiled a list of useful marketing resources that helped us push it out through the door with zero additional investment for marketing purposes. Today we want to share these resources with you:

Twitter

We have compiled a list of people who work with iPhone reviews, follow them, and @ them your application name. If you are lucky, you can get a pretty nice viral effect going on. Here’s our iPhone reviewers list on Twitter.

Microsite

Make a small one page website about your app and add Google Analytics. Focus on the visual appeal, describe your app in just a few sentences, put a list of features (by version if you have updates) and a clearly visible price tag with a link to iTunes Store. Think about this site as a “press kit” so that reviewers don’t need to email you to get information about your app, app screenshots and videos, company info and developer bios – it has to have it all in one place. Here’s an example site we have built for our Alchemist game

Youtube

Create an account on YouTube (if you don’t have one already), make a video of your app gameplay using screen capture software + iPhone simulator and post it on your channel. In the description or the comments section add a short text about what your app does and a link to iTunes store. It can generate a nice and steady flow of buyers. Make sure you encode the video as H.264 so it’s playable on iPhone and iPod too. Here’s our gameplay video for Alchemist.

SEO

If your app has a similar name to competitor’s, make sure you put a unique keyword next to it that will clearly distinguish it in the search results – your company name, or author’s name will do fine, ex.: “Appname by Your Name” or “Company’s Appname”. Use a short name for application if possible and avoid common words. When posting on Twitter, use #iPhone, #iPod, #App, #AppStore or #iTunes tags to channel the information and make it more discoverable.

Apply for Reviews

Here’s a list of review sites that we have gathered ourselves.
You can apply for review through a web form:

Or send emails directly to reviewers:

Check User Reviews

Most of the app tracking sites have their own user reviews, check them out from time to time to get a more complete picture.
Here’s the biggest app tracking sites:

Self Promotion in Forums

Here’s a couple of forums with high traffic that encourage developers to announce their new applications in specific sections.

Feedback

Collect user feedback. You can set up a forum in your site, use comment section in your blog or use a 3rd party feedback service like http://getsatisfaction.com

Ranking

Use software or web services to get reports about your app ranking on iTunes:

Track app sales:

Gather and track in-app analytics:

Once a day you can also download your daily sales report and process it with special software such as App Store Sales by PositiveTeam

Impact

Experiment with search engine queries until you found the one that returns links to your app most frequently and bookmark it. Check the bookmarked search query for changes in number of results every couple of hours. This will give you a good overview of how the information about your app is spreading all over the web. Here’s an example query that to track our Alchemist game.

Analytics

Check your Google Analytics at least every 24 hours and compare your website traffic with your sales data, look for spikes in sales coinciding with spikes in website traffic. Also check traffic sources section to know who’s linking to you and from where you get most of your traffic. Use the new Intelligence feature of Google Analytics to set up alerts for when your daily site traffic spikes above 25%. This might happen if your app gets featured in one of the bigger review sites.

If you have any questions / additions / suggestions please leave them in the comment section below!

Alchemist – building iPhone apps with Flash CS5

Saturday, January 2nd, 2010


Alchemist

So here we are in year 2010 and it’s the fifth day since the launch of our first iPhone and iPod game called “Alchemist” ( official website / iTunes link ). During the two first days of it’s existence “Alchemist” was promoted as a free app and it managed to gain #4 in Spain, #5 in Argentina and #6 position in Italy in Family games category and bring in very good user reviews. We are very pleased with it’s performance.

If you own an iPhone or iPod touch, be sure to check it out!

Alchemist for iPhone

The game was built with Adobe Flash CS5 and Flex Builder 4 from scratch to finish, here’s a little how and why we did it.


Prologue


We have to admit it – we are no mobile developers. Before doing “Alchemist” our team had little to none experience of building a mobile application. Most of you reading this will find yourself in more or less the same situation. Why? Because mobile as we web developers know it is slow, difficult, closed, incapable and highly segmented platform and thus there are very few of those who do try to enter mobile development world as indie developers.

Most of the mobile platforms like Nokia’s S60, Windows Mobile and iPhone offer SDKs and tools for developers, but the technology and programming language know-how required to use them are usually very different. If you were like us, looking for true “build once, use everywhere” solution with minimum investment you would be dissapointed to know that one did not exist… Until now.


What Has Changed?

First up, Adobe announced that Flash CS5 will ship sometime in 2010 with something called “Packager for iPhone” and you will be able to compile native iPhone applications with technology and tools that you know, love and use everyday. Flash CS5 Creative Suite will be optimized for creating mobile content out of the box and the workflow between design / coding / deployment will be much more integrated than before allowing you to cut down dramatically on total production time.

Second technology that popped up on our radar was ELIPS Studio 3 by Open Plug. When final version is released in 2010 (currently in beta) it will be able to generate source code for native mobile applications from Actionscript 3 and Flex 3 projects. It means that with a single click you will be able to convert your Actionscript 3 project to source code for Windows Mobile, iPhone, Symbian S60 and Android, and later build it for that target platform.

Third technology that we found out about recently is Haxe’s cpp target. When used with two additional libraries “nme” and “neash” it allows to compile Haxe code for iPhone directly from XCode! Geeky but very cool nevertheless.

And finally Adobe’s Open Screen Project recently got a boost of major industry players and newcomers like Google, which means that first new devices with Flash Player 10.1 will hit the market in Q1 2010.

We were lucky enough to be able to evaluate all aforementioned products and technologies before their public releases and as a result of that we decided to start up a mobile development branch withing our company and first to build one simple game for demonstration purposes and try our luck in a completely new but very promising market.


iPhone Development with AS3

We decided to launch our first application for iPhone only and later extend it to other platforms when technology is mature enough. We think that iPhone as a platform is the best for beginners, here’s 4 “why”:

  • It has it’s own smart and working distribution model with in-device content store.
  • iPhone / iPod market has highly capable devices (big and nice screen, multi touch, wifi, bluetooth, gps) with low segmentation.
  • Developer earns 70% from each sale.
  • Lots of devices already on the market and growing each day.


Making Choices

For us the most important thing was the ability to easily port our existing code to another platform sometime in the future and to be able to maintain simplicity in the production pipeline. Also we wanted to be sure that we will be able to get a return on our initial investment in a reasonable amount of time therefore we decided to write our game libraries in Actionscript 3. Even if we don’t get the possibility to compile a native application for all other platforms, we will be able to deploy for Flash Player 10.1 for mobile devices inside the browser.

We know that there’s no ideal technology for every situation, therefore we have set up our company’s toolset like this:

  • Unity 3D for games that need 3D
  • Adobe Flash CS5 for 2D, isometric games and all applications with custom UI or rich media
  • Elips Studio 3 for cross-platform business applications
  • XCode for everything in-between

The current 3D solutions (Papervision, Sandy, Alternativa or even native 3D) in Flash Player are not optimized for iPhone development and are unusable. Also Flash Player on iPhone is using it’s own drawing API therefore drawing operations are extremely expensive and most of the UI and 3D libraries here are more or less useless. We see a huge opportunity for new products and libraries, open source and commercial alike to fill in this gap (hint hint).

Unity3D is great. It’s actually the best platform if you want to develop 3D for iPhone hands down. It also offers cross-platform and web compilation and you can write your entire game code in Javascript so you can make the transition from Actionscript 3 really easy, especially if you come from a web background.

We have left XCode development as a fallback option, but we are confident that at this point Flash, Elips and Unity3D can cover 95% of our development needs.


Working with Adobe Flash CS5

Adobe Flash CS5 will provide a lot of enhancements on the UI side that you will like and that will make your life much easier, however it will not impress you if you consider yourself a coder like we do. Although code completion got some improvements, it still sucks. Intentionally or not, Adobe will provide a solution to this problem allowing to write code and compile your Flash project from within Flash Builder 4. We have tested it and it works great!

The coolest features for us were:

  • You can now use embedded assets from Flash Builder inside Flash CS5 and you don’t have to mess with the library anymore
  • One click preview your app inside a iPhone (AIR) simulator from within Flash CS5 and Flash Builder
  • No messing with XCode, or re-compiling – Flash CS5 will compile a native *.ipa iPhone installer
  • Live debugging on device

We cannot compare our experience with same level mobile development on XCode, but the whole process on Flash CS5 felt like a breeze to us from start to finish. The suite actually allows anyone with Photoshop and basic Flash coding knowledge to build a fully functional iPhone app. Of course you can ‘go ahead and learn Obj-C’ anytime, but we think Adobe’s new toolkit focuses more on creative side of development, fast prototyping and giving artist the tools for creating a great user experience. One-man-army type of development will now be much easier and we will see a lot of new inspired apps very soon.

As for our game – “Alchemist” looks and performs great, just like any other native iPhone app. Adobe has done a terrific job on maxing out the performance without developer having to poke around the code too much. Once you get the bitmap caching sorted out, that’s pretty much it.


Epilogue

With Flash CS5 don’t expect to:
- Make an app with heavy frame animations
- Use Papervision3D in an app
- Port a web game without optimizing it for iPhone

Things to watch out for:
- No mobile UI element libraries
- No social gaming support (plus+, openfeint)
- No in-app purchases support

Most of the libraries for iPhone are available in C# and it will take some time to port them to AS3, we suggest to start thinking about what you could do to fill out these empty gaps maybe it will turn out to be a great business opportunity for you.

For now, thanks for reading, have a great new 2010 and please watch us at http://www.inruntime.com / follow on twitter @inruntime

AS3 Global Object 2.0

Friday, November 6th, 2009

Hello,

I’ve just refreshed AS3 Global Object to version 2.0 by refactoring and simplifying most of the code. The main change is that the classes now reside in new package com.inruntime.utils and there’s only two of them (down from four) which also solves some code conflicts.

Also, AS3 Global Object has got a new home at Github – http://github.com/inruntime/AS3-Global-Object. The download links in this blog were updated and are now pointing to the latest release in Github repository.

Enjoy!