If you open a new window and give it a name in the process (this
happens in JavaScript, and the Action is probably doing it without
giving you an option about it) then any subsequent calls to the same
name will populate that named window with the desired content if the
window already exists, or open a new one and give it that name if it
doesn’t.
The Link to File Action does something different, though, at least I
think it does. Rather than opening a window explicitly with a command
like window.open('page.html','window_name', other parameters)
, all
it does is create an HTML link to the file and let the browser work
out what it’s going to do with that file. In other words, it uses
default browser behavior, and in cases where a file cannot be managed
by the browser alone (anything except Web-friendly image formats and
HTML) then the browser will usually create a new blank generic window
and then download the file to the default download location, or in
the case of something that it does understand, like QuickTime or
other plug-in content, it will use the appropriate plug-in to display
the non-Web content in that new browser-default window.
Contrast this behavior with using the Spawn New Window or Link to New
Window Actions:
In those cases, you must first create an HTML page to hold the non-
standard content, place that non-standard content within the page,
let Freeway write whatever plug-in “glue” code is needed to work
around various browser failings (cough, cough, IE, cough) and then
use the Action to select that “wrapper page” as the content to load
into a named, sized, and fully-configured daughter window. (Using
either of these Actions, you can set the daughter window to have no
tool bar, no scroll bars, to be fixed-size, etc., and you can also
name the daughter window so that it can be re-used.)
Here’s how I would work this out.
Make a new Master Page just for your media items (sound files,
movies, whatever). Make it small and give it a generic headline like
Media Player or similar, and put an instance of the Close Button
Action (part of Spawn New Window) prominently marked as “Close this
Window” or similar in the top-right corner. Put an HTML box in the
middle of this master page. On each copy of the page that you make
(one per media file) simply drag the media file into the HTML box to
place it, and give the page a meaningful filename so you can spot it
in the list when it comes time to link to it. Repeat for each of your
media files.
Now draw a graphic box on the page from which you want to launch this
media player (your music index page, for example). Fill it with
graphic text identifying the track you want to play, and the
instruction Click to Play or whatever. Apply the Spawn New Window
Action to this graphic. Set the preferences for a window size and
other controls as you like, and choose the first “media page” you
made in the previous step. Once you have all these settings as you
like, test it out and make sure that it opens the way you expect.
When everything is configured, use step and repeat or copy and paste
to create duplicates of this original configured graphic. (All the
Action settings – and the Action itself – will come along for the
ride when it’s copied.) Change the text in the box, change the target
page in the Actions palette, repeat for each media file. (You won’t
need to make all those configuration setting changes if you follow
this technique – only change the one or two things that matter.)
Now, since all of these buttons are calling – by name – to the one
media player “daughter” window, you will only ever have one little
floating player. If the user closes this daughter window, then fine,
the next click will clone a new one. If they don’t, that’s also fine.
In any case, each click to play a file will open this one window (or
bring it to front if it was hiding behind the main window) and load
the desired media. Since this will be loading a full-fledged Freeway
page, any necessary JavaScript shims or plug-in code libraries will
be invoked, just as any other real page would do. You will not be
relying on the browser to figure it out and do the “right
thing” (which, in the case of IE, is a highly optimistic notion under
even the best of circumstances).
Is this a whole lot more work than linking to the “bare” file? Yes,
of course it is. But welcome to the world of supporting your visitors
– doing the extra work so they don’t end up confused.
Walter
On Nov 25, 2008, at 11:33 AM, seoras wrote:
So; the 'Link to file ’ action I have to link to the mp3 files in
essence opens a ‘new window’ thus no way backwards and resultant
problem. Even though that window is in an existing browser window,
the pop up.
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options