Flasher Archive

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


Subject: RE: FLASH: OT - Javascript help, Please
From: Branden Hall
Date: Thu, 9 Dec 1999 21:20:53 GMT

var m = InternetExplorer ? parent.fw_map.map :
parent.fw_map.document.embeds[0];

The first "line" is there because there are differences in how you reference
embeded objects with IE and Netscape. The variable InternetExplorer is set
earlier in the script and is 1 if the client browser is IE and not 1
otherwise. The bit with the ? is actually a mini version of an if statement
that not many people seem to know about... basically what it is saying is
that if InternetExplorer=1 then set m=parent.fw_map.map else set
m=parent.fw_map.document.embeds[0].

m is an object, an embeded plugin object to be exact. The parent. refers to
the parent frame, the fw_map. refers to a frame inside the parent frame and
the map or document.embeds[0] refer to the actual embeded SWF.

Basically you are creating a name by which to talk to the embeded SWF in
another frame.

The next line:
m.TGotoFrame("_level0/bird", 3)
is taking advantage of the fact that the flash plugin object has special
built in methods that you can call. One of them happens to be TGotoFrame.
With this method you give two arguements, the target, and the frame number
and the methods tells the target to jump to that particular frame.

--
Branden J. Hall
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Multimedia Developer/Instructor | Multimedia Developer
Fig Leaf Software | Kimmuli.com
bhallatfigleaf [dot] com | brandenatkimmuli [dot] com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=--=-=-=-=-=-=-=-=-=-=-


-----Original Message-----
From: owneratchinwag [dot] com [owneratchinwag [dot] com]On">mailto:owneratchinwag [dot] com]On Behalf Of Sarah
Lamont
Sent: Thursday, December 09, 1999 3: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
  FLASH: OT - Javascript help, Please, Sarah Lamont

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