Distant Measures product announcement

Blog posts have been scarce on Studio Sedition because we've been busy releasing our latest product: Distant Measures.

Distant Measures encompasses all the features of typical email marketing software such as newsletter creation, templates, list management and statistics. However there are many tools not leveraged in other software that can help you retain your audience and deliver your messages more effectively. Automatic event, research and podcast integration with newsletters, social networking and RSS syndication are a few of the additional ways Distant Measures helps differentiate your marketing and broadcast your message to a larger audience.

We offer a free account to get you started and for a limited time get $10 off any account for the first month with the following coupon code DM09-10OFF. Visit www.distantmeasures.com to check out the full list of services we offer or check out our product blog to get the latest updates.

Labels: ,

ffmpeg on vexxhost

I'm currently working on a video conversion project on a vexxhost server using ffmpeg. I was using this article as a guideline for conversion on the vexxhost server, but apparently the ffmpeg_movie class does not exist... after some digging I found a solution.

First, download the getid3 package in order to access all of the properties you'll need from your uploaded videos. It may not be a pretty as using the ffmpeg_movie class, but if you don't have the option and you're hung up on using a class, you can always write your own.

require_once('getid3/getid3.php');
$getID3 = new getID3();
$fileinfo = $getID3->analyze('path/to/originalfile');
getid3_lib::CopyTagsToComments($fileinfo);
if(!empty($fileinfo['video']['resolution_x'])) echo '

Video width: '.$fileinfo['video']['resolution_x'].'

';
if(!empty($fileinfo['video']['resolution_y'])) echo '

Video height: '.$fileinfo['video']['resolution_y'].'

';
exec("/usr/local/bin/ffmpeg -i 'path/to/originalfile' -ar 22050 -ab 32 -f flv -s ". $fileinfo['video']['resolution_x'] ."x". $fileinfo['video']['resolution_y'] ." 'path/to/convertedfile'");

Labels: , ,

Query String to Object

One thing that has always bothered me about PHP is referencing associative arrays for queries, sessions, etc. Here's an example of a quick fix using type casting to make your development a little more object oriented.

$query = (object)$_GET;

Now, instead of referencing: $_GET['property']
We can use: $query->property

Note: This only works in PHP5 and above.

Labels:

ActionScript Tips

The Five ActionScript Tips in Five Days blog series for Peachpit is now complete. You can always find these blog posts, along with other articles at www.studiosedition.com/articles or you can subscribe to the Studio Sedition article feed. The blog series is an example of what can be found in my latest book The ActionScript 3.0 Migration Guide, The: Making the Move from ActionScript 2.0.

Labels: , ,

Label Statements

This week I join the Peachpit Commons Blog with five ActionScript tips to help make your transition from ActionScript 2 to ActionScript 3 a little less painful.

First up, Label Staments.

Labels: ,

videoPlayer, a reserved word?

I have been going crazy trying to determine why I could not add an FLVPlayback component to my AS2 application without creating an infinite loop. Apparently, I had a movie clip that contained the FLVPlayback I was attempting to add, which was named videoPlayer in the library. I'm happy I can rest now, but it leaves me wondering, is videoPlayer a reserved word?

Labels: ,

FileReference to download server-side file

I was asked today how to download a server-side file through the FileReference object. The issue was that the server-side file was executing before downloading. The FileReference object uses http, rather than ftp, to download files, so any server-side script will execute before being downloaded. You either need to zip it and use the zip as a download or use an intermediate server-side file to write and return a server-side file for download.

Labels: , , ,

Casting: String to Boolean

Convert the string value of a number to a Boolean with AS:

Boolean(Number("0"))

Labels: , ,