
We were tasked with creating a full Flash website to showcase user-generated video content for a contest that a local restaurant chain (Rosa’s Cafe) is currently running. Any patron to their restaurant is encouraged to film themselves going crazy for Rosa’s. They can upload their video at www.crazyforrosas.com and be eligible for $5000 or a FlipVideo camera.
When tasked with this we decided to use YouTube for the actual storage of the video content. To do this, sign up for a YouTube account and begin uploading some content to begin testing. You can easily take advantage of the YouTube API and RSS feeds to pull the information in Flash.

To access YouTube’s RSS feed, you’ll need to create an intermediary to avoid the cross-domain security protection. We used a PHP script to snag our RSS feed so we can display it on our server.
<?php
#readxml.php
$file = "http://www.youtube.com/rss/user/username/videos.rss";
$handle = @fopen($file, "r");
if ($handle) {
while (!feof($handle)) {
echo fgets($handle, 4096);
}
fclose($handle);
}
?>
In Flash, you’ll need to call readxml.php (the above script) as XML and parse it out accordingly. It helps to have a real strong knowledge of XML parsing to get your way through it since there’s a lot of info in the feed that you won’t need. It will give you thumbnail locations, titles, descriptions, video links, etc. One problem that I found is that it’s very difficult to use the YouTube ActionScript API. There is not very much documentation. Opening one video is fine, open another one and Flash will crash. The API says to use the destroy(); command prior to opening another video, but it does not work. I found some help on their forums to help us - but the solution was not some handy ActionScript. It was to use a free component called ToobPlayer. This was most certainly a life saver after spending hours on YouTube’s API and not getting anywhere. The ToobPlayer component can easily use a YouTube video url and be skinned. A big thanks goes out to those folks!
This site also features a full administration panel using CakePHP to administer video submissions and a Flash front-end video upload feature.
Visit Crazy for Rosa’s

Download includes versions for 4×3 and 16×9 aspect ratios.
I’ve created a video player that you can use for free that is easily customizable. The cool thing is you don’t need to open Flash to change the video you want it to display. Just write is as a variable in your embed code like this:
<script type="text/javascript" language="javascript">
var so = new SWFObject("/examples/videoplayer/video_4x3.swf", "mymovie", "500", "405", "8", "#000000");
so.addParam("menu", "false");
so.addParam("scale", "noscale");
so.addParam("allowFullScreen", "true");
so.addVariable("myVideo", "vid1.flv");
so.write("flash");
</script>
Note so.addVariable(”myVideo”, “vid1.flv”); All you need to do is change vid1.flv to the video of your choice.
Enjoy!

I just got this thing in the mail today. I’ve been using one at work lately for some quick & dirty video and audio recording. This thing is perfect for convenience. It’s not the greatest in terms of quality, but I love it because the thing is so dang easy to use. It fits in your pocket, has 1-button recording, and has built-in USB. This is a lot better for me at home to take some videos of my 1 year old rather than trying to keep up with our Sony (battery charged? is this a new tape?). It runs off 2 AAs and stores the videos using what must be some type of Flash memory.
My Flash/XML Portfolio Template is getting some nice words and it sits atop the Flashden top files of the week. Check out my file
I’ve always wondered how some of the cool sites out there are using full-size images that resize with the browser window and take up the entire screen. I’ve made some hacks that have worked ok in the past, but not as good as this. Coming across code or a formula in my searches hasn’t been to much of a great help. I am using smoothImageLoad to convert the loaded png, jpg or gif to a smooth bitmap. Enjoy!

// Use Tween class to fade in the image
import mx.transitions.Tween;
import mx.transitions.easing.*;
var stageListener:Object=new Object();
stageListener.onResize=function(){
position();
};
Stage.align="TL";
Stage.scaleMode="noScale";
Stage.addListener(stageListener);
// Reposition objects when the movie is resized
function position() {
// Find new value of stage size
var W:Number = Stage.width;
var H:Number = Stage.height;
// Find center of stage
var centerX:Number = W/2;
var centerY:Number = H/2;
// Center main bg clip
background_mc._x = centerX;
background_mc._y = centerY;
// Center target clip inside the main bg clip
background_mc.target_mc._x = -_global.BGW/2;
background_mc.target_mc._y = -_global.BGH/2;
var imageRatio:Number;
var imageXRatio = W/_global.BGW;
var imageYRatio = H/_global.BGH;
// Determine if the width is larger than the height
if (imageXRatio>imageYRatio) {
imageRatio = imageXRatio;
} else {
imageRatio = imageYRatio;
}
// Scale the image to fit fullscreen
background_mc._xscale = background_mc._yscale=imageRatio*100;
}
// Function for smoothing resizable bitmaps
function smoothImageLoad(imgURL, targetMovie) {
var i = 0;
do {
i++;
} while (eval("_root.smoothImageLoadTemp"+i) != undefined);
tmc = targetMovie.createEmptyMovieClip("smoothImageLoadTemp"+i, targetMovie.getNextHighestDepth());
tmc.createEmptyMovieClip("ti",tmc.getNextHighestDepth());
tmc.tm = targetMovie;
with (tmc) {
tmcl = new MovieClipLoader();
tmcl.onLoadComplete = function() {
var fadeBG:Tween = new Tween(targetMovie, "_alpha", None.easeOut, 0, 100, 1, true);
ti.onEnterFrame = function() {
pixelData = new flash.display.BitmapData(ti._width, ti._height);
_global.BGW = ti._width;
_global.BGH = ti._height;
pixelData.draw(ti);
tm.attachBitmap(pixelData,1,true,true);
tm.smoothImageLoadComplete();
_parent._parent._parent.position();
removeMovieClip(ti._parent);
};
};
tmcl.loadClip(imgURL,tmc.ti);
}
}
// Load your image
smoothImageLoad("image.jpg",background_mc.target_mc);

I’m currently mega-addicted to this real-time strategy game. It’s a game (comes with a 150 page manual) pretty much for hard-core strategy gamers and history buffs. This game lets you pick any nation in the world to begin with and you can start from 1452 and play for hundreds of years. You can set your own goals for your nation big and small. The world is astonishingly vast. It seems that there are thousands of provinces to discover (conquer). Right now I’m currently kicking all kinds of A playing as Portugal.

I’ve always been inspired by Craig Mullins and I’ve read enough Photoshop tutorials to get me inspired to create a dramatic piece of art. I still have a good ways to go with this art form, but I gave it a good first attempt. I’ve created this image from a few pictures from sxc.hu and used a ton of layering, brush work and blending modes.
My blog site has now come to fruition! I’ll be writing about Flash, ActionScript, Photoshop, video, After Effects, Premiere, 3D, Flex, beer and most importantly bratwurst.