August 21st, 2001, 01:18 PM
-
Javascript and Flash
Does anyone know if it's possible to trap events and obtain input data from Flash using JavaScript? There's one caveat, I don't want to add any code to Flash to send the data to JS.
August 22nd, 2001, 12:27 AM
-
You can access any variable in flash with javascript, without the flash knowing it. You can change the variable, too. Just name your movie in the object and embed tags. Then you can access them...
flashVar_name = document.myMovie.getVariable("var_name");
document.myMovie.setVariable("var_name", "var_value");
August 22nd, 2001, 02:40 PM
-
Thanks... Some more Questions though
This definitely helps. Now, is there a way to obtain the list of variables I can retrieve? Basically, my Javascript is going to be blind. I have no idea what the flash app has as far as variables.
Also, is there a way to get the event of a clicked button or a selection from a drop down list? Again, without previously knowing what's available. I know i can do this in html using JS by trapping events. Was wondering if I can use JS to do the same with Flash.
August 22nd, 2001, 02:48 PM
-
Those are excellent questions, kinda rare on this forum
I'll do some experimenting and get back to you. Try posting this question on were-here forums, they are more flash oriented...
http://www.were-here.com