473,320 Members | 1,829 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,320 software developers and data experts.

Onactivate Event for Flash object is not working in Firefox

Hi,

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:

[HTML]<script>

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');
picObj1.setAttribute('play','true');
picObj1.setAttribute('wmode','opaque');
picObj1.setAttribute('width','100%');
picObj1.setAttribute('height','100%');
picObj1.setAttribute('src','02.swf');

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

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

</script>

<body>

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

</body>[/HTML]
Please post in code tags - moderator
Feb 19 '07 #1
5 4857
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

A.suresh
Jul 13 '07 #2
acoder
16,027 Expert Mod 8TB
I don't work with Flash, but does a simple onclick not work?
Jul 14 '07 #3
gits
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
Hi,

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
  2.  
  3. picObj.setAttribute('id','aShow'); // Give id to it
  4.  
  5. picObj.setAttribute('TYPE' , 'application/x-shockwave-flash');
  6.  
  7.  picObj.style.width = 100%;   // width
  8.  
  9. picObj.style.height = 100%;   // height
  10.  
  11. picObj.src = 01.swf; //--This is the Filename of the Flash ad.
  12.  
  13. // to capture onclick event for IE
  14.  
  15. //kiosk is the javascript function i am calling when an event accours
  16.  
  17. aShow.attachEvent("onactivate",kiosk);   // it is working fine 
  18.  
  19. // For Firefox,i tried 'onfocus' also
  20.  
  21. document.getElementById('aShow').addEventListener("focus",kiosk,true);  // not working

can any one help me to solve my problem



A.suresh
Aug 4 '07 #5
pbmods
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

3
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...
6
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...
18
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...
2
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...
2
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...
2
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...
8
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...
1
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...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.