⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filmstrip.js

📁 多媒体播放器
💻 JS
字号:
//----------------------------------------------------------
// Copyright (C) 2008 XDev Software, LLC. All rights reserved.
// You may modify this code and needed and you can use this code
// at your own risk. XDev Software is not responsible for any 
// damages that may occur from this code.
//----------------------------------------------------------
// filmstrip.js

function createFilmStrip()
{  
    Silverlight.createObject(
        "xPlayerFilmStrip.aspx",                  // Source property value.
        parentElement,                  // DOM reference to hosting DIV tag.
        "slLightFilmStrip",         // Unique plug-in ID value.
        {                               // Per-instance properties.
            width:'210',                // Width of rectangular region of 
                                        // plug-in area in pixels.
            height:'425',               // Height of rectangular region of 
                                        // plug-in area in pixels.
            inplaceInstallPrompt:false, // Determines whether to display 
                                        // in-place install prompt if 
                                        // invalid version detected.
            background:'#ffffff',       // Background color of plug-in.
            isWindowless:'false',       // Determines whether to display plug-in 
                                        // in Windowless mode.
            //framerate:'24',             // MaxFrameRate property value.
            version:'1.0'               // Silverlight version to use.
        },
        {
            onError:null,               // OnError property value -- 
                                        // event handler function name.
            onLoad:null                 // OnLoad property value -- 
                                        // event handler function name.
        },
        null);                          // Context value -- event handler function name.
}

function moveFilmStripDown(sender, args)
{
    var objCan = sender.findName("filmImgCan");   
    var objCanHeight = objCan.Height;   
    var objCanTop = objCan["Canvas.Top"];
    
    var itemCnt = objCan.children.count;
    //each image is 100 x 100 and the strip holds about 3.25 images
    var maxScroll = (itemCnt * -110) + 325;
    
    if(objCanTop < maxScroll)
    {
        //alert(objCanTop);  
    }
    else
    {
        sender.findName("animationDown").begin();
        objCan["Canvas.Top"] -= 50;
    }
}

function moveFilmStripUp(sender, args)
{   
    var objCan = sender.findName("filmImgCan");    
    var objCanHeight = objCan.Height;   
    var objCanTop = objCan["Canvas.Top"];

    if(objCanTop > -30)
    {
        //alert(objCanTop);  
    }
    else
    {
        sender.findName("animationUp").begin();
        //objCan["Canvas.Top"] += 50;
    } 
}

function stopFilmStripDown(sender, args)
{
    sender.findName("animationDown").stop();
}

function stopFilmStripUp(sender, args)
{
    sender.findName("animationUp").stop();
}

function getMovie(sender, args)
{
    var objSender = sender;
    var movieName = sender["Tag"];   
    var strMovie = sender["Name"];
    
    getMovieDetail(movieName); //this function is located on xPlayer.ascx
            
    var player = new StartPlayer_0("divPlayer_0", strMovie);
}

//this is called from xPlayer.ascx.cs
function showClipDetail(message, context)
{
    var objText = document.getElementById('clipDetails');
    objText.innerHTML = message;
}

//this also goes and gets the details of the film
function doGlowClip(sender, args)
{
    sender["Opacity"] = 1.0;    
    var movID = sender["Tag"];   
    getMovieDetail(movID);
}

//remove the glow and details of the clip
function undoGlowClip(sender, args)
{
    sender["Opacity"] = .5;
}

function showThumbDetail(message, context)
{
    alert(message);
}

function doHighlightTriaUp(sender, args)
{
    var triaUp = sender.findName("btnTriangleUp");
    
    triaUp["Fill"] = "Yellow";
    triaUp["Stroke"] = "Black";
}
function undoHighlightTriaUp(sender, args)
{
    var triaUp = sender.findName("btnTriangleUp");
    
    triaUp["Fill"] = "#66666666";
    triaUp["Stroke"] = "Silver";
}
function doHighlightTriaDown(sender, args)
{
    var triaUp = sender.findName("btnTriangleDown");
    
    triaUp["Fill"] = "Yellow";
    triaUp["Stroke"] = "Black";
}
function undoHighlightTriaDown(sender, args)
{
    var triaUp = sender.findName("btnTriangleDown");
    
    triaUp["Fill"] = "#66666666";
    triaUp["Stroke"] = "Silver";
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -