data_to_shockWave

  sending data to a shockWave
shockwave sending data




  sending data to a shockWave
Steven Warren wrote


There's only one variable, called "emaildata" that gets 
passed in the email string to director.  The format for the email link is this:

"http://www.yoursite.com/shockwavedirectory/yourfile/index.htm?[emaildata]"

Where emaildata is the info you want to send to your Shockwave file.  
Consider this text string, as a Director formatted list, where you can send a 
list such as this list of lists (or an array of arrays):

[["list", "of", "values"], ["parameterOne", 3, 360], ["parameterTwo", 1, 100]]

This is the page code where your SWF file sits.  It utilizes the emaildata 
variable to create a parameter that you can pass to Director using this 
function in Director:

on putDataIntoMessageWindow
  global emaildata
  set emaildata to externalParamValue("sw1")
  put "emaildata = " & emaildata 
end

This function puts the value of the datastring passed 
into the Director Message Window, and assigns it to a global variable.  

Look for instances of the variable "emaildata" and the parameter "sw1" 
to understand this simple HTML code:

(note: Don't try to customize the parameter names... you can only use 
these valid names: sw1, sw2, sw3..., sw9.  These are the only valid 
parameter names recognized by Director.)

------------------ index.htm --------------------


<html>
<head>
<title>evilsteven@mindspring.com does not support this code</title>
</head>

<body>
<center>
<h1>yourDIRfile.dcr</h1>
  <p><br>
  
<script language="JavaScript"> 
var emaildata = location.search.substring(1)
        

document.write('<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000"')
document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=7,0,0,0"')
document.write('width="562" height="400">')
document.write('     <PARAM NAME=src VALUE="yourDIRfile.dcr">')
document.write('     <PARAM NAME="sw1" VALUE="' + emaildata + '">')
document.write('     <embed src="yourDIRfile.dcr" ');
document.write('pluginspage="http://www.macromedia.com/shockwave/download/" ')
document.write('width="562" height="400" sw1="' + musicdata + '"></embed>')
document.write('</OBJECT>')

</script>
  
  
</center>
</body>
</html>

-----------------------  end index.htm ----------------------


Home shock + cgi Bits 'n pieces Director Lingo ShockLets Contact