Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | RE: FLASH: JaveScript Time IE/Netcape |
From: | Daniel Guerrier |
Date: | Tue, 20 Jun 2000 20:52:46 +0100 |
Thanks for the help!!
Can you recommend a good JavaScript book that shows
which objects are compatible with who, and ways to
account for both browsers. Right now I'm just winging
it.
Thanks again
--- Keith Salisbury <Keithglobalbeach [dot] com> wrote:
> Daniel,
>
> Just add these two lines in at the top of your code:
>
> var IE = navigator.appName.indexOf("Microsoft") !=
> -1;
> var navigationObj = IE ? navigation :
> document.embeds[0];
>
> ...
>
> and change this line to :
>
> navigationObj.SetVariable("clock", timeValue);
>
> Basically simply because IE and Netscape handle
> embedded objects
> differently...pain in the arse ... but we all know
> that!!!!
>
> --
>
> Keith
> Flash Developer
>
> Global Beach Group
> Tel: (44) 207 384 8540
> Fax: (44) 207 384 8539
> Email: keithglobalbeach [dot] com
> Web: http://www.globalbeach.com
>
> >
> > ------------------------------
> >
> > Date: Tue, 20 Jun 2000 06:44:34 -0700 (PDT)
> > From: Daniel Guerrier <dan_guerrieryahoo [dot] com>
> > Subject: FLASH: JaveScript Time IE/Netcape
> >
> > <!-- Begin
> > var timerID = null;
> > var timerRunning = false;
> > function stopclock (){
> > if(timerRunning)
> > clearTimeout(timerID);
> > timerRunning = false;
> > }
> > function showtime () {
> > var movie =
> > window.document.navigation;
> > var now = new Date();
> > var hours = now.getHours();
> > var minutes =
> now.getMinutes();
> > var seconds = now.getSeconds()
>
> > var timeValue = "" + ((hours
> >12)
> > ? hours -12 :hours)
> > if (timeValue == "0")
> timeValue =
> > 12;
> > timeValue += ((minutes < 10) ?
> > ":0" : ":") + minutes
> > timeValue += ((seconds < 10) ?
> > ":0" : ":") + seconds
> >
> >
> navigation.SetVariable("clock",
> > timeValue);
> > timerID =
> > setTimeout("showtime()",1000);
> > timerRunning = true;
> > }
> > function startclock() {
> > stopclock();
> > showtime();
> > }
> > // End -->
> >
> > I'm using the above JavaScript to update a
> textfield
> > in
> > flash with the current. It work fine with IE but
> not
> > Netscape. Can anyone figure out why?
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send instant messages with Yahoo! Messenger.
> > http://im.yahoo.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
> helpchinwag [dot] com
>
__________________________________________________
Do You Yahoo!?
Send instant messages with Yahoo! Messenger.
http://im.yahoo.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 helpchinwag [dot] com
Replies
RE: FLASH: JaveScript Time IE/Netcape, Eric Stewart
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]