1
votes

I'm curious, is it possible for a flash player (SWF) object on an HTML page to update the HTML attributes directly, or would I have to use a script to accomplish this?

I tried searching Google for this, but couldn't find anything saying either way.

Thanks

1

1 Answers

1
votes

You can do this with the ExternalInterface API which allows you to execute JavaScript in the containing page from the SWF.

From the ActionScript you can do the following on the HTML page:

  • Call any JavaScript function.
  • Pass any number of arguments, with any names.
  • Pass various data types (Boolean, Number, String, and so on).
  • Receive a return value from the JavaScript function.

See documentation here.