Flasher Archive

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


Subject: Re: Javascript in Flash 2
From: John Croteau
Date: Fri, 10 Jul 1998 03:10:19 +0100

Hi evilsteven,

> I've been relatively successful getting Flash 2 to call a Javascript function by cheating a little bit. In a button, I choose the action Get URL, and inside the HREF, I put
> This works, but not always as I want it to. When the Flash document sits on a page inside of a Frameset in Navigator only, it tries to call the Javascript function from the parent Frameset document, and not the local document. It works fine in IE, though...
> Does anyone know how to force the Javascript call to happen on the local page?

First, the technique you are using is not cheating, but is the
JavaScript: protocol.
It has a deficiency when used from Flash as it errors when using IE3
Windows versions of browsers.

Assuming the name of your function is PlayFlash and the Frame you are
targeting is ThisFrame, you would use the following in the Get URL:

JavaScript:parent.ThisFrame.PlayFlash()

When using Java applets as well as Flash, sometimes the browser loses
track of the Frame name structure (normally during intermittent Web
connections), so I always place functions in the parent frame. This is a
good place to place JavaScript functions and always works even under
poor Web connections.

So I place the function in the Frameset and would use:

JavaScript:parent.PlayFlash()

----------- -----------------------
John Croteau croteauaterols [dot] com (mailto:croteauaterols [dot] com)
------------- -------------------------
Flash Central(The Universe Starts Here) http://www.FlashCentral.com/
FlashTeK(Advanced Websites with Flash) http://www.CrownMall.com/Flash/
The Flash Tech Resource (Tech Notes) http://www.FlashCentral.com/tech/
Need a PC ? -- Computer King -- http://www.crownmall.com/computers/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


Replies
  Javascript in Flash 2, steven warren

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