[SWFObject] JavaScript to Flash 7

Geoff Stearns geoff at deconcept.com
Fri Oct 27 14:49:31 PDT 2006


you can't get return values directly...

you'd have to call a function in the html page and then have the page  
send the data back into flash in an asynchronous way.

same thing going the other way, if you want to send data from  
javacsript into the flash movie, you can do that, then have another  
function send some data back out as the result.



On Oct 27, 2006, at 5:41 PM, Andriy Panas wrote:

> 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
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com




More information about the Swfobject mailing list