<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://www.reallusion.com/crazytalk/Unity/samplecode/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/SampleCode4/Actor.uctproject", {
                    playAfter: 0,

                    idleMotionUrl: "http://www.reallusion.com/crazytalk/Unity/samplecode/SampleCode4/Affirmative.uctidle"
                });
            });
        });


        function Actor1() {
            player.loadActor("http://www.reallusion.com/crazytalk/Unity/samplecode/SampleCode4/Actor3.uctmodel", {
                showActor: true,
                idleMotionUrl: "http://www.reallusion.com/crazytalk/Unity/samplecode/SampleCode4/Affirmative.uctidle"
            });
        }


        function Actor2() {
            player.loadActor("http://www.reallusion.com/crazytalk/Unity/samplecode/SampleCode4/Actor2.uctmodel", {
                showActor: true,
                loaded: function (status) {
                    console.log("Actor loaded!");
                }
            });
        }
    </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>
        <tr>
            <td>
                <input type="button" value="Actor1" onclick="Actor1()" class="button" />
                <input type="button" value="Actor2" onclick="Actor2()" class="button" />
            </td>
        </tr>
    </table>

</body>

</html>