Rodrigo Peres wrote:

> I need to pass some parameters from browser to my shockwave movie,
[snip]

> parametro = location.search;

hmm, this line gives me an error (NN4.7 & IE5/Mac)

I'm not exactly clear what it is you're trying to do... but
the best option I have found for passing javascript-derived
info to a SW movie is of the form:

    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!-- Hide
    
    // Get location string, for example
    
    nav_loc = String(document.location.href);

    // Write Object and Embed Tag
    
    document.write('<OBJECT
CLASSID="clsid:166B1BCA-3F9C-11CF-8075-444553540000"
CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#
version=7,0,2,0" WIDTH="320" HEIGHT="240"><PARAM NAME="src"
VALUE="your.dcr"><PARAM NAME="SWLIVECONNECT" VALUE="0"><PARAM NAME="sw1"
value="' + nav_loc + '"><EMBED src="your.dcr"
pluginspage="http://www.macromedia.com/shockwave/download/" width="320"
height="240" sw1="' + nav_loc + '"><\/EMBED><\/OBJECT>');
    
    // End Hide -->
    </SCRIPT> 

that way you can dynamically assign any number of externalParams
which can easily be read in Director using something like

on getParamFromHTML whichParam
  if externalParamName(whichParam) = whichParam then
    --alert (whichParam && externalParamValue(whichParam))
    return externalParamValue(whichParam)
  else
    alert "No '" & whichParam & "' parameter in the HTML!"
    return ""
  end if
end

put getParamFromHTML("sw1")
-- "http://www.yourServer.com/yourDirectory/page.html"

regards,

Christian

----------------------------
Christian Wach
[EMAIL PROTECTED]
----------------------------


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to