Krishna
Krishna

Reputation: 165

Is it possible to access and modify flash content via js

Is it possible to access and modify flash content via js (JavaScript) and if yes, then, How to do that?

Upvotes: 0

Views: 680

Answers (2)

anon
anon

Reputation:

The normal way to do this, is to define some functions inside the Flash, that you can call from the JavaScript, and functions inside JavaScript that you can call from the Flash. Adobe has documentation on this. Just search for it. (There’s also such an interface for Java, which is a bit more sophisticated.)

But if you want to go crazy, you can always get the raw binary Flash data, and modify that. You could for example take any Flash file, URL-encode it, and put data:application/x-shockwave-flash, in front of it, then use that long string as the URL for your <object> tag. :)
Next, you could dynamically modify that URL, or dynamically add Flash objects to your document with JavaScript-generated data.
But I highly doubt the plug-in will care or watch for your modifications of that same URL, once the code is loaded. And no idea how those multiple Flash objects would use each other…

But nowadays, it’s kinda moot. Since SVG+CSS+JavaScript+<canvas>+WebGL allow you do the same and so much more. :)

Upvotes: 1

joshua
joshua

Reputation: 684

It is possible to manipulate the state of a movie with java script, im thinking you dont have access to the SWF(the decompiled fla) so you would not know the variables, MovieClips properties and/ or have Actionscripts inside this SWF movie to accept such request from java.

hence: they are able to send / retrieve data between each other but you would have to allow this behavior inside the swf movie aswell.

its really no different with other languages the comunication between them has to be allowed from both parties.

Upvotes: 0

Related Questions