Re: shockwave und Ausgabe in Dateien


[ Dazu: ] [ Schreib dazu ] [ Zettels Traum ] [ FAQ ]

von Daniel am 22.Dezember 96 um 15:46:16:

zu: shockwave und Ausgabe in Dateien von Daniel am 22.Dezember 96 um 15:43:57:


: : >Well I'm stumped and it's not for lack of trying or searching the archives.
: >I'd really like to be able to send some parameters to JavaScript and then
: >have the info (plain ol' HTML) display in a frame other than the one the
: >shockwave is in. It's one of those days, and I can't get my brain around
: >this. :-)
: >Basically, I need to display three .gif images and some HTML in another
: >frame. The image file names need to be passed to the frame as parameters.
: >That way the images can change depending on what is going on in the
: >shockwave frame. I want to dynamically create HTML and display it in a
: >frame.
: >Seems that I knew how to do this once.
: >Yea, I could write some CGI that would take my parameters and then output
: >the results to the specicifed frame. But I'd like to be able to do this on
: >the client.
: Ron
: This is method I use for dynamically create HTML into a second frame using
: JS. I don't know if its the best way but it works well with Netscape. In
: the frame with the shockwave movie create a hidden form. Use a fuction call
: from shockwave to fill the values in the form then display the changes
: using the document.write command.
:
: document.write('<form name="param">');
: document.write('<input type="hidden" name="param1" value=" " size=30>
: ');
: document.write('<input type="hidden" name="param2" value=" " size=30>
: ');
: document.write('<input type="hidden" name="param3" value=" " size=30>
: ');
: document.write('<input type="hidden" name="param4" value="' +
: document.bgColor + '"> ');
: document.write('<input type="hidden" name="param5" value="' +
: document.fgColor + '"> ');
: document.write('<input type="hidden" name="param6" value="' +
: document.linkColor + '"> ');
: document.write('<input type="hidden" name="param7" value="' +
: document.alinkColor + '"> ');
: document.write('<input type="hidden" name="param8" value="' +
: document.vlinkColor + '"> ');
: displaystart(document.forms[0]);
: Param 1 to 3 are for the HTML 4 to 8 relate to colours of the background etc
: Then create a function writes the param to the frame. Output is the name of
: the second frame, the line doc = open("","output"); set the frame name.
: function displaystart(form) {
: doc = open("","output");
: doc.document.write ('<BODY BGCOLOR="' + form.param4.value);
: doc.document.write ('" TEXT="' + form.param5.value);
: doc.document.write ('" LINK="' + form.param6.value);
: doc.document.write ('" ALINK="' + form.param7.value);
: doc.document.write ('" VLINK="' + form.param8.value);
: doc.document.writeln ('">');
: doc.document.write("<Font size=+4><center>Welcome to
: ShockWave Web Page
: Creator<Font>");
: doc.document.write("</BODY>");
: doc.document.close();
: }
: The function that you can call from shockwave to fill the param of the form
:
: function init() {
: maxParam = 8
: }
: // ----------------------------------------------------------------------
: function hello3(parameters) {
: var nParam = hello3.arguments.length;
: var tempString = "";
: var paramLen = 0;
: for (var i = 0; i < nParam; i++) {
: thisArgument = hello3.arguments[i];
: document.param.elements[i].value = thisArgument;
: if (i > 0) tempString += "', '";
: tempString += thisArgument;
: paramLen += thisArgument.length;
: }
: display(document.forms[0]);
: return ("\rHello Shockwave!\r\rYou sent me: '" + tempString + "'\rLength =
: " + paramLen);
: }
: // ----------------------------------------------------------------------
: function clearForm() {
: init();
: for (var i = 0; i < maxParam; i++)
: document.param.elements[i].value = "";
: }
: Build your param in the shockwave movie ie
: set theMsg = "Font size=+4><center>Welcome to
: ShockWave Web Page
: it
: works<Font>
: >From shockwave call the Javascript function hello3 with
: getNetText "JavaScript:hello3(" & theMsg &")"
: Then test for the return string
:
: I have a working demo of a shockwave movie in one frame dynamically create
: HTML in a second frame. I will try and load the example onto a web server
: after the weekend and post the address on the list.
: Glenn Jones



Dazu:



Schreib etwas dazu

 

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

 


[ Follow Ups ] [ Post Followup ] [ Zettels Traum ] [ FAQ ]