Box validity

liunx

Guest
Hey guys,<br />I've run into a small problem at work. I'm making a math simulation in flash where a student has to build a "box"to fill the right about of area given a formula. The can be built using the right pieces. The pieces are in lenght of 1 unit, 3 units and 5 units.... both vertical and horizontal.<br /><br />The problem for be is with validating whether the box drawn is correct or not. I'm having a really hard time witing the code for this. Any help would be appreciated... in any form.. even pseudo code just to get an idea.<br /><br />I'm guessing I need each pieces coordinates and of course length and I have a function which collects all that data. The problem is with correlating all that data to create a true or false answer.<br /><br />Any ideas?
</div>
<br /><br /><b><span class="edit">Attached image(s)</span></b><br /><img src="http://www.dreamincode.net/forums/uploads/post-62-1133186597.gif" alt="Attached Image" />

<!-- THE POST -->
</td>
</tr>


<tr>
<td class="formbuttonrow" nowrap="nowrap">
<div style='text-align:left'><img src="http://static.dreamincode.net/forums/style_images/dic2.1.6b/p_offline.gif" border='0' alt='User is offline' /><a href="http://www.dreamincode.net/forums/javascript:popUp('http://www.dreamincode.net/forums/index.php?s=9abc7aa0021343e2b58918e1217c7971&act=Profile&CODE=showcard&MID=2572','AddressCard','600','300','0','1','1','1')" title="Show Contact Card"><img src="http://static.dreamincode.net/forums/style_images/dic2.1.6b/p_card.gif" border='0' alt='Profile Card' /></a><a href="http://www.dreamincode.net/forums/index.php?s=9abc7aa0021343e2b58918e1217c7971&act=Msg&CODE=04&MID=2572"><img src="http://static.dreamincode.net/forums/style_images/dic2.1.6b/p_pm.gif" border='0' alt='PM' /></a><!--<a href="http://www.dreamincode.net/forums/index.php?s=9abc7aa0021343e2b58918e1217c7971&act=Mail&CODE=00&MID=2572"><img src="http://static.dreamincode.net/forums/style_images/dic2.1.6b/p_email.gif" border='0' alt='Email Poster' /></a>--></div>
</td>
<td class="formbuttonrow" nowrap="nowrap">
<!-- PM / EMAIL / WWW / MSGR -->
<div style="float: left;">
<br>
<a href="http://www.dreamincode.net/forums/javascript:scroll(0,0);"><img src="http://static.dreamincode.net/forums/style_images/dic2.1.6b/p_up.gif" border='0' alt='Go to the top of the page' /></a>
</div>
<!-- REPORT / UP -->
<div align="right">

<div align="right" style="padding: 5px;"><img src="http://www.dreamincode.net/home/images/thumbsup.gif" border="0">  <a href="http://www.dreamincode.net/?p=thanks&pid=134600" rel="nofollow"><b>This Post Was Helpful!</b></a> <sup><span style="color:red; font-size: 10px;">New!</span></sup></div>


<a href="http://www.dreamincode.net/forums/#" onclick="multiquote_add(134600); return false;" title="Toggle multiquote addition"><img src="http://static.dreamincode.net/forums/style_images/dic2.1.6b/p_mq_add.gif" name="mad_134600" alt="+" /></a><a href="http://www.dreamincode.net/forums/index.php?s=9abc7aa0021343e2b58918e1217c7971&act=Post&CODE=02&f=62&t=13468&qpid=134600" title="Reply directly to this post"><img src="http://static.dreamincode.net/forums/style_images/dic2.1.6b/p_quote.gif" border='0' alt='Quote Post' /></a>
</div>

</td>
</tr>

</table>

<script type='text/javascript'>
//<![CDATA[
if ( ajax_loaded && use_enhanced_js )
{
menu_build_menu( 'edit-but-134600',
new Array( img_item + " <a title='Full edit screen with all options' href='http://www.dreamincode.net/forums/index.php?s=9abc7aa0021343e2b58918e1217c7971&act=post&do=edit_post&f=62&t=13468&p=134600&st='>Full Edit</a>",
img_item + " <a href='http://www.dreamincode.net/forums/#' title='Edit this post in place with basic options' onclick='return ajax_prep_for_edit(134600, event);'>Quick Edit</a>" ) );
}
//]]>
</script>
<br/><div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-9822709549810875";
/* 468x60, created 5/9/08 */
google_ad_slot = "0893566886";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<br><!--Begin Msg Number 134621-->


<table class='ipbtable' cellspacing="1" style="border: 1px #CCCCCC solid;">
<tr>
<td valign="middle" class="row2" width="1%"><a name="entry134621"></a><span class="normalname"><a href='http://www.dreamincode.net/forums/index.php?s=9abc7aa0021343e2b58918e1217c7971&showuser=2572'>pioSko</a></span></td>
<td class="row2" valign="top" width="99%">
<!-- POSTED DATE DIV -->
<div style="float: left;">
<span class="postdetails"> <img src="http://static.dreamincode.net/forums/style_images/dic2.1.6b/to_post_off.gif" alt='post' border='0' style='padding-bottom:2px' /> 28 Nov, 2005 - 09:27 AM</span>
</div>
<!-- REPORT / DELETE / EDIT / QUOTE DIV -->
<div align="right">
<span class="postdetails"> Post
<a title="Show the link to this post" href="http://www.dreamincode.net/forums/#" onclick="link_to_post(134621); return false;">#2</a></span>
</div>
</td>
</tr>
<tr>
<td valign="top" class="post1">
<span class="postdetails">
<br /><br />
still.dreaming<br /><br />
<a href="http://www.dreamincode.net/?p=about#badges" rel="nofollow"><img src="http://www.dreamincode.net/forums/alumni_group.gif" alt="Group Icon" /></a><br />
<!--Group: Alumni<br />-->
Joined: 6 Jun, 2003<br />
Posts: 1,888
</span><br /> <img src="http://static.dreamincode.net/forums/style_images/dic2.1.6b/spacer.gif" alt="" width="100" height="1" />

</td>
<td width="100%" valign="top" class="post1" id='post-main-134621'>
<!-- THE POST 134621 -->
<div class="postcolor" id='post-134621'>


You guys rock.. I swear.<br /><br />All I needed to do was to paste the problem and straight away I got an idea... it must be all the creative programming juices left behind by all the users <img src="http://static.dreamincode.net/forums/style_emoticons/default/tongue.gif" style="vertical-align:middle" emoid=":p" border="0" alt="tongue.gif" /><br /><br />Once I get it working I'll post it up just to close the post.
</div>
 
Top