Save Time Converting SVG’s to Raphael.JS

At Thinkbigr we’re working on a really sweet side project relating to… Well, you’ll just have to wait and see. What I can tell you is that we had an image set that we wanted to let users interact with and were extremely eager to test out SVG interaction in the browser! We tested a few different libraries and jQuery plugins and ending up going with Raphael.js, which we feel is one of the best out there.

The biggest headache that we encountered was converting all of the paths, shapes, etc. over to JavaScript.  It’s not hard, but it takes a ridiculously long time to do if you have a heavy SVG file to work with.  Also, what if you make a few changes to the SVG? Ughhh!  We came across a few converters but they all sucked in one form or another and the resulting SVG never looked [more]

The BEST Book to Learn Ruby on Rails?

Whether you’re an experienced programmer or a noob in the field, learning a new language can be a difficult task if you don’t have a good source to learn from. When I started my dive into PHP 8 years ago I read through countless books and sites trying to get a solid understanding of the ins and outs of the (then) currently trending language. What I came to realize was that majority of the resources I came across made it even more confusing. Before I go any further, let me be clear that I had no previous programming knowledge; I never stepped foot in a university and barely crawled my way out of high school! I couldn’t stand books filled with a bunch of tech jargon bullshit than I could barely pronounce. Not too long after, I had a shelf filled with (barely) half read books and a weakening desire [more]

Using a MAMP Database with Ruby on Rails

One of the first hurdles that I came across after making the move to Ruby (and Rails) from PHP was utilizing some of my previously created MySQL databases in MAMP. I have always been a fan of MAMP as a PHP developer because it was extremely easy to setup a project and get coding. It was not as simple with Rails, however!

I soon realized it was not as easy as setting the host parameter to localhost and letting the language do all of the magic. The solution is to pass the absolute path of the MySQL socket inside the MAMP directory to the socket option in the app_path/config/database.yml file.

development:
adapter: mysql2
database: development_database_name
username: root
password: root
socket: /Applications/MAMP/tmp/mysql/mysql.sock

The path of the [more]

Au revoir, PHP

So, after 8 long years I’ve decided to say goodbye to my long time friend PHP and start a new life with a much sexier language – Ruby. For as long as I can remember, I’ve let budgets and deadlines hold me back from using a language I truly wanted to develop in. I’ve created 100′s of websites and applications in PHP and used all the great frameworks like Zend, CakePHP and Drupal ; just to name a few. However, over the past year or so I have read numerous books and built some pretty sweet personal projects using Sinatra or Ruby on Rails and have been completely sucked in by the sexiness of the language and the awesome community. It’s been almost impossible to make this switch, but it’s time!

I’m going to start writing articles along this journey about issues that have me stumped, tips and tricks that might [more]

StageWebView Videos

Create StageWebView instance and load video:

var webView:StageWebView = new StageWebView();
var path:String = ‘file://path_to_video/video.mp4′;
webView.stage = this.stage;
webView.viewPort = new Rectangle( x, y, width, height);
webView.loadURL(path);

Dispose and remove:

webView.reload();
webView.viewPort = null;
webView.dispose();
webView = null;

Playing .mp4 Videos in the Native iOS Video Player with StageWebView

I’ve been working on an iPad app using the AIR 3.0 SDK alongside the Flash iOS compiler and ran into a speed bump today trying to find a solid, fully working solution to accomplish this task. My goal was to have a video launch inside the native iOS video player allowing the user to use the latest AirPlay feature in iOS 5. I came across a few descent solutions including the FLVPlayback component, Video API, and the all new StageVideo API, but none of these provided me with everything I needed. The StageVideo API is a great solution and will allow your app to utilize the devices hardware acceleration capabilities. The major drawback is that the StageVideo object is not part of the display list and hides behind all other display objects.

I decided to use the StageWebView API, which displays HTML content in a stage view port. [more]

Simulate click on browse button like Flash using jQuery

In this article I’m going to show you how to create a flash style browse button without the ugly input field similar to the flash one WordPress uses for their upload forms.

First thing we need to do is create the button element that when clicked will launch the file selection window.

<button>Select Files</button>

Next we’ll create the css styles for the button to make it look similar to the button WordPress uses. We are going to use the new CSS3 border-radius property to achieve the rounded edge result without the need for a background image, as well as a background gradient. You will see a rectangular button if your browser does not support the border-radius property (or a vendor-prefixed alternative version) and a solid white background on the button if CSS3 gradients aren’t supported.

button {
border: #666666 1px solid;
text-shadow: 0 1px 0 #FFFFFF;
[more]