Posted By

gogomx3 on 07/22/11


Tagged

icon draw picture Skype emoticon paint


Versions (?)

SkypeMania


 / Published in: JavaScript
 

URL: http://cyberbg.com/SMO/smdemo/

Fun opportunity for smaller users of your site, they can draw a picture composed of emoticons, take the code and send the picture to someone in Skype.

  1. <!-- Copy this code and paste it somwear in the body of your HTML dukument -->
  2. <!--SkypeMania start -->
  3. <!-- Change top value and left value to change possition over your website. -->
  4. <div id="SkypeMania_JavaScript4" style="margin:0;padding:0;position:absolute;left:75px;top:450px;width:310px;height:300px;text-align:left;z-index:112;">
  5. <script type="text/javascript">
  6. savnam=new Array();
  7. nom=0
  8. interface()
  9. function interface(){
  10. var le=0;
  11. var to=0;
  12. var func;
  13. document.write('<div id="Layer2" style="position:absolute;background-color:#F9F8F4;left:80px;top:40px;width:220px;height:220px;z-index:110" title="Click to change emoticons">');
  14. for (n=0;n<=9;n++){
  15. for (i=200;i<=209;i++)
  16. {
  17. savnam[nom]="Image" + i + n;
  18. nom++
  19. func= "'"+"Image" + i + n +"'";
  20. document.write('<div id="wb_Image'+ i + n +'" style="margin:0;padding:0;position:absolute;left:'+le +'px;top:'+ to +'px;width:22px;height:22px;text-align:left;z-index:8;"><a onclick="dr('+ func +')"><img src="http://cyberbg.com/SMO/SMimages/1.bmp" id="Image'+ i + n +'" alt="" border="0" style="width:25px;height:25px;"></div>');
  21. le = (le + 22);}le=0;to=(to+22);}
  22. document.write('</div>')
  23. // change the value of backgraund-color to change BG color of SkypeMania, by default it's #7D9EC0
  24. document.write('<div id="Layer1" style="position:absolute;background-color:#7D9EC0;left:0px;top:0px;width:310px;height:300px;z-index:0" title="">')
  25. //Change this caption if you want.
  26. document.write('<caption>Draw with emoticons, get the code and send it on Skype.</caption>')
  27. kartinkanom=0
  28. le2=5;to2=40;
  29. for (red=0;red<=8;red++){
  30. for (kolona=100;kolona<=102;kolona++){
  31. func2= "'"+"Image" + kolona + red +"'"
  32. fname="http://cyberbg.com/SMO/SMimages/"+kartinkanom+".bmp"
  33. document.write('<div id="wb_Image'+ kolona + red +'" style="margin:0;padding:0;position:absolute;left:'+le2 +'px;top:'+ to2 +'px;width:22px;height:22px;text-align:left;z-index:8;"><a onclick="izbor('+ func2 +')"><img src="'+ fname +'" id="Image'+ kolona + red +'" alt="" border="0" style="width:23px;height:23px;"></div>');
  34. kartinkanom++
  35. le2 = (le2 + 24);}le2=5;to2=(to2+25); }document.write('<div id="wb_tekushta" style="margin:0;padding:0;position:absolute;left:5px;top:265px;width:22px;height:22px;text-align:left;z-index:112;"><a onclick=""><img src="http://cyberbg.com/SMO/SMimages/0.bmp" id="tekushta" alt="" border="0" style="width:22px;height:22px;"></div>')
  36. document.write('</div>')
  37. //Change button1 value to change the text over the button.
  38. document.write('<div id="wb_Button1" style="margin:0;padding:0;position:absolute;left:90px;top:265px;width:80px;height:25px;text-align:left;z-index:112;"><input type="button" id="Button1" onclick="getcode()");return false;" name="" value="Get code for Skype" style="position:absolute;width:200px;height:25px;font-family:Arial;font-size:13px;">')
  39. }
  40. function dr(idn)
  41. { document.getElementById(idn).src=document.getElementById("tekushta").src;}
  42. function izbor(idnom)
  43. { document.getElementById("tekushta").src=document.getElementById(idnom).src;}
  44. function getcode(){var kar=""
  45. for (i=0;i<=99;i++){n=i
  46. if (n==9||n==19||n==29||n==39||n==49||n==59||n==69||n==79||n==89 )
  47. {delimiter='^'}else{delimiter='w';}
  48. kar =kar + document.getElementById(savnam[i]).src + delimiter;
  49. kar=kar.replace("http://cyberbg.com/SMO/SMimages/","")
  50. kar=kar.replace(".bmp","");
  51. kar=kar.replace("25","27");
  52. kar=kar.replace("11","28");
  53. }; adres ='http://cyberbg.com/SMO/SMpic.php?&data=^'+ kar;window.open(adres);nom=0;}
  54.  
  55. </script>
  56. </div>
  57. <!--SkypeMania end -->

Report this snippet  

You need to login to post a comment.