473,569 Members | 2,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Flash, Javascript Time Conflict in Internet Explorer

I have a webpage that has two flash animations running. I also have a
javascript script running that rotates 3 images and fades them in and
out. To do the fading and rotating in javascript I am using the
setInterval function, like this:

setInterval(fun ction () {imageFade()},1 0);
This works fine in Firefox, but in IE 7, the flash animations slow
down a lot, and the javascript fading/rotation slows down some.

There seems to be a timing conflict in IE 7 between flash and
javascript. Any suggestions on how to fix this in IE 7?

Sep 28 '07 #1
13 5293
On Sep 28, 1:12 pm, "mud...@gmail.c om" <mud...@gmail.c omwrote:
I have a webpage that has two flash animations running. I also have a
javascript script running that rotates 3 images and fades them in and
out. To do the fading and rotating in javascript I am using the
setInterval function, like this:

setInterval(fun ction () {imageFade()},1 0);
What does this imageFade function look like and why call it a hundred
times per second?

Sep 28 '07 #2
mu****@gmail.co m wrote:
I have a webpage that has two flash animations running. I also have a
javascript script running that rotates 3 images and fades them in and
out. To do the fading and rotating in javascript I am using the
setInterval function, like this:

setInterval(fun ction () {imageFade()},1 0);

This works fine in Firefox, but in IE 7, the flash animations slow
down a lot, and the javascript fading/rotation slows down some.

There seems to be a timing conflict in IE 7 between flash and
javascript. Any suggestions on how to fix this in IE 7?
One thing that might be happening is that calling your imageFade
function every 10 milliseconds isn't leaving enough time for everything
to run. You could try making some measurements. Make a note of the time
at the start of your imageFade and also at the end. You might find it's
close to 10ms. It's for this reason that I never use setInterval with a
short time. For me, if the time is less than a second, then I usually
prefer to use setTimeout, and put a setTimeout at the end of your
function for the next call. By using setTimeout, you're guaranteeing a
certain amount of "free time" until the next call. There's no perfect
solution, the browser environment is a controlled sandbox and things run
only as fast as allowed when the overhead of that environment being
managed is also accounted for.
Sep 28 '07 #3
mu****@gmail.co m wrote:
I have a webpage that has two flash animations running. I also have a
javascript script running that rotates 3 images and fades them in and
out.
Ouch.
To do the fading and rotating in javascript I am using the
setInterval function, like this:

setInterval(fun ction () {imageFade()},1 0);
No OS timer ticks in 10-millisecond intervals.
This works fine in Firefox, but in IE 7, the flash animations slow
down a lot, and the javascript fading/rotation slows down some.

There seems to be a timing conflict in IE 7 between flash and
javascript. Any suggestions on how to fix this in IE 7?
Don't use setInterval() for time-critical applications; use setTimeout()
instead. Google is your friend. [psf 6.1]
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8************ *******@news.de mon.co.uk>
Sep 28 '07 #4
Thomas 'PointedEars' Lahn said the following on 9/28/2007 4:18 PM:
mu****@gmail.co m wrote:
<snip>
>This works fine in Firefox, but in IE 7, the flash animations slow
down a lot, and the javascript fading/rotation slows down some.

There seems to be a timing conflict in IE 7 between flash and
javascript. Any suggestions on how to fix this in IE 7?

Don't use setInterval() for time-critical applications; use setTimeout()
instead.
You think that 2 flash apps animating and an image slide show is "time
critical"?
Google is your friend. [psf 6.1]
Are you referring to the same Google that can't figure out how to make
two statistics for the same thing match? Google isn't always your friend.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 28 '07 #5
Randy Webb wrote:
Thomas 'PointedEars' Lahn said the following on 9/28/2007 4:18 PM:
>mu****@gmail.co m wrote:
>>This works fine in Firefox, but in IE 7, the flash animations slow
down a lot, and the javascript fading/rotation slows down some.

There seems to be a timing conflict in IE 7 between flash and
javascript. Any suggestions on how to fix this in IE 7?
Don't use setInterval() for time-critical applications; use setTimeout()
instead.

You think that 2 flash apps animating and an image slide show is "time
critical"?
If the frame length of the animation should be 10 milliseconds, yes.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8************ *******@news.de mon.co.uk>
Sep 29 '07 #6
In comp.lang.javas cript message <46************ **@PointedEars. de>, Fri,
28 Sep 2007 22:18:51, Thomas 'PointedEars' Lahn <Po*********@we b.de>
posted:
>
No OS timer ticks in 10-millisecond intervals.
That's rather a strong statement; are you sure that you know about EVERY
OS - or even every one that supports Javascript?

ISTR reading that the Win98/WinXP timer, while running by default at
64Hz, can be set by a program to run at other speeds; and that the new
speed will be maintained whilst that other program continues to run. I
don't assert that as a proven fact, though.

--
(c) John Stockton, Surrey, UK. ??*@merlyn.demo n.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demo n.co.uk/- FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.
Sep 29 '07 #7
Dr J R Stockton wrote:
In comp.lang.javas cript message <46************ **@PointedEars. de>, Fri,
28 Sep 2007 22:18:51, Thomas 'PointedEars' Lahn <Po*********@we b.de>
posted:
>No OS timer ticks in 10-millisecond intervals.

That's rather a strong statement; are you sure that you know about EVERY
OS - or even every one that supports Javascript?

ISTR reading that the Win98/WinXP timer, while running by default at
64Hz, can be set by a program to run at other speeds; and that the new
speed will be maintained whilst that other program continues to run. I
don't assert that as a proven fact, though.
OK, let's just say that I find it unlikely that any HTML UA ticks that fast
or that such low values are even implemented by setTimeout(). Given the
current Gecko code and the Bugzilla material found so far, I have to assume
that the earliest implementations already normalized the time value to
prevent the OS from hanging:

https://bugzilla.mozilla.org/show_bug.cgi?id=123273
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8************ *******@news.de mon.co.uk>
Sep 29 '07 #8
Thomas 'PointedEars' Lahn said the following on 9/29/2007 3:39 PM:
Dr J R Stockton wrote:
>In comp.lang.javas cript message <46************ **@PointedEars. de>, Fri,
28 Sep 2007 22:18:51, Thomas 'PointedEars' Lahn <Po*********@we b.de>
posted:
>>No OS timer ticks in 10-millisecond intervals.
That's rather a strong statement; are you sure that you know about EVERY
OS - or even every one that supports Javascript?

ISTR reading that the Win98/WinXP timer, while running by default at
64Hz, can be set by a program to run at other speeds; and that the new
speed will be maintained whilst that other program continues to run. I
don't assert that as a proven fact, though.

OK, let's just say that I find it unlikely that any HTML UA ticks that fast
Just as I find it unlikely that a web page with two Flash animations and
a JS image flickering thingie script would be "time critical". Nothing
more than third grade gimmicks is all it is.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 29 '07 #9
On Sep 28, 8:27 pm, "mud...@gmail.c om" <mud...@gmail.c omwrote:

[snip]
>
By default are there filters?
Not by default.

Sep 30 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
9418
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to intercept the key so that I can do stuff on the server side to make the new window behave correctly? (We have a JSP-based webapp which stores state in...
0
762
by: Drew D. Saur | last post by:
When working on a web site for my employer, I uncovered what appears to be an undocumented bug in Internet Explorer 5 & 6 for Windows in regard to a (perhaps uncommon?) integration of Flash scripting and CSS2 background imagery. I am hoping that someone out there can help me identify what steps I might take to remedy this situation. Perhaps it...
18
12647
by: Simula | last post by:
I am developing an HTML javascript application and I want to preserve state in a way that can be book-marked. I chose HTML anchors as a means of preserving state. When the application changes state, the HTML page URL would change from default.html to default.html#stateA. example: http://pearstudios.com/javascript/locationHashAndFlash.html ...
2
1714
by: Oz Kologlu | last post by:
Hi folks, IE and Asp.net 2.0 are doing some pretty bizzare things. Some of our users were getting pretty weary of IE redrawing and "flashing" what is essentially a pretty static page every time there is a postback (IE Version 6.0.2900.2180.xpsp_sp2,,,,; Doesn't happen under firefox - bless those folks). Anyway try this:
8
5879
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 clients (Internet Explorer). My flash content was originally brought in via the “flash satay” method, but I have since used some server-side magic...
5
5940
by: ASP.NET explorer | last post by:
I have been asked to create some simple animation using Adobe Flash player in ASP.NET(C#) web application. While I am fairly well versed with ASP.NET C#, I absolutely have NO IDEA about how to say "Hello World" in a Flash enabled web page rendered via ASP.NET. Can any one let me get started? ---
1
2388
by: skeem | last post by:
I am having issues viewing flash that has been inserted via javascript in Internet Explorer. I had to uninstall my flash about a week ago. I've since reinstalled flash and reinstalled flash player for all my browsers. All flash shows where it hasn't been inserted via javascript (ie. youtube.com) but javascript flash is not showing at all in IE....
2
8056
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I did not understand some parameters totally in the HTML tag. These days when I was surfing the Internet I have found some comprehensive introduction to...
0
7609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7921
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2107
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.