[SWFObject] JavaScript to Flash 7

Andriy Panas a.panas at ua.fm
Fri Oct 27 14:41:15 PDT 2006


Hello swfobject list members,

    I am big fan of SWFObject Javascript routine for embedding SWF
 objects into HTML page and now I would like to use to Javascript
 Integration Kit along SWFObject.

   I had downloaded the latest version of Javascript Integration Kit
from http://blog.deconcept.com/code/intkit/ and got it working almost
wit 100% success.

     My question is: Can I call ActionScript function that returns
Number value from JavaScript?

   Just for the reference, I use the following syntax to access plain ActionScript function
that does not return a value:
-------------------------------
   In JS:
   ---------------------------
   var swf = new SWFObject("mySWF.swf", "jsdisplay", "350", "220", "7.0.0", "#ffffff", true);
   swf.setProxy(null, 'swfobject_js_gateway.swf'); // first param is object to send the js calls to, second is the path to the gateway swf file.
   ---------------------------

   In HTML:
   <li><a href="javascript:void(0)" onclick="swf.call('SelStartPositionFunc', 20000);">Click me to send a SelStartPosition to flash!</a></li>
-------------------------------

--
Bstrgs,
Andriy Panas




More information about the Swfobject mailing list