|
||||||
|
||||||
Tutorial: Send Information to Flash with JavaScript

Free Flash & JavaScript Tutorial
Method 1: An Example of what the HTML webpage script would look like:
<html>
<head>
<title>Send Info To Flash</title>
<script language="javascript" type="text/javascript">
function SendMyInfo() {
// Remove the "Please Enter A Message To Be Sent To Flash" if you do not what a default message to appear in the prompt
// The "Enter a number to change the car size and press ok" is the question that you want to prompt the user for an answer to.
// You may change this to anything question you like
var GetMessage = prompt("Please Enter A Message To Be Sent To Flash", "Type A Number Here And Click Ok");
if (GetMessage == null) {
//Remove The Line Below If You Do Not Want A Cancel Message Sent To Flash
window.document.GetInfo.SetVariable("carWidth", "100");
} else {
window.document.GetInfo.SetVariable("carWidth", GetMessage);
}
}
</script>
</head>
<body onLoad="window.document.GetInfo.SetVariable("text" "Hello this is a start up message!");">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ID="GetInfo" width="410" height="160">
<param name="movie" value="send-info.swf">
<param name="quality" value="high">
<embed NAME="GetInfo" src="send-info.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="410" height="160"></embed>
</object>
<form name="formSendInfo" method="post" action="">
<input type="button" name="Button" value="Click Here To Send Your Own Message To Flash" onClick="SendMyInfo();">
</form>
</body>
</html>
Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates
|
|
|

Webwasp is Phil Schulz's baby. You are welcome to contact me or become my Facebook friend:
Click here
All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.
|