Posted By

jcprovideo on 01/29/10


Tagged

actionscript flash swfObject as2


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

kwanhon
connor3ep


swfobject and flash ExternalInterface


 / Published in: ActionScript
 

  1. <script type="text/javascript">
  2.  
  3. var chatTall = null; //SET TO NULL UNTIL LOADED
  4.  
  5. function sendGen(genType) {
  6. chatTall.sendGender(genType);
  7. } //SEND USING FLASH ExternalInterface
  8.  
  9.  
  10. var flashvars = {};
  11. var params = {};
  12. var attributes = { id: "chatTall", name: "chatTall" };
  13.  
  14. swfobject.embedSWF("signup/images/drillcams/chatTall.swf", "flashcontent", "138", "419", "9", false, flashvars, params, attributes, function(e) { chatTall = e.ref;});
  15. </script>
  16.  
  17.  
  18.  
  19. /*ActionScript*/
  20.  
  21.  
  22. import flash.external.ExternalInterface;
  23.  
  24. function genType(str:String):Void {
  25. debugTxt.text = str;
  26. }
  27.  
  28. ExternalInterface.addCallback("sendGender",this,genType);

Report this snippet  

You need to login to post a comment.