2

How Can I send data out from flash to javascript without ExternalInterface

2 Answers 2

2

You can use fscommand(). But why do you not want to use ExternalInterface in the first place?

Sign up to request clarification or add additional context in comments.

Comments

1

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 like navigateToUrl(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...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.