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…
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
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???
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 and I 'll see if I can have a look for you. You’re working in 5 right ?