# Loading True Statement problem

**URL:** <https://forum.kirupa.com/t/loading-true-statement-problem/21223>\
**Category:** flash\
**Created:** [May 19, 2003, 5:07am UTC](https://forum.kirupa.com/t/loading-true-statement-problem/21223 "2003-05-19T05:07:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafi33](https://avatars.discourse-cdn.com/v4/letter/r/7ab992/32.png) [@Rafi33](https://forum.kirupa.com/u/Rafi33)\
**Post date:** [May 19, 2003, 5:07am UTC](https://forum.kirupa.com/t/loading-true-statement-problem/21223/1 "2003-05-19T05:07:10Z")

</div>

i HAVE A KIDS PUZZLE GAME…WHERE KIDS TAKE A BODY PART AND PLACE IT ONTO THE RIGHT PLACE OF A GRAYED OUT VERSION OF THE FULL BODY…NOW AFTER ALL THE PARTS HAVE BEEN DRAGGED I WOULD LIKE AN ANIMATION TO LOAD…SO I HAVE USED STATEMENTS ON EACH BODY PART MOVIE CLIP SAYING WHETHERE THEY ARE TRUE OR NOT…THEN ON MY ACTIONS LAYER I HAVE SAID IF ALL THE BODY PARTS ARE TRUE…LOAD ANIMATION…BUT IT DOESN’T SEEM TO WORK…HERE’S THE FILE…

```
INSIDE EACH MOVIE CLIP(BODY PART)

```

on(press){  
startDrag("");

}  
on(release){

```
stopDrag();
if (this.hitTest(_root.Bodymc))
{
	
this._x=279;
this._y=288;
_root.Description.gotoAndPlay("LegText");
_root.Balloon.gotoAndPlay("moveup");
_root.thePart=BodyCmc;
BodyCmc=true;
trace(BodyCmc);

}

else{
	this._x=650;
	this._y=124;

}

```

}  
MAIN TIME LINE  
thePart=function(tracingPart){  
trace(tracingPart);  
}  
CheckBodyParts=function(){  
if (RightArmCmc && LeftArmCmc && RightLegCmc && LeftLegCmc && HeadCmc && HeartCmc && BodyCmc){  
gotoAndPlay(15);  
}  
}

stop();

THANKS

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 2:48pm UTC](https://forum.kirupa.com/t/loading-true-statement-problem/21223/2 "2003-05-19T14:48:29Z")

</div>

Hi,  
Do you do everything in CAPS ?

Instead of your body parts function, declare a var count in your main timeline, do not give it a value.

On your buttons in each mc, if the hitTest is true and they have dropped the correct body part in the right place ( sounds very macabre !) put :  
[AS] \_root.count++  
if( \_root.count = //put the number of body parts you have here){  
animation.play();  
}[/AS]

count++ will increase the var count by 1 each time a body part is released in the correct place, when it equals the number of parts you have the animation will work, by increaseing by ++ will allow the user to drop the bp’s in whatever order they wish

Hope that helps

SteveD

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 11:51pm UTC](https://forum.kirupa.com/t/loading-true-statement-problem/21223/3 "2003-05-19T23:51:08Z")

</div>

I did that but it give me undefined when i run a trace…the thing is there’s 2 if statement…one is the 1st if and the other is count++ if…what do i really put in the main timeline???

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 19, 2003, 11:54pm UTC](https://forum.kirupa.com/t/loading-true-statement-problem/21223/4 "2003-05-19T23:54:30Z")

</div>

:q: double post :q:

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=23687](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=23687)  
:-\ :-\

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 20, 2003, 5:59am UTC](https://forum.kirupa.com/t/loading-true-statement-problem/21223/5 "2003-05-20T05:59:27Z")

</div>

Hi,  
Didn’t realise this was a cross post, but I will continue here unless a moderator moves it if that is OK  
Try this:  
[AS]on(release){  
stopDrag();  
//  
if (this.hitTest(\_root.Bodymc)){  
**\_root.count++;**  
this.\_x=279;  
this.\_y=288;  
**if(\_root.count==//totlanumBodypart){  
\_root.gotoAndPlay(15)**  
//  
\_root.Description.gotoAndPlay(“LegText”);  
\_root.Balloon.gotoAndPlay(“moveup”);  
\_root.thePart=BodyCmc;  
BodyCmc=true;  
trace(BodyCmc);  
**}** //closes second if statement  
}[/AS]

and on the \_root just put  
[AS]var count[/AS]

Instead of running a trace, place a dynamic text box on stage where you can see it give it the var name **count** ( just for testing purposes, so that you can see it in action)

If that doesn’t work either post your fla or send it to me  
[HERE](mailto:stephendop@aol.com) and I 'll see if I can have a look for you. You’re working in 5 right ?

Hope that helps

SteveD
