suresh_nsnguys Posted August 4, 2007 Share Posted August 4, 2007 Hi, i am new member to this forum. i am trying to solve this problem from past 2 days.but i can't able to acheive it. i able to capture single mouse click over flash(<Embed> object) using onactivate event handler.But it is supported by IE. i want some event in Firefox that will capture the mouse click over flash object. i attached my code var picObj = document.createElement('EMBED'); // --Create dynamically object tag picObj.setAttribute('id','aShow'); // Give id to it picObj.setAttribute('TYPE' , 'application/x-shockwave-flash'); picObj.style.width = 100%; // width picObj.style.height = 100%; // height picObj.src = 01.swf; //--This is the Filename of the Flash ad. // to capture onclick event for IE //kiosk is the javascript function i am calling when an event accours aShow.attachEvent("onactivate",kiosk); // it is working fine // For Firefox,i tried 'onfocus' also document.getElementById('aShow').addEventListener("focus",kiosk,true); // not working can any one help me to solve my problem A.suresh Quote Link to comment Share on other sites More sharing options...
RichardRotterdam Posted August 4, 2007 Share Posted August 4, 2007 why not just use the onclick in the flash file? Quote Link to comment Share on other sites More sharing options...
suresh_nsnguys Posted August 5, 2007 Author Share Posted August 5, 2007 Hello sir, i am very happy to see your reply.i tried these 2 options but not working. document.getElementById('aShow').addEventListener("click",kiosk,true); // not working document.getElementById('aShow').addEventListener("mousedown",kiosk,true); // not working Quote Link to comment Share on other sites More sharing options...
emehrkay Posted August 5, 2007 Share Posted August 5, 2007 on activeevent is not a native js event. document.getElementById('aShow').click = function(){ //actions } try that Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.