Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: Flash, layers and JavaScript (part II) |
From: | Jose M. Rubio/DoubleYou |
Date: | Fri, 2 Jun 2000 10:08:36 +0100 |
Hi BJ,
at this moment I've been able to access a Flash movie inserted on a layer
so I can control the movie through JavaScript and also manipulate the
position and visibility of the layer. Now I'm trying to create a function
which will "activate" that access for different movies in different layers
in a same page. Probably I'll have to create two Arrays, one with layer
names and another with movie ids, and make a recursive function to return
all the values. I'm almost sure it has to be a better way to do it, but...
I'll keep you guys informed if you're interested.
By the way, a funny thing I found yesterday about our "beloved" Netscape:
I created on the fly a layer which contained a Flash movie, but
Communicator wasn't able to find it. I tried different ways to reference
the movie unsuccessfully. So, at last, I wondered if Netscape was actually
loading the movie. So I tried this:
if (is.ns) alert(document.layername.document.embeds[0])
Guess what? Then it worked. And I didn't touch any other line from the
code. It seems as if you have to "force" Netscape to realize it has loaded
that damn movie. No one from Netscape out there who can help?
Well, back to work.
At 12:11 01/06/00 -0700, you wrote:
>Jose,
>
>I recently went through the exact same dilemma. If you go to
>www.timetrendsg.com/redesign/, you will see a site I am working on that
>uses flash movies for navigation, instead of boring old gifs. I wrote a
>script that tells the flash movie on the left which frame to display when
>it loads (which is dependent on what part of the site you are in)
>
>To see an example, go to the Products section, and select the 'desktops'
>link. When you view the source, you'll notice two javascripts at the end
>of the <Head></Head> tags. Those control my two flash movies (top nav and
>left nav). The point of this is that Netscape and Microsoft implement the
>javascript language differently (surprise) so the script I have determines
>which browser is viewing the page, then provides the correct information
>to the javascript function that loads when the <body> tag is loaded.
>
>Here is the basic function (put it in your head of your html page)
>
>
> function jcleftnav(){
> if (navigator.appName.indexOf ("Microsoft") !=-1)
> { return window['leftnav'] }
> else { return document['leftnav'] }
> }
>
>The 'leftnav' part is the name of the movie that you set in your <object>
>or <embed> tags. Change this to whatever you named your flash
>movie. Now, when you want to change the frame of the movie, cal lthe
>function i nyour html page. I wanted mine to change as soon as the page
>is loaded, so I included the following in my <body> tag:
>
><body bgcolor="#FFFFFF" onLoad="jcleftnav().GotoFrame(7)">
>
>Notice the 'GotoFrame' -- it is important that you use this EXACT case
>inyour own code. Netscape kept telling me that 'gotoframe' was not a
>valid method until I changed the case of the method call in my html code.
>
>Also, remember that javascript begins counting from '0' - so if you have
>20 frames in your flash movie, even though flash says your first frame is
>frame 1 - to reference it in javascript you will have to tell it to go to
>frame 0. Likewise, to go to the last frame, you would write the command
>'jcleftnav.GotoFrame(19)'
>
>Hope this helped,
>
>BJ Hoffauir
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>
>flasher is generously supported by...
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>World Animation Celebration - Big Internet Animation Pow Wow Discount Offer
>
>Register before May 25 mention flasher and save 25%!! www.wacfest.com
>
>Be discovered, get a job or have your web series picked up. A big talent
>search for Shockwave
>and Flash animators is happening May 30-June 4 in Hollywood. Featuring
>Rob Burgess, Matt
>Groening, Brad Bird and more. www.wacfest.com
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>To unsubscribe or change your list settings go to
>http://www.chinwag.com/flasher or email helpchinwag [dot] com
>
-----------------------------
Jose M. Rubio
DoubleYou
josedoubleyou [dot] com
http://www.doubleyou.com
Tel. +34 93 292 3110
Fax. +34 93 292 2197
ICQ Number: 68390036
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
World Animation Celebration - Big Internet Animation Pow Wow Discount Offer
Register before May 25 mention flasher and save 25%!! www.wacfest.com
Be discovered, get a job or have your web series picked up. A big talent search for Shockwave
and Flash animators is happening May 30-June 4 in Hollywood. Featuring Rob Burgess, Matt
Groening, Brad Bird and more. www.wacfest.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
Re: FLASH: Flash, layers and JavaScript , BJ Hoffpauir
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]