Flasher Archive

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


Subject: RE: FLASH: OT - Javascript help, Please
From: Eric Dunham
Date: Thu, 9 Dec 1999 22:53:36 GMT

What exactly don't you understand...? Just what the script is doing...?
I personally don't like the way that they did it, but I can tell you what
it's doing. When you click the link it does this...
--------------------------------------------
if (InternetExplorer)
{
var m = parent.fw_map.map;
}
else
{
var m = parent.fw_map.document.embeds[0];
}
m.TGotoFrame("_level0/bird", 3);
--------------------------------------------
The page already has some variable named InternetExplorer which serves as a
boolean variable...simply evaluating to true or false. This script checks to
see what browser the user has (and they are assuming just IE and NS, which
is not too off, but it's not completely cross-browser efficient). After it
checks the browser, it assigns the object that is the flash movie (in this
case fw_map) to the variable m. And I'm not too familiar with FSCommands and
such (I just really started Flashing), but the statement after the if...else
block is simply calling a method of the object that was assigned to the
variable m, and then passes what appear to be the MC name and the frame
number that it wishes to show to the method (which is basically a built-in
or user defined member function).
It's not that hard of a script when you break it apart, with the exception
that I'm not familiar with Flash objects and FSCommands and such, but it's
all basically the same structure anyway :)

Hope that helped,
Eric
-----Original Message-----
From: owneratchinwag [dot] com [owneratchinwag [dot] com]On">mailto:owneratchinwag [dot] com]On Behalf Of Sarah
Lamont
Sent: Thursday, December 09, 1999 2:47 PM
To: flash group
Subject: FLASH: OT - Javascript help, Please


hi everyone,
If there is any Javascript experts out there that would be willing to
help me figure out how a certain script works, I would be ever so
grateful. The specific code I don't understand is the following:
<a href='javascript:var m = InternetExplorer ? parent.fw_map.map :
parent.fw_map.document.embeds[0]; m.TGotoFrame("_level0/bird", 3)'>

which is from:
http://www.flashcentral.com/Tech/HawaiiMap/
in the "Story" frame.

Thank you in advance!
(You can e-mail me at my address if you think it would be better
off-list.)
:]sarah


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California

Reserve your space today at http://www.streamingmedia.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...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California

Reserve your space today at http://www.streamingmedia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: OT - Javascript help, Please, Sarah Lamont

Replies
  FLASH: OT - Javascript help, Please, Sarah Lamont

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