How Can I send data out from flash to开发者_开发技巧 javascript without ExternalInterface
You can use fscommand(). But why do you not want to use ExternalInterface
in the first place?
There are a number of tricks you can use to avoid ExternalInterface although I need to agree with Amarghosh - why not use ExternalInterface.
The tricks you could try are:
- Navigate to a javascript: URL. In AS2 you used to be able to
getURL("javascript:myFunction()")
- I haven't used the trick in as3 but I guess something likenavigateToUrl(new URLRequest('javascript:myFunction()'));
might work. - (this is a really old one that we used to use back in Flash 4 days) load a page into an iframe, possibly passing GET parameters and have this page communicate with the hosting page via JS
Both of these may or may not work reliably in different browsers. ExternalInterface is much more reliable and flexible so I'm really interested to know why you are avoiding it...
精彩评论