Transparent background with My Avatar Editor Object


If you are using the javascript swfobject method for the hosted My Avatar Editor object you can use this code to give your avatar a transparent background:

<script type="text/javascript">
        //<![CDATA[
        var avatarvalue = "<?= $avatarid ?>";
        var avatarURL = "myavatarcharacter.swf?avatar=" + avatarvalue;
        swfobject.embedSWF(avatarURL, "avatarSWFContainer", "160", "200", "10.0.0", null, {hosted:"true"},{wmode:"transparent"});
        function setFacialFeature(){
                var avatarSWF = document.getElementById('avatarSWFContainer');
                avatarSWF.draw();
        }
        //]]>
</script>

The only bit you need to change from the default code is the parameter which is the {wmode:”transparent”} bit

Leave a Reply

Your email address will not be published. Required fields are marked *