Flasher Archive

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


Subject: Re: FLASH: Passing Variables through a frameset...follow up.
From: Bryan Rieger
Date: Wed, 12 Jul 2000 23:31:48 +0100

Flasher,

If anybody's interested, we came up with the following solution - based on
Helen and Branden's suggestions. Thanks for your help.


The following html page is used to create a frameset with two frames, and
pass the label from the previous link. You can do this manually in the
following format:

http:///www.yourserver.com/test/index.html?labelName=anotherLabel


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Frameset</title>

<script language="JavaScript">
<!-- Hide from older browsers
// Set default label to jump to if no search string is specified.
var defaultLabel = "?labelName=first";
var swfLabel = (location.search) ? location.search : defaultLabel;

// if query string ('?' after URL) set content variable to what follows the
'?'
// otherwise, start fresh by setting content variable to the defaultLabel.

// End -->
</script>

</head>

<script language = "JavaScript">
<!-- Begin
document.write('<!-- frameset -->');
document.write('<frameset rows="160,*" border=0 frameborder=0>');
document.write('<frame name="flash" src="flash_nav.html'+swfLabel+'"
scrolling="NO" noresize marginwidth="0" marginheight="0"
bordercolor="#000000">');

document.write('<frame name="popMain" src="blank.html'+swfLabel+'"
scrolling="AUTO" noresize marginwidth="0" marginheight="0"
bordercolor="#FFFFFF">');
document.write('</frameset>');
document.write('<noframes></noframes>');
// End -->
</script>

<!-- body -->
<body bgcolor="#00000">
</body>

</html>

And now to pass the variable back to the Flash movie...
You have to ensure that you check the 'location.search' string and set your
global variable appropriately. You should also include some form of default
just incase somebody comes to the page through a backdoor. Then using write
statements pass the variable through your object/embed src statements.

<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">

<head>
<TITLE>Flash navigation/Top Banner</TITLE>

<script language="JavaScript">
<!-- Hide from older browsers
// Set default label to jumpt to if no search string is specified.
var defaultLabel = "?labelName=first";
var swfLabel = (location.search) ? location.search : defaultLabel;

// if query string ('?' after URL) set content variable to what follows the
'?'
// otherwise, start fresh by setting content variable to the defaultLabel.

// End -->
</script>
</head>

<script language = "JavaScript">

<!-- Begin
document.write('<BODY bgcolor="#000000">');
document.write('<layer top="0" left="0">');
document.write('<div style="position:absolute;top:0;left:0"> <OBJECT
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write('
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0
,0"');
document.write(' ID=credits WIDTH=400 HEIGHT=160 name="djsNav">');
document.write(' <PARAM NAME=movie VALUE="djs_nav.swf'+swfLabel+'">');
document.write(' <PARAM NAME=quality VALUE=high>');
document.write(' <PARAM NAME=bgcolor VALUE=#000000>');
document.write(' <EMBED src="djs_nav.swf'+swfLabel+'" quality=high
bgcolor=#000000 WIDTH=400 HEIGHT=160 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash" name="djsNav">');
document.write('</EMBED>');
document.write('</OBJECT>');
document.write('</div>');
document.write('</layer>');
document.write('</BODY>');
// End -->
</script>

</HTML>

If anybody has any questions I'd be happy to answer them as best I can.
Again, thank you Brenden and Helen for your suggestions. Definately started
me out on the right track.

Cheers,

Bryan Rieger
Developer/Collaborator

Trapeze Media
http://www.trapeze.com/

BTW - you don't need as many document.write lines - I just decided to write
that entire block for the hell of it. ;-)



flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  RE: FLASH: Passing Variables through a f, Leonardo J. Creo

Replies
  RE: FLASH: Passing Variables through a f, Branden Hall

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