tags:

views:

26

answers:

0

so i have the below code, which I think is fine:

jQuery( function() {
    jQuery("#slider-vertical").slider( {
        orientation :"vertical",
        range :"min",
        min :0,
        max :100,
        value :50,
        slide : function(event, ui) {
            jQuery("#amount").val(ui.value);

            var movie = thisMovie('ClusterFlash');
                fromScroll = jQuery("#amount").val();

            if (movie) {
                currentSentiment = ((100 - fromScroll) / 100);
                movie.sentimentChange(currentSentiment);
            }
        }
    });
});

the 'movie' var above calls the following function, which seems to be where my problem is.

function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName];
    }
    if(document[movieName].length != undefined) {
        return document[movieName][1];
    }
    return document[movieName];
}

Any help would be appreciated. Thank