Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | RE: FLASH: OT - Javascript help, Please |
| From: | Eric Dunham |
| Date: | Sat, 11 Dec 1999 00:14:01 GMT |
Hmm...if you're using NS, you need to make sure that the SWF file you're
trying to access is the first embedded object in your HTML, or you can just
change the embeds[] index to whatever matches the SWF you're trying to
change. Additionally, make sure that the <embed> tag that you use for the
SWF has a name property of whatever name you're trying to access. In the
HawaiiMap, this name is "map". So you could be embedding an SWF that has a
filename of asdf.swf, but if you name it properly in the embed tag, it
should work. Furthermore, you can do a lot of JavaScript debugging by
checking the values of certain things when the page loads. For example, you
can add an onLoad event handler to the <body> tag and then do something like
alert(parent.framename.document.embeds[0]) to see if the object exists. If
you get a response like [object] from the alert dialog, then 1) It's a valid
object and 2) You should be able to access it's properties and methods. And
IMHO, frames suck, plus, you can change documents and positions and such
dynamically with JavaScript. So you could simply forget the frames and use
document.embed_name or document.embeds[index]. And FYI, you should use the
document.embeds[index] syntax when you're working with NS, because sometimes
(for whatever reason) it doesn't properly evaluate the document.embed_name
object.
Hope that helps,
Eric
-----Original Message-----
From: owner
Lamont
Sent: Friday, December 10, 1999 8:38 AM
To: flasher
Subject: Re: FLASH: OT - Javascript help, Please
thanks Eric and Branden for your help!
I guess I did kind of understand it, but since I couldn't get the same
command to work for my own swf/html file, I thought I was missing
something. I guess I'll have to play around with it in my own code to
try to get it to work. Do you guys have any notions as to why it
wouldn't work for me? I pasted every single instance of the <script> in
the original doc. into my own, so that I wouldn't have missed anything
inadvertently. Then I changed the "fw_map" to the name of the frame in
my doc. where my swf was, and the "map" to the name of my swf. I changed
"_level0/bird" to
"_level0/name_of_instance_in_my_swf_that_I_was_trying_to_effect". I
don't understand why it won't work. Any ideas?
thanks a lot!
:]sarah
Eric Dunham wrote:
<snip>
> 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);
> --------------------------------------------
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 help
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 help
Replies
Re: FLASH: OT - Javascript help, Please, Sarah Lamont
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

