Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Onload event interfering with DHTML Hierarchial menus
From: Jon Williams
Date: Fri, 14 Jul 2000 15:07:42 +0100

this stuff can be messy. Javascript can't have threads, so
it's possible to end up in nasty situations like this.
Without knowing which mouse events are being tracked,
it's hard to say, but there are a couple of general techniques.

1) Instead of onload() you can drop the following at the bottom
of a page prior to the </body> tag and it should work

<script language="javascript">go()</script>

this will probably screw up if your scripts are located in
externeal files...therefore this is not as reliable as onload, but...

2) If your onload functions run and then stop (ie. don't keep
any loops running for updates) then you could modify your
menu dhtml to wait before kicking in the event handlers.

3) If by some small chance this problem is being caused
by needing to kick off two onload functions, create a new
function "uberonload" and drop whatever function calls
in whatever order into that function:

function uberonload() {

onloadOne ();
onloadTwo ();

}

4) Use www.dansteinman.com for your dhtml API. I've not
had complete success with the code available from webreference.
It tends to not be as well tested cross-browser IMHO.

hope that helps..javascript is evil this way.
-jon

john duffy wrote:

> Hi everyone. I have a bit of a major problem at the moment. I have
> a flash countdown clock which uses javascript fscommand to link into
> the movie and set the number of days to a certain date. It works by
> calling three functions in the body tag which are activated by an
> onload event i.e.
> <body onLoad="goones(),gohundreds(),gotens()">
> which in turn determines the numbers that have to be set in the flash
> movie, please see http://www.mediumlook.com/~krash/counter2.html
> (developed by Michael Krisher) for an example of what im talking
> abutmaybe you could also look at the code to get an idea of what im
> talking about.
>
> Right next to the problem. I am placing this flash banner clock on
> the company intranet, however in testing i have found out that the
> DHTML menus which pull out when you click on them to show sub menus,
> do not render properly i.e. they do not pull out to show sub menus.
> However they do work whenever i take out the onload events for the
> functions as outlines above.
>
> Therefore the problem lies with onload event. My boss tells me that
> since the menu system is also event driven there is conflict between
> the two events
>
> You can find the code for the menus that we are using at
> http://webreference.com/dhtml/column21/ to give an idea of whats
> going on.
>
> Is there any way around this problem people, is there anything i can
> tweak in the dhtml code to allow for the two onload events. Can i do
> an onload in the html page without it being in the body tags???
>
> I really hope someone can help me out here as i spent along time on
> the flash movies and they may have to be scraped if i cant get this
> problem sorted....
>
> would be very appreciative and grateful if someone can help here.
>
> Thanks in advance....
> john
>
> _____________________________________
>
> Get your free E-mail at http://www.ireland.com
>
> flasher is generously supported by...
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> flashforward2000 and the Flash(tm) Film Festival
> July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
> www.flashforward2000.com
> Produced by United Digital Artists and lynda.com
> Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
> shockwave.com and Electric Rain.
> 1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
> Register before June 30 and save $200!!-- www.flashforward2000.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
> http://www.chinwag.com/flasher or email helpatchinwag [dot] com


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Onload event interfering with DHT, john duffy

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]