Apr

4

I’ve been fortunate enough to work on the Mickey’s beer site for three years now. And each year the pieces we add on are recognized and awarded. This year was no exception. The Mickey’s site received the following at the regional ADDYS and are moving on to nationals:

3 GOLDS

  • Mickey’s Puzzle Generator – Mini-Site- INTERACTIVE MEDIA
  • Mickey’s Puzzle Generator – Banner Ad – INTERACTIVE MEDIA
  • Mickey’s MMA Q&A – Mini Site – INTERACTIVE MEDIA

5 SILVERS

  • Mickey’s MMA Q&A – Tito Ortiz – INTERACTIVE MEDIA
  • Mickey’s MMA Q&A – BJ Penn – INTERACTIVE MEDIA
  • Mickey’s MMA Q&A – Kendall Grove – INTERACTIVE MEDIA
  • Mickey’s MMA Q&A – Banner Campaign – INTERACTIVE MEDIA
Thank you ADDY committee!

 

Dec

17

Rails Edge introduces Rails Metal, based on Rack. Think of it as a way to bypass the Rails framework on certain requests. DHH gives the example of the Campfire chat application. I’m thinking about Flash Remoting (AMF). No reason to really call a controller, walk through the Rails stack, just to have separate logic query the database and return a serialized object. This could make Remoting through Ruby really really fast.

Riding Rails: Introducing Rails Metal.

Nov

12

Adobe Updater knows about the CS3 update that adds AIR support to my purchased copy of CS3, but alas, it fails on installing the update. Highly annoying considering how many times the Updater pops up.

Adobe Update fails again

Adobe Update fails again

Sep

5

Hopefully someone at Adobe is listening. The 9.0.2 updater for Flash CS3 is broken. I ran into the issue yesterday when trying to install the AIR extension. Running the 9.0.2 updater results in the following error:

I removed all extensions. Even completely removed and reinstalled Flash. No luck. Looks like others have run into a similar issue with updating Illustrator. The built in updater doesn’t even see this update.

I need to install the AIR extension. Hopefully someone has a way around this.

Aug

1

Reason #488 to hate IE6. I just finished banging my head against the IE6 wall again, trying to figure out why a simple getURL call to a JavaScript function would happen randomly and fail randomly. Works fine 100% of the time in other browsers, including IE7. The call was simple: getURL(”javascript:swapBG(true)”); nothing fancy, no dynamic vars, nothing. It would work correctly the first two or three times, then all of the sudden The Flash Player and IE6 would treat the “javascript:swapBG(true)” as a URL string versus a JS call and would place the string in the address bar and try and refresh the page. Huh? No idea why it would work correctly the first few times and then stop. No popup action, so no blocking. All other JavaScript calls in the Flash were working. Just this one particular call. Odd. Tried nearly everything. Moved it to another frame. Added return false; to the AS and the JS. Nothing.

In the end, I switched it to an ExternalInterface call and magically it works consistently. Fun. Actually not so much.

Jul

23

Perhaps something already exists that I am unaware of, but I could really use something in Flash similar to the open file window in Textmate. Organizing symbols in Flash is an art form already. So follow along: In Textmate I have a project open. Rather than drilling down into /com/mikekrisher/vo/Something.as, I simply hit command + t and a simple window opens where I can start typing a file name and it does the Google suggestions thing and shows a list of matching files. Choosing one opens it obviously.

I want the same thing in Flash. Hit a keystroke. Start typing the symbol name. Get a list of matching symbols. Choose one to open it up so I can edit it. Much faster than drilling down in the library and double clicking it.

Picky, picky, I know.

Apr

14

I’m in the middle of a project that had a catalog of SWFs as content. The catalog needs to be edited/modified. I’m using CakePHP as the framework. The beta version of CakePHP 1.2 introduces something burrowed from Rails called Request Handlers. This works perfect for what I am needing to do. My SWFs are stored in a database as blobs. I am going to retrieve them using AMF (i.e. Flash Remoting). But I need a convenient way to server them, rather than digging through a filesystem. So I am going to use Request Handlers.

The idea is pretty simple. I want to be able to call a controller action something similar to /give/me/swf/number/14. So I am looking for a SWF with ID 14 in the database table. BUT, it would be cool if I could also serve up a corresponding GIF if the user doesn’t have the plugin. Request Handlers allow me to do this with little worlk. My controller can handle requests and react depending on file extension. So something like /give/me/item/index.swf?id=14 and /give/me/item/index.gif?id=14 would deliver either a SWF or a GIF depending. No extra logic in the controller needed. Pretty cool.

There are a couple of things need for this to be setup correctly in CakePHP. First you have to set the Request Handler for SWFs. This goes in the app_controller

/**

* setContent – used to setup request handler for swfs

*

* @return void

**/

function setContent()

{

$this->RequestHandler->setContent(‘swf’, ‘application/x-shockwave-flash’);

}

Next, you need to set the content in the beforeFilter of the controller that is going to react:

/**

* prior to rendering

*

* @return void

**/

public function beforeFilter()

{

$this->setContent();

}

Then in my controller action, I do something similar to:

$this->set(‘file’, $this->Symbol->findByid($this->params[‘url’][‘id’]));

This sets the data for my view, which I have to create corresponding views for extensions so I respond with the correct mime types. So if this is in a medias controller, I need /views/medias/swf/index.ctp. Inside that I set the MIME info:

<?php

// Output the MIME header

header (“Content-transfer-encoding: binary”);

header (“Content-Type: application/x-shockwave-flash”);

header (“Content-Length: ” . $file[‘Symbol’][‘size’]);

header (“Pragma: public”);

header (“Expires: 0”);

header (“Cache-Control: must-revalidate, post-check=0, pre-check=0”);

header (“Cache-Control: private”);

// Output the flv

print $file[‘Symbol’][‘file’];

?>

Hopefully I didn’t forget any pieces. I wanted to write this up right when I did it, mostly so I wouldn’t forget the steps, but unfortunately that didn’t happen. Leave comments if I forgot something.

Jan

22

for anyone else out there that is using the casaframework and in the end their SWF is being loaded into a SWF at a remote directory, you are going to run into security sandbox issues. reason being the use of _root in a number of classes used mostly to create empty movieclips. in order to alleviate the issue, you could simply use a _lockroot, or go through and replace the _root paths with _level0 etc… I ran into them existing in classes like “enterframe” and i believe “framedelay.”

not sure if i am sold on frameworks in flash or not. i think as a developer wanting to implement a framework you really have to understand classes and the ideas of object orientation, otherwise you could just be adding a bunch of bloat to your SWF, and making it hard for others to debug/troubleshoot if they have to pick up the file and run with it. not to mention you run the risk of deploying code that you are not 100% familiar with, which could result in the situation described above where something simply stops working when loaded into a remote SWF.

Jan

3

Last night I was working on a project where I am extending Wordpress to include a couple of CMS responsibilities. Among them is a way to update the homepage content of the site, using FLVs. The admin will have the ability to update the homepage with either an image or an FLV, along with some accompanying text. Rather than write the files to the file system, I decided to try storing the binary data as a blob in mySQL.

First thing I did was add a “homepage” tab to the top of Wordpress, then add the necessary form fields. Inserting the binary data was no problem. Onto retrieval on the actual homepage.

Next was some logic to determine if an image or an FLV was uploaded. Images produce an IMG tag. FLVs produce a shell video player(SWF), which then calls a PHP script as the path of the FLV. The PHP script retrieves the FLV from the database and delivers it just as if the shell was retrieving a FLV from the file system. This can be somewhat tricky I found. A couple of small details are required for the SWF to recognize the FLV using standard Flash Components. Mostly, a couple of headers have to be set, including mime type and file size.

Make sure to write the uploaded file’s file size to the database for easy retrieval. Then I used the following headers before simply spitting out the file.

// set $size and $file with the details from your database

// Output the MIME header

header (”Content-transfer-encoding: binary”);

header (”Content-Type: video/flv”);

header (”Content-Disposition: attachment; filename=”watch.flv”");

header (”Content-Length: ” . $size);

header (”Pragma: public”);

header (”Expires: 0″);

header (”Cache-Control: must-revalidate, post-check=0, pre-check=0″);

header (”Cache-Control: private”);

// Output the flv

print $file;

Fairly quick and easy to implement and removes the obstacle of file writing permissions on some hosts. Performance has been fine so far. Wordpress can actually make a great CMS.

Jul

11

Pownce had me really excited reading through the features. I like the fact that it has a dedicated AIR client. That is fun to play with. I liked Twitter for their IM bot. I don’t like the Web interfaces as much because it is not an instant communication like IM is. Otherwise it just becomes lite weight email to me.

The biggest feature I was looking forward to with Pownce was the “group” feature where I could group sets of contacts together and notify them all with one message. I really want a way to do this with SMS, but that is another story. So I am trying the group thing and it works. But Pownce is missing a couple of things that would really make it useful. Like IM integration and SMS integration. I am sure they are working on both. This enables me to alert my team to things immediately. Like that I am rebooting the development server, or leaving for lunch. Right now, my team members would need to be staring at their AIR client, or the Web site, or email to see my notification immediately. I can’t count on that, and actually hope that is not what everyone is doing all the time. So, as a quick solution, I would suggest Pownce add some sound notifications for new messages, or exploit AIR a little more and do something onscreen that attracts attention. AIR can play with the operating system nicely, so tie into some of that functionality to make it a little more like IM clients. I know this is supposed to be different than IM, but I see it the same and I imagine others do as well. But they are certainly onto something with this “group” functionality. It would be awesome to use this in the ways I described above.

This is a great AIR client. It’s obviously alpha. So many really cool things could be done with it since it is Flash. The alerts could be cool. You could add video chat, and audio chat. It could be everything I wish Jabber was, but just hasn’t hit the mark on. Congrats Pownce team, I think you are onto something.

keep looking »

Linkroll

Recent Projects