-
Javascript Access to Flash in Firefox/Chrome?
Okay, I’m sure this issue has been discussed before, but several hours of googling have gotten me no where. I’m trying to use Javascript to call an AS3 function in an embedded SWF file. I’ve attached my embed code as a text (apologies in advance for not posting it direct, but I tried 3 times and each time, after showing me exactly what I expected in Preview Post, when I checked the post itself I found large random chunks of code missing in the middle, and I’ve already been up for 20 some hours).
4114_embeddedcode.txt.zip
My HTML is middle of the road and I’ve barely touched Javascript before now; I was hours in and about to give up on this part of the site design when I suddenly got it working in IE, of all browsers. I understand (generally) that IE references flash files differently than Firefox and Chrome (object tags vs embedded tags) but for the life of my I can’t get the JS function to work in anything but IE. The only command that works is getElementById; I’ve tried getElementsByName(“Reels”) and document.embeds.Reels; bottom line, if the browser is using the embed tag, I can’t get JS to see it. I’m assuming it’s an error in my SWF embed code, but I’ve tried 3 or 4 different versions and I get the same result. Any help would be appreciated, and please let me know any other details that might help. Thanks.