<html>
<head>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript" src="https://ssl-webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js"></script>
    <script type="text/javascript" src="http://ctinteractive.reallusion.com/ctinteractive/1.0/CTWebPlayer.min.js"></script>
    <script type="text/javascript">
        var player = new CTWebPlayer();
        $(function () {
            player.playerUrl = "http://www.reallusion.com/crazytalk/Unity/samplecode/CTWebPlayer.unity3d";
            player.init($("#unityPlayer"), function () {
                player.loadProject("http://www.reallusion.com/crazytalk/Unity/samplecode/SampleCode16/Interaction_mouse_event.uctproject", {
                    playAfter: 0,
                    idleMotionUrl: "http://www.reallusion.com/crazytalk/Unity/samplecode/SampleCode16/Affirmative.uctidle"
                });

                var ShowOrHide = false;

                player.loadForeground("http://www.reallusion.com/crazytalk/Unity/samplecode/SampleCode16/logo.png", {
                    name: "Reallusion",
                    zOrder: 0,
                    alpha: 0,
                    x: 0, y: 0, width: 20, height: 8
                });

                player.bind("click", function (event) {
                    switch (event.button) {
                        case 0:
                            ShowOrHide = !ShowOrHide;
                            player.showForeground("Reallusion", ShowOrHide, 2);
                            break;
                        case 1:
                            break;
                        case 2:
                            break;
                        default:
                            break;
                    }
                });
            });
        });
    </script>
</head>

<body>
    <table style="text-align:center;margin-left:auto; margin-right:auto;">
        <tr>
            <td>
                <div id="unityPlayer" style="width: 640px; height: 480px;">
                </div>
            </td>
        </tr>
    </table>
</body>
</html>