473,392 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,392 software developers and data experts.

Onactivate Event for Flash object is not working in Firefox


I am facing one problem in embed flash object.i am displaying the flash (.swf file) using embed tag<embed> in IE.i want to display the alert box when user click the mouse over the flash .i am able to display the alert box only when user double click the flash .but i want alert box need to display when single mouse click over flash.

my code:


function kiosk(){ // fn will be called when user click mouse
alert(" i received the mouse click");

//-------------- creating the embed flash object
var picObj1 = document.createElement('EMBED');
picObj1.setAttribute('id',"aShow"); // Give id to it
picObj1.setAttribute('TYPE' , 'application/x-mplayer2');
picObj1.setAttribute('PLUGINSPAGE', 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112');

aShow.attachEvent("onmousedown",kiosk); // i am attaching "onmousedown" event

document.getElementById('displayarea').appendChild (picObj1);



<div id="displayarea"></div>

Please post in code tags - moderator
Feb 19 '07 #1
5 4860
Hi guys

I able to capture the mouse click in Flash object(.swf file) using 'onactivate' Event Handler.But it works fine in IE.But its not working in Firefox.I heard the 'onactivate event will support only IE.

Is there any mouse event to capture single mouse click in flash object for firefox
I am looking for some help from you guys

Jul 13 '07 #2
16,027 Expert Mod 8TB
I don't work with Flash, but does a simple onclick not work?
Jul 14 '07 #3
5,390 Expert Mod 4TB
... But its not working in Firefox.I heard the 'onactivate event will support only IE. ...
that's correct ... have a look at the following link:

mouse events

may be it is of some help to you ...

kind regards
Jul 14 '07 #4

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
Expand|Select|Wrap|Line Numbers
  1. var picObj = document.createElement('EMBED');  // --Create dynamically object tag
  3. picObj.setAttribute('id','aShow'); // Give id to it
  5. picObj.setAttribute('TYPE' , 'application/x-shockwave-flash');
  7.  picObj.style.width = 100%;   // width
  9. picObj.style.height = 100%;   // height
  11. picObj.src = 01.swf; //--This is the Filename of the Flash ad.
  13. // to capture onclick event for IE
  15. //kiosk is the javascript function i am calling when an event accours
  17. aShow.attachEvent("onactivate",kiosk);   // it is working fine 
  19. // For Firefox,i tried 'onfocus' also
  21. document.getElementById('aShow').addEventListener("focus",kiosk,true);  // not working

can any one help me to solve my problem

Aug 4 '07 #5
5,821 Expert 4TB
Suresh, please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.

I will not ask you again.
Aug 4 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Philip | last post by:
I have just tried my website with Firefox v1.0 and when I try to load a movie using: document.getElementByID('MovieID').LoadMovie(0, 'MovieURL'); the browser tells me that LoadMovie is not a...
by: Cliff R. | last post by:
Hi, I use a handy little Javascript Flash detection script on a number of sites (copied below). Usually works great, but I just started trying Firefox and it's not working. A few browsers are...
by: gconrads | last post by:
OK, today is my twofer special on js questions. BTW: the method used here is working in Firefox I'm working on a script that switches the width of a Flash movie between 100% and 812 pixels...
by: avanhalen | last post by:
To embed flash objects in my pages, I read them from a database. A script file (Filedownload.aspx) reads it from the database, and streams it to the browser. Here are two example flash objects...
by: G Gerard | last post by:
Hello I have noticed that whenever I set a form's RecordSource property in code it launches the form's OnActivate event. In one of my application I set a form's RecordSource to zero lenght...
by: cgdev1 | last post by:
Hi Folks, I'm somewhat a newbie to .Net (2.0) and even newer to Flash. I'm trying to incorporate a flash (.swf) file into my application. The code* below works in a .htm page (added to my...
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web...
by: Sura | last post by:
Hi I have a flash interactive window which has html links and this appears on an html page. This window can be moved with the mouse on the html page. The html page has an iFrame too. When the...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.