Hello,
I am in the middle of creating or trying to create an interactive game. Basically the idea of the game is the user has to dress a Teddy in a space suit ready for his adventure. When the user has done this then they will be moved on to the "next level" where they have to put Teddy inside the Rocket. When they complete this bit Teddy will then take off to the Moon.
Simple enough i thought...
So i have got to the point where i have the first level completed. I have two ways i could tackle the progression to the next stage. 1, have a delay after the completion of the first stage or 2, have a button pop up that the user clicks to progress.
The only problem is i don't know how to do either. I have tried looking through the help guide but to be honest may as well be in klingon . So how would i go about doing either or if someone is really good at actionscript and feeling generous, both.
Here's the script i have so far. It all happens on frame 1, with the next part happening on whatever frame. I don't think it matters...
PS i found this stuff on this website if anyone is interested. Quite good really and lucky i found it to get this far.Code:stop(); var startX:Number; var startY:Number; var counter:Number = 0; head_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp); head_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt); body_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp); body_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt); legs_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp); legs_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt); righthand_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp); righthand_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt); lefthand_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp); lefthand_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt); rightfoot_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp); rightfoot_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt); leftfoot_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp); leftfoot_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt); function pickUp(event:MouseEvent):void { event.target.startDrag(true); reply_txt.text = ""; startX = event.target.x; startY = event.target.y; } function dropIt(event:MouseEvent):void { event.target.stopDrag(); var myTargetName:String = "target" + event.target.name; var myTarget:DisplayObject = getChildByName(myTargetName); if (event.target.dropTarget != null && event.target.dropTarget.parent == myTarget){ reply_txt.text = "Good Job!"; event.target.removeEventListener(MouseEvent.MOUSE_DOWN, pickUp); event.target.removeEventListener(MouseEvent.MOUSE_UP, dropIt); event.target.buttonMode = false; counter++; } else { reply_txt.text = "Try Again!"; event.target.x = startX; event.target.y = startY; } if(counter == 7){ reply_txt.text = "Well done. Teddy is now dressed!"; } } head_mc.buttonMode = true; body_mc.buttonMode = true; legs_mc.buttonMode = true; righthand_mc.buttonMode = true; lefthand_mc.buttonMode = true; rightfoot_mc.buttonMode = true; leftfoot_mc.buttonMode = true;
Hope you can help. I will share the results when i finished if anyone is daft enough to be interested. Need to touch up on the graphics though![]()



LinkBack URL
About LinkBacks

Reply With Quote



