Flash Upload Update for "A script in this movie is causing Flash Player to run slowly" Problem

Posted by: Matt Kull Sun, 22 Apr 2007 19:44:00 GMT

The last version of my flash multiple upload script would spawn an alert box containing the message “A script in this movie is causing Flash Player to run slowly” after the script had been open for 15 seconds. Even if the user chooses to let the script run, the window will pop up again every 15 seconds.

Flash Alert

This obviously is a huge problem, as many users will unknowingly abort the script. You can Read More about the issue through Adobe’s Technotes.

The fix was to add a dummy onEnterFrame event which refreshes the timer. I have updated my code here

The only update was to change how I initialized the movie in multipleUpload.fla, and to attach the onEnterFrame event handler.

import com.vixiom.utils.MultipleUpload

System.security.allowDomain ("*.localhost.com");
var uploadMovie = null; 

_root.onEnterFrame = function() {
    if (this.getBytesLoaded() / this.getBytesTotal() > 0.99) {
        uploadMovie = new MultipleUpload (this.files_dg, this.browse_btn, this.upload_btn, this.cancel_btn, _root.object_type, _root.object_id, _root.token);

        _root.onEnterFrame = function() {
            trace ("onEnterFrame called");
        };
    }
};

Posted in ,  | 3 comments

Rails Multiple File Upload

Posted by: Matt Kull Sun, 18 Mar 2007 20:02:00 GMT

For the photos feature on YourBarGuide I needed a way for users to easily upload multiple files at once.

Read on about the different options I looked at, and how I finally settled on a Flash upload widget

Read more...

Posted in ,  | Tags , ,  | 14 comments

Rails: How to regenerate file_column images

Posted by: Matt Kull Tue, 13 Mar 2007 03:49:00 GMT

The rails plugin file_column provides a simple method of handling uploading files. I am using it to store location “avatar” images. The image needs to be resized into several different versions, and file_column handles this nicely with one method call in my model.

file_column :image, :magick => { 
         :versions => { :square => "75x75!", 
                        :profile => "275x260" 
                      }
        }

However, recently requirements changed. I now needed an additional version of the image and change the sizes of the old versions.

Since file_column does not provide an out of the box method of regenerating the images, and I had several thousand records with images associated already I had a problem.

Read more...

Posted in ,  | Tags ,  | 2 comments

State of the Project Address

Posted by: Matt Kull Tue, 30 Jan 2007 05:00:00 GMT

And now for this year’s blog post…

YourBarGuide is coming along. Charlie has been working on a redesign, which is really coming out awesome. So many nightlife sites really do not put much effort into their design, and end up super cheesey, unusable, and graphically overloaded. The only “night life” site I have found which really has a clean design is the latest incarnation of philly2night their designers did a great job.

We are focusing on a something that is light weight with usability as main emphasis with a minimization of gaudiness. Here is a sneak preview of a portion of the new header…

YBG Header Preview

Two items are present in that header are indicators of what is new. An Events management system is in place, as is user-submitted photos. These features are currently available for testing. An Evite style Guest List system is still being being worked on for events and once that is complete all of the major features needed for launch will have been implemented. (they may be a little rough around the edges, but the core is there)

In other news the yourbarguide.com site is no longer public. Previously created accounts will get you access, if you would like access use the form on the beta splash page. The site will remain closed until the new design is in place and testing is completed.

Code-wise things have been going well, I have really enjoyed working with Rails. There is no way I could be close to this far along with the site using any other framework I am familiar with. The test will come when it comes time to make it perform.

In the course of development to date I have created several plugins which I hope to at some point clean up enough to release. Acts_as_picturable, acts_as_mappable, and acts_as_searchable. I don’t foresee that happening in the near future however, as the current priority is to get the site finished.

Posted in , ,  | 1 comment

Ratings, Ratings, Ratings

Posted by: Matt Kull Fri, 14 Apr 2006 02:36:00 GMT

I’ve been trying to figure out how to handle “rating” different bars.

The end goal is have a very drilled down rating system whereby a user could see all of the top-rated sports bars; the top-rated beer bars; the cheapest bar with a good singles scene; etc.

My initial implementation was to have four fixed rating types using an AJAX “Star Rater”. (an ajax star rater is what sites like Netflix and Ajaxian use) I found a couple premade scripts, but ended up throwing them away and coming up with my own. You can see it in action on any location detail page

The problem is, different ratings only make sense for certain bars. IE Monk’s Is a belgian beer bar… it does really make sense to have a rating for “Dancing”. (in a different sense it actually does, the rating should be “n/a”)

My solution was to set it up such that bars have a many-to-many relationship with rating types. For instance now Finnigans Wake can have a “Dancing” rating and Monks can have a “Beer Bar” rating.

We’ll see how this pans out. Currently I have 22 different rating types. Putting all of these on one page would be way too cluttered. But I still need to figure out a way to present to the user why certain ratings only apply to certain bars.

Ok its 10:45, Thursday night, and I think I need to go do some “research” :D

Posted in , , ,  | no comments | 2022 trackbacks

Google buys RoR App...

Posted by: Matt Kull Wed, 15 Feb 2006 03:29:00 GMT

It was announced today that Measuremap was bought out by Google.

This is especially interesting because it never even got out of a closed alpha test.

I signed up for the service a couple weeks ago, I never got an invite to try it out though. Basic jist of it that I got was blog hit and stat tracking on steroids.

Measuremap was being created by the folks at Adaptive Path (remember them? these are the same guys that cointed that damned AJAX term which helped jumpstart all this “web2.0” business)

This is also the first big buyout of a ruby / rails based application I’m aware of. Too bad they didnt disclose the price… Any guesstimates?

People may be surprised Measuremap was bought this early, but I think it makes a lot of sense. The Adaptive Path guys don’t have to worry about competing with the powerhouse that is google analytics (urchin), and google gets some great talent at (what I assume was) a reasonable price.

Read about it here…

Posted in , ,  | Tags , , ,  | no comments | 1345 trackbacks

acts_as_mappable

Posted by: Matt Kull Mon, 13 Feb 2006 05:14:00 GMT

A common need in ybg is the ability to be plot different models (users, bars, restaurants, neighborhoods) on a map.

I think this common functionality would be useful as a rails plugin and I am working on packaging it up into a new plugin called acts_as_mappable.

The goal of this plugin is to abstract away grabbing an address and retrieving geocode information. I’ll see if I can fit in distance calculations also.

Posted in , ,  | Tags , ,  | 9 comments | 1624 trackbacks

yourbarguide.com

Posted by: Matt Kull Mon, 13 Feb 2006 04:55:00 GMT

For the past couple of months I have been working on a social neworking / location based vertical search engine. (hooray for buzzwords)

Theres lots of social networking sites out there (myspace, friendster, facebook, and the newest contender tagworld). Examples of vertical search based sites would be tripadvisor or citysearch

What I envision is something along the lines of myspace meets citysearch meets imdb.

The site is not ready for public consumption yet, but within the next couple of weeks an early stage prototype will be up.

Posted in , ,  | Tags ,  | no comments | 6961 trackbacks

Textdrive Lighttpd Guide for Multiple Domains and Multiple Rails Apps / Sites

Posted by: Matt Kull Sat, 04 Feb 2006 21:31:00 GMT

Getting my rails sites up and deployed with lighttpd took a bit of time and research.

Lighttpd: The painless way is the essential guide and is just plain awesome. These tidbits here are mainly for my own reference, but they may prove useful.

With a bit of mucking around, I was able to get multiple rails apps on multiple domains hosted on my one textdrive account.

These are the steps I took…

Read more...

Posted in ,  | Tags , , , ,  | no comments | 52786 trackbacks

Query By Example (QBE) in Rails

Posted by: Matt Kull Fri, 03 Feb 2006 18:51:00 GMT

There is no built in equivalent in ActiveRecord to Hibernate’s Query By Example

Basically, Query By Example lets you create an object, set the fields on the object, and then query the database by providing that object as an example.

This is especially useful in a search situation, lets say I want to search on the attributes of a person. Person has a firstname, lastname, address, and lots of other searchable fields. Rather then having to worry about dynamically generating the SQL, I simply instantiate a person object, set the fields I want to search by, and use that object as my :conditions.

Heres a good base block of code to work off of…

Read more...

Posted in ,  | 3 comments | 858 trackbacks

eXTReMe Tracker