Apache FLEX processing sketches

I did these Processing sketches while I was working the final 360 Flex conference back in May 2012.  A certain person who I will call Wilkero said I would win some software if I submitted something to the logo contest.  All I won was unlimited bottled water while working the volunteer table.  It was a good conference.

So here you go Flexers.  Hope somebody likes these.

Atomic2_ApacheFlexColors3

Atomic2_ApacheFlexColors2

Atomic2_ApacheFlexColors5

Atomic2_ApacheFlexColors4

BOARD_Heart2_ApacheFlexColors

board_heart2_apacheflexcolors2

 

Heart_ApacheFlexColors

I spoke about HTML5, and left out some notes

Tonight I spoke about the state of HTML5 and my thoughts about it’s future.  The overall message of the talk was to think of HTML5 as a tool rather than a Flash killer.  In time, HTML5 is expected to advance to a point where we can deliver “flash like” audio, video, and application experiences on any device with an HTML5 compliant browser.  Similar to XML when it gave us a common format to exchange data between different computer systems in 2000, HTML5 may be that tool to connect us across all devices.

In the now there is a great deal of energy by the major browser makers to implement HTML5.  However, it really feels like only the fun stuff is here right now ( audio, video, canvas ).  Chrome and Opera have plenty more impressive features, but it’s going to be be a while until HTML5 is that magical ubiquitous platform.  With all the major browsers getting monthly ( and sometimes semi-monthly ) updates, HTML5 is more than just all the rage.  It’s actually getting built!

And here are some of the notes that didn’t make it into the presentation, and information on the demos that did.

TOOLING

MOBILE FRAMEWORKS

360 Flex, HTML5, Adobe AIR, and a bathrobe

I’m happy to share my 360 Flex presentation on HTML5 and Adobe AIR.  This is a topic I have a renewed interest in after Steve Jobs decided to start a war against Adobe’s Flash player.  Also, my very first major HTML5 project endlessmural.com was launched the week before 360 Flex.

Despite the title of this presentation, I didn’t put this together to bash HTML5 or Apple.  Steve Jobs fired me up when he declared Flash dead, and I realized it’s time to start having the “technology is a tool” conversation again.
Bottom line, know your problem so you can pick the appropriate tool for the job.  That tool might be HTML, it might be the Flash Platform, or it may be Lego blocks.  Chances are your target customer doesn’t care.
If you have any interest in the sample AIR applications I demoed, just drop me a line, comment, email, tweet, smoke signal, or carrier pigeon.

http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=preso-100922220734-phpapp02&rel=0&stripped_title=screw-html5-make-cool-shit-with-air-5264156&userName=ericfickes

View more presentations from Eric Fickes.
BTW, I gave this preso wearing a bathrobe.
I like to be comfy when I speak
* this was posted from the backseat of @thecompilers mini van while driving home from 360 Flex. We’re currently heading west on I70 ( Go go Sprint 4G! )

Upload to ASP.NET from HTML, Flash, or Flex clients

File uploading has been a hot topic during my time as an internet programmer.  In the classic ASP days this was a bit of a task to build and get correct.  Nowadays both Adobe’s Coldfusion and Microsoft’s ASP.NET both have built in file uploader tags ( server controls ) that handle this with ease.

This is great, but what happens when you have a mixed bag of clients that all need to upload to the same location?  Sometimes I work with completely ASP.NET or CF web apps, but more often than not I’m dealing with Flash clients as well as HTML clients.

Recently I ran into this upload scenario and built this simple ASP.NET uploader script.  This feels a bit old school since it uses .NET’s built in Request.Files collection, instead of a fancy new ‘all in one’ server control, but I actually prefer this method.

Here’s all you need :

// Check for posted files
for (int xx = 0; xx < Request.Files.Count; xx++)
{ 
    // UPLOAD FILE
    HttpPostedFile _file = Request.Files[xx];

    // make sure we're not finding empty filename
    if (_file.FileName.Trim() != string.Empty)
    {
        // NOTE : IE < 8 reports full path of file, not just filename
        // Parse out filename, then create full upload path
        var fileName = _file.FileName;
        if (fileName.Contains("\"))
        { 
            var aFile = fileName.Split('\');
            fileName = aFile[ aFile.Length - 1 ].ToString();
        }

        // create full save path for uploaded file        
        var full_file_path = Server.MapPath( UP_FOLDER ) + "\" + fileName;

        try
        {
            // save file to server
            _file.SaveAs(full_file_path);
        }
        catch (Exception exc)
        { 
            var emsg = "Unable to upload file : " + exc.Message;

            Response.Write( emsg );
            Response.Flush();
            Response.End();
        }

        // show result
        Response.Write( _file.FileName + " uploaded! <br>" );
    }
}

That’s all there is to it codewise. Before using this code you will need to give the NETWORK SERVICES user write permissions to your upload folder. Other than that, that’s all she wrote!

Here is a zip of all the code for you to download.

Inside this zip you will find :

  • flashclient.fla – Flash upload client ( *be sure to update the upload path before building )
  • flexclient.mxml – Flex upload client ( *also update upload path before building )
  • uploader.aspx – ASP.NET file upload handler
  • uploadform.html – sample HTML upload form ( again, update path )

Hope somebody finds this useful.

I am going to 360 Flex DC, and so should you

I’m happy to announce I received my Golden Ticket to speak at the next 360 Flex conference in Washington DC.  The conference will be held at the Hilton DC North Gaithersburg, September 19 – 22, 2010.

I am speaking at 360 Flex DCI’m going to 360 Flex DC, and so should you

I spoke at the last 360|Flex in San Jose, but I’m already more excited for the DC conference, and here’s why.

  1. I’m speaking about the most exciting part of the Flash Platform, AIR2
  2. Jesse vs. Jesse ( Flash vs Flex throwdown )
  3. It’s in Washington DC
  4. My band The Compilers will be giving a lunch talk, as well as playing live at one of the parties
  5. There is talk of Duanne Nickull’s band 22nd Century playing ( hopefully Sean ‘the flex guy’ too )
  6. Doug McCune is giving the opening Keynote speech on Monday
  7. I get to hang out with the Flex community

If you haven’t been to a 360 Flex conference yet I highly recommend it.  If you still need help deciding, here are a few conference questions for you.

  1. Do you currently work with or have any interest in Adobe Flex?
  2. Have you attended a 360 Flex conference yet?
  3. Do you want to meet the community loudmouths you’re already following on Twitter?
  4. Have you seen who is speaking at 360 Flex DC?
  5. Have you ever heard The Compilers play live?
  6. Are you still reading this blog post?

The last 360 Flex I spoke at was in San Jose and it rocked.  The city of San Jose bored me to tears, but I felt like I was living inside my twitter feed for three days.  My presentation was on the final day of 360 Flex, so I spent most of the conference preparing, and sitting in a few sessions here and there.  I spent almost half of my time in San Jose working and still met 10-15 of my twitter buddies, not to mention all the new contacts I met.  In a nutshell, if you attend a 360 Flex conference, you will meet the community.  In fact, you’d have to try pretty hard to not meet the Flex community.

If this sounds up your alley, go ahead and register to take advantage of the early adopter ticket price of $450.  I’m not sure when the ticket price will go up to $599, but I know it will so act fast.  If you make it to DC, be sure to find me and introduce yourself.  I promise it will be a good time.

360|Flex Washington D.C. Sept.19-22

Early adopter price $450

360|Flex Information

ABOUT

SCHEDULE

SPEAKERS

REGISTER

It’s official, The Flash Platform rocks!

* UPDATE : all the videos were originally made and hosted at http://screentoaster.com which is now defunct.  I will get these videos updated someday.  Sorry for the loss.

In case you missed the June RMAUG meeting, my band The Compilers played our first hybrid concert and presentation show. Who are The Compilers? As far as I know, we’re Denver CO’s only Tech Funk Fusion trio that use internet technology along with analog instruments. By day we’re internet programmers, and by night we’re rockers. Right now majority of our software revolves around the Flash Platform, so it was only natural that we play at RMAUG.

Below is a recap of our setlist, and notes about the technology we presented on. When you see mentions of a Flash movie, these are not run as standalone SWF files. They are actually played by our Flex based Compilers Live Player. This application runs on our guitarist Jun Heider’s laptop, and the entire app is controlled over MIDI, via a Behringer FCB1010 Foot Controller, MMJ, and MERAPI.

Intro Song

For the first song of our set we decided to use a funny and informative Flash movie to give the audience a hint at what they’re about to see. For the June RMAUG show, this movie was updated to include spoken thank you slides for the companies that make our technology, and special shout outs to all the people who help us put on a great show.

Watch Flash Intro Movie

I want an iPhone

For our iPhone song we have another entertaining Flash movie that gets played during my iPhone solo part. Both this song, and the Flash movie where updated a bit for RMAUG. Unfortunately Soundbooth crashed on us when saving the recording of our live set, so I can’t play a clip for the remixed iPhone song, but you can watch the updated iPhone Flash movie.

Watch Flash iPhone Movie

All your base, are belong to us

This song is pretty straight forward when it comes to technology. We have a backing Flash movie that plays scenes from the ZeroWing video game, as well as the ‘All Your Base’ iPhone app for ZeroWing audio samples. I’m not including anything for this song besides, if you’ve seen us play before, this song now has a reggae feel to it. Prior to this show, ‘All Your Base’ was a hard driving all your punk are belong to us.

Sleep Tick

This is one of our original rock tunes which has been given a minor touch of technology. There is a middle part that I now break out into an iPhone solo, and we also have an AIR 2 powered audio visualizer. This particular app is one of the most exciting for me because I’ve been waiting for the day when we can use getMicrophone to pull raw data. Instead of explaining this one, you can watch it instead.

Tweet Jam v2

I’m happy to report our crown jewel of internet technology and audience interaction mashup “Tweet Jam”, has reached version 2. Both the song and the application have been rewritten especially for the RMAUG show. TweetJam is an instrumental jam song where the audience tweets at @thecompilers during our show, then our Roboreader application imports the @mentions and reads them back to the crowd via robot voice. Since our application reads the live Twitter feed, you don’t have to be at our shows to participate! A final point of interest for this application is that I run this on my laptop and control it using a wired XBOX 360 controller. There’s not much more to explain, but there is a video showing it in action.

http://www.screentoaster.com/swf/STPlayer.swf

James vs. Rick

Our final song of the night uses two applications. One is a game for the audience, and the other is a simple audio app. The game is an AIR application that connects to the ‘phone game company’ MegaPhone service and displays a specially assigned 888 telephone number, and a range of numbers to press in order to vote for James Brown ( 0 – 4 ) or Rick James ( 5 – 9 ). When a player calls in and presses a number from a specific range, our AIR app will play an appropriate audio sample while we’re playing. Our AIR app keeps track and displays the running vote count, then at the end of the song we fade and play a funny video from the winner.
The second application ‘Funky Funky’ is a simple AIR2 application that uses NativeProcess to say “Funky Funky”. While this doesn’t sound like anything noteworthy, it’s a perfect application for this particular jam because OSX’s SAY command has a voice called “Bells” that speaks in a melody that matches the song we’re playing. Of course this doesn’t make much sense not knowing what the song sounds like, so here’s the actual application for you download and try out. Note, this is an AIR2 app that uses NativeProcess, so this is an OSX only application.
Funky Funky! A text to speech OSX application by The Compilers
For your entertainment, here are two funny videos from James Brown and Rick James.

The Flash Platform Rocks!

So there you go, proof that the Flash Platform rocks! I haven’t thought of any rocking ending other than, go check out AIR2. The Flash Platform is no longer restricted to the browser. Let all the HTML heads keep the browser, I want to rock on stage with Flash.

Photos

We didn’t get a recording of the show, but we do have a photo album of the June RMAUG on Facebook.

The Compilers Next Show

If you missed The Compilers at RMAUG, we are playing at Ignite Denver 7 on July 27th. If you can’t make that show, be sure to at least tweet @thecompilers on July 27th to get yourself heard.
Be sure to check out The Compilers World for information from the future of the internet rock trenches.

Using an AS3 object or class as a DataProvider

I have a need to use custom class objects as a DataGrid dataprovider.  After wrestling with flash.utils.describeClass() I gave up and found two other methods for binding my custom objects to a DataGrid.

First here is a look at the sample MXML app I put together.

Using custom object as a DataGrid.dataProvider in Flex 3

Same object bound two different ways

Click here to run this demo in a new window.

In the first grid the DataGrid gets a column per object property.

var dp_horizontal:Array = ArrayUtil.toArray( myCustomObj );
grid_1.dataProvider = dp_horizontal.valueOf();

In the second grid, I run my custom object through a helper function to create an ArrayCollection containing NAME, VALUE pairs for each object property.

/**
 * Convert a class object into an ArrayCollection to be used
 * as a DataProvider
 */
private function objectToDataProvider( obj:Object ):ArrayCollection
{
	// our DataProvider
	var dp:ArrayCollection = new ArrayCollection();
	// get object class info
	var info:Object = mx.utils.ObjectUtil.getClassInfo( obj );
	// split the class property list into Array
	var propsA:Array = String( info.properties ).split(',');
	// loop over class properties grabbing value and filling up dp
	for( var xx:int = 0; xx <= propsA.length-1; xx++)
	{
		dp.addItem( { name : propsA[ xx ], value : obj[ propsA[ xx ] ] } );
	}

	return dp;
}

I’m currently using this helper function to bind the result of WebORB.NET data calls to a DataGrid for testing.  This code could really be used by any type of object though.

Hope this helps somebody else.