Sep 2nd, 2010, 5:32 PM
Ben,
Could you please explain how to integrate Form Tools 2.0.2 into Flash? Below is my HTML code for my index.html page that holds the Flash file.
<object id="FlashID" classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" width="980" height="750" />
<param name="movie" value="site.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<param name="swfversion" value="8.0.35.0">
<param action="http://domain.com/secure/process.php" method="post">
<param type="hidden" name="form_tools_initialize_form" value="1" />
<param type="hidden" name="form_tools_form_id" value="66" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="../Scripts/expressInstall.swf">
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="site.swf" width="980" height="750">
<!--<![endif]-->
<param name="quality" value="high">
<param name="wmode" value="transparent">
<param name="swfversion" value="8.0.35.0">
<param name="expressinstall" value="../Scripts/expressInstall.swf">
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>
<div id="footerlogo" style="margin-left:800px;" ><a href="http://domain.com" target="_blank">Powered by Company</a></div>
<script type="text/javascript">
var so = new SWFObject("footer.swf", "mymovie", "175", "23", "9", "#000000");
so.addParam("wmode", "transparent");
so.write("footerlogo");
</script>
Then here is my ActionScript code in AS 2.0.
stop ();
System.useCodepage = true;
send_btn.onRelease = function ()
{
submittedData = new LoadVars();
submittedData.action = "POST";
submittedData.name = name_box.text;
submittedData.sender = email_box.text;
submittedData.subject = phone_box.text;
submittedData.message = message_box.text;
submittedData.form_tools_initialize_form = 1;
submittedData.form_tools_form_id = 66;
if (submittedData.name != "" && submittedData.sender != "" && submittedData.subject != "" && submittedData.message != "")
{
submittedData.sendAndLoad("http://www.domain.com/secure/process.php", submittedData, "POST");
gotoAndStop(2);
}
else
{
error_clip.gotoAndPlay(2);
} // end else if
submittedData.onLoad = function ()
{
gotoAndStop(3);
};
};
name_box.onSetFocus = email_box.onSetFocus = phone_box.onSetFocus = message_box.onSetFocus = function ()
{
if (error_clip._currentframe != 1)
{
error_clip.gotoAndPlay(6);
} // end if
};
FIRST
- I am unable to register this form with Form Tools using the Add Form process. What do I need to do to get it registered and also does my code above look correct for ActionScript 2.0 and HTML?
Thanks,
Diesel
Could you please explain how to integrate Form Tools 2.0.2 into Flash? Below is my HTML code for my index.html page that holds the Flash file.
<object id="FlashID" classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" width="980" height="750" />
<param name="movie" value="site.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<param name="swfversion" value="8.0.35.0">
<param action="http://domain.com/secure/process.php" method="post">
<param type="hidden" name="form_tools_initialize_form" value="1" />
<param type="hidden" name="form_tools_form_id" value="66" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="../Scripts/expressInstall.swf">
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="site.swf" width="980" height="750">
<!--<![endif]-->
<param name="quality" value="high">
<param name="wmode" value="transparent">
<param name="swfversion" value="8.0.35.0">
<param name="expressinstall" value="../Scripts/expressInstall.swf">
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>
<div id="footerlogo" style="margin-left:800px;" ><a href="http://domain.com" target="_blank">Powered by Company</a></div>
<script type="text/javascript">
var so = new SWFObject("footer.swf", "mymovie", "175", "23", "9", "#000000");
so.addParam("wmode", "transparent");
so.write("footerlogo");
</script>
Then here is my ActionScript code in AS 2.0.
stop ();
System.useCodepage = true;
send_btn.onRelease = function ()
{
submittedData = new LoadVars();
submittedData.action = "POST";
submittedData.name = name_box.text;
submittedData.sender = email_box.text;
submittedData.subject = phone_box.text;
submittedData.message = message_box.text;
submittedData.form_tools_initialize_form = 1;
submittedData.form_tools_form_id = 66;
if (submittedData.name != "" && submittedData.sender != "" && submittedData.subject != "" && submittedData.message != "")
{
submittedData.sendAndLoad("http://www.domain.com/secure/process.php", submittedData, "POST");
gotoAndStop(2);
}
else
{
error_clip.gotoAndPlay(2);
} // end else if
submittedData.onLoad = function ()
{
gotoAndStop(3);
};
};
name_box.onSetFocus = email_box.onSetFocus = phone_box.onSetFocus = message_box.onSetFocus = function ()
{
if (error_clip._currentframe != 1)
{
error_clip.gotoAndPlay(6);
} // end if
};
FIRST
- I am unable to register this form with Form Tools using the Add Form process. What do I need to do to get it registered and also does my code above look correct for ActionScript 2.0 and HTML?
Thanks,
Diesel