Flasher Archive

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


Subject: Re: FLASH: working between two files
From: John Dowdell
Date: Thu, 22 Oct 1998 19:57:10 +0100

At 12:10 PM 10/22/98, anna wrote:
>i have on file which (on rollover a certain button) i want to tell
>the second SWF file to stop. then (on rollout of the same button)
>tell the SWF file to start. seems like it should be possible, is it?
>and how would i go about doing this?


Well, it's *possible*, but a lot depends on your target audience. If
they'll be coming in with old machines and browsers then it may not go. If,
however, a majority of your audience is up-to-date then it should be
achievable. Here's why:

Netscape 3+ and IE/Win32 offer the ability for objects and script to
intercommunicate on the page. While this is typically used to have
JavaScript control Flash, or Flash control JavaScript, it's also possible
to have JavaScript ferry messages between two Flash EMBEDs. This is a
function of the hosting environment:

Good: Java-enabled NS3+ on PowerMac or Win32.
Good: ActiveX-enabled IE3+ on Win32.
Bad: Java-disabled Netscape, plugin-using IE, 68K Mac, Win3.1, IE/Mac.

The "FSCommand" techniques in Flash let you send messages from Flash frames
or buttons to JavaScript. In turn, your JavaScript can send messages to
your movie to go to particular frames, zoom/pan, send events to targets,
etc. Here are two of the main documentation sources, and more can be found
by searching on term "FSCommand":

http://www.macromedia.com/support/flash/ts/documents/tn4160.html
http://www.macromedia.com/support/flash/how/subjects/scriptingwithflash/scri
ptingwithflash.html

For an example of such work, see the Hawaii demo in the "Scripting" folder
on the Flash CD.


Two alternate approaches:

-- The old "javascript:" protocol URLs are a non-LiveConnect way to send
messages from Flash to JavaScript. This works well in 68K & Win3.1 Netscape
environments, and does not require Java, but does not work in IE3/Win32.
This also doesn't help with script->Flash intercommunication.
Special-purpose, and rarely used today.

-- Another tack is to make a *single* Flash movie which loads each of the
two smaller movies. You can give the appearance of multiple Flash movies,
even though the page is actually just a single Flash movie. This lets all
the messaging happen within Flash, in the normal Flash 3 ways.


Wild, wild hunch: If you're trying to make a reusable VCR-like console for
playing a variety of animation files, then perhaps if you have a "shell"
Flash movie which contains the console, and then "LoadMovie" to the various
content files on demand...?


Summary: Object intercommunication in the browser depends on that browser's
capabilities. It's possible to have one movie control another, via message
redirection in JavaScript. There are some other approaches that can also
give similar effects.

jd



John Dowdell, Macromedia Tech Support, San Francisco CA US

Private email options: http://www.macromedia.com/support/priority.html
Search technotes: http://www.macromedia.com/support/search/
Entertainment on the web: http://shockrave.macromedia.com/
Luscious web graphics: http://www.macromedia.com/software/fireworks/



------------------------------------------------------------------------
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


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