News, Information and reports for the Flash Forward Conference.


Thursday, July 11, 2002

Pre Film Festival Reception

Everyone is waiting for the Flash Film Festival to start (drinking free beers). I was planning to blog the film festival winners during the session, but my battery is super low so i might not be able to.

Check back later for updates.

5:25:22 PM    comment []  Google It!  

Flash Remoting with Flash MX and ColdFusion MX : Christian Cantrell

Christian Cantrell : qantrell@yahoo.com : note all code examples, and slides (very nice) will be included online.

Flash Remoting is a server-side technology which allows for the intergration of Flash applications with existing application server logic.

Exposes remote services through a simple ActionScript API.

Uses AMF (Action Messaging Format) to communicate with player / server. Very efficient binary format made specifically for ActionScript.

Getting started : need

  • Flash MX
  • Flash Remoting Components (avaliable from macromedia.com)
  • A server that has the Flash Remoting Adaptor installed.

Flash Remoting ActionScript objects:

  • NetServices.as : core ActionScript logic of Flash Remoting. Provides functionality to connect to Flash Remoting adaptor on server.
  • RecordSet : Object representing a set of data records, usually returned from a database.
  • DataGlue : Utility object for mapping columns in a RecordSet to proerties of UI components.
  • NetDebug : Utlity object for helping to debug client/server interactions (using NetConnectoin Debugger Panel).

Creating packages for Flash Remoting Services

A package is implimented as a logical directory structure where the files that contain Flash Remoting services are kept. (start from the document root).

Uses domain name in reverse (com/domainname) to prevent namespace collisions (i.e. two services with the same name). by placing them in a directory structure like this, you dont have to worry about other peoples files overwriting yours (just like java packages).

In actionscript, you use dots, instead of slashes to refer to directory structure (com.domainname) (note, i think you can do it either way-mc).

Creating Flash Remoting Services with ColdFusion pages (.cfm)

ColdFusion pahes that are called through Flash Remoting have access to the "flash" variable scope, which contains all of the data sent from Flash.

The directory containing the page is considered the service, and the page name is treated like the function name.

simple flash remoting service in CFML

<!---package com.macromedia.flashforward--->
<cfset str = #flash.params[1]# />
<cfset flash.result = Reverse(#str#) />

This is a ColdFusion service that takes a string, and returns it in reverse. The params array is an array that contains all of the aruguments and data passed in from the Flash applicaiton (via Flash Remoting).

ActionScript:

NetServices.setGatewayURL(url); this tells Flash where the server is located.

var con = NetServices.createGatewayConnection(); //this returns a reference to the server.

var pageService = con.getService("com.macromedia.flashforward", this); //this gets a reference to the remote service. the second parameter, specifies where the functions that will handle the data sent back from the server will be (in this case on the same timeline as the ActionScript code).

(note : christian is running his presentation from a powerbook with OSX. He is running ColdFusion MX on OSX.).

Creating services for Flash using ColdFusion Components

A single ColdFusion Component can provide multiple services (implimented as functions). These can also be called directly from ColdFusion pages, or as web services.

note : code will be avaliable online.

ActionScript

Instead of specifying callback functions that receive the data from the server, on the main timeline, you should attach them to an object, so you keep the functions within their own scope / namespace.

var result = new Object();
result.onResult = function(data){//stuff here};

christian named his buttons the same as his remote service, that way he can use the button labels to decide which function to call:

function clickHandler(button){urlService[button.getLabel()](input.text);};

performing a databse query using a ColdFusion Component (CFCs)

The entire ColdFusion Query object can be returned directly to Flash. it will be converted to an ActionScript RecordSet object.

You can set a pagesize which determines the number of rows the server wil lreturn to the client until the client asks for more (i.e. only initially send first 10 rows of 1000). Server will then send the rest of the rows on demand (without going back to the database, only to Flash Remoting Adaptor).

Just use a regular CFQUERY tag to get a Query object. You can then return it directly to Flash using CFRETURN.

ActionScript

function that receives data from server:

function onResult(result)
{
//dataConsumer, dataProvider, labelString, dataString
DataGlue.bindFormatStrings(name, result, "#LastName#, #FirstName#"," #EmployeeID#")
}

note, my battery is running low.

ServerSide ActionScript

SSAS allows Flash Developers and designers access to server-side programming with almost no learning code.

simple SSAS service:

function sayHello()
{
    return "Hello World";
}

called the same way from Flash as you would call ColdFusion services.

my battery died. Christian showed some server side actionscript examples, and (connecting to DB and loading files).

he then showed an Flash App that used Flash Remoting to play mp3s off of his iPod. pretty sweet.

end of session.

4:03:42 PM    comment []  Google It!  

Dynamic Drawing with Flash MX : Robert Penner

The slides for this presentation are online.

Robert started off by showing off some of the Flash drawing experiments that have been done by the flash community (all to the tune of "Christmas on acid").

(btw, the room is packed).

Shape Drawing API

Every shape that you draw will be within a movie clip.

MovieClip.lineTo() : draws a line. initially it is invisble, so you need to use lineStyle to give it a color. starts at 0,0 coordinate of movie clip that it is contained within.

MovieClip.moveTo : moves the drawing point to a new position. does not do anything visible.

MovieClip.curveTo : draws curves. takes 4 numbers, two for each curve. control and anchors. anhors are where they end up, and control influences the curve. curves toward control points, but doesn't touch it.

MovieClip.beginFill : for creating solid shapes.

MovieClip.endFill :

If you are not at the starting point, then the final side will automatically be drawn to the starting point. you can then remove the line style (leave it empty), and it will remove the last line.

MovieClip.beginGradientFill : for dynamically creating gradient fills.

MovieClip.clear : will clear all drawings within movieclip. it resets drawing properties (such as linestyle).

framebased, use onEnterFrame event. First step is clear graphics from previous frame, and then draw. repeat. (try putting a lot of values set by random()).

showing more cool drawing api examples. (a bunch of 3d wireframe worlds by glenn thomas, a cad like drawing program, sam wan's mysterons, ).

extending drawing API.

MovieClip.drawLine() (see robert's site for notes / example code). takes a starting and ending corrdinate and draws a line.

showing a bunch of other custom drawing functions (triangles).

note, i had to leave early (halfway though).

2:39:16 PM    comment []  Google It!  

Flash, Lies and Videotape: Broadcast Flash Techniques Pete Barr-Watson, Pixelfury

I was planning on putting up notes on this session, but Pete is showing so much cool stuff that i forgot to take notes.

Basically, he is building video (quicktime, tv, etc) using Flash. Realy cool stuff.

2:17:43 PM    comment []  Google It!  

Macromedia Keynote

The keynote was awesome. To quote Lynda Weinman, "This was the best keynote ever".

It started off with Kevin Lynch talking about the Macromedia MX launch, the most significant and aggressive launch in the history of Macromedia.

Kevin then spent some time discussing usability in Flash, pointing out some of the books that have been written on the topic (skip intro, flash 99% good), and some of the people who have been pushing usability in Flash, such as Chris MacGregor of Flazoom.com, and more recently Jacob Nielsen. Kevin then talked about the importance of engaging in a discussion about Flash usability, especially with those who are critical, in order to learn from some of their arguments.

Kevin then discussed Macromedia Flash and Advertising, and pointed the incredible growth of the use of Flash in online advertising, and its successes. In august of last year, there were 100 million Flash advertising impressions a week. Today there are 1 billion impressions a week.

We then showed a Mike's hard lemonade Flash movie, that was created from a television commercial.

Kevin then invited me up on the stage, and we created a simple application using Flash MX, ColdFusion MX and Flash Remoting. Of course, I had some typos in my code, but after those were fixed, we created an app that used a new DataGrid component that we have been working on to display the results of a data base query that shows all of the FlashForward Session information.

Kevin then talked about some of the pioneering work done in computers in the 50's and 60's, and introduced a clip of a presentation by Doug Engelbart, and his famous 1968 video of distributed collaboration and real-time video in a graphical computer.

It is really hard to describe the excitement and electricity in the audience while viewing the clips. You will have to use the link above to view them. We showed the introduction to the presentation, and doug typing on the screen, and then a clip where he was collaborating with someone remotely (using text and video!).

Kevin then opened up a Flash Communication Server application, which linked him and Flash Forward to Palo Alto, California and Doug Engelbart. When he came through on the video, the audience gave the loudest and longest applause of the morning.

Doug talked about how after he got engaged, he realized he didn't have any long term goals. He decided that he should dedicate himself to making a positive difference to humankind, and that one way to do that would be to figure out a way to make communication and collaboration easier. Doug, who has actually used director in the past, said that he would like to see applications that make it simple to connect users via video, and then archive and search that video (as easy as searching and indexing text on the web).

After another long round of applause, Kevin asked Chris Hock from the Flash Communication Server team to come onstage, and build a Flash based communication application. Using the Flash Communication Server components (kevin noted they would be available soon), he built an application that had video windows, login element, a list of everyone connected, and a status light. He wrote no ActionScript at all. He published, and then some Macromedia people in the audience also connected via their webcams.

After that, the audience was invited to go to the computers, and ask questions via the app that was just built.

I spoke with a lot of people after the keynote, and everyone was really excited about the presentation and the communication server. This was definitely the best keynote that i have ever seen us present.

10:53:58 AM    comment []  Google It!  


© Copyright 2002 Mike Chambers.
 
July 2002
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Jun   Aug


Macromedia MX

Resources

Flash MX

Click here to visit the Radio UserLand website.

Subscribe to "FlashForward" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.