|
Post by keano on Aug 31, 2007 11:16:31 GMT 2
Vil i ik skrive alle de action scrips i kender her:D
|
|
|
Post by bazen on Sept 1, 2007 12:47:01 GMT 2
jo her er det til et dress up spil..
lav et movieklip med noget tøj.. movieklippets kode skal være: on(press){ startDrag(this,false); } on(release){ stopDrag(); }
|
|
|
Post by bazen on Sept 1, 2007 12:47:56 GMT 2
Instance name Player
banens intance name ground:
kode til Player
onClipEvent (load) { gravity = 10; scale = _xscale; walkSpeed = 6; maxjump = 0.2; } onClipEvent (enterFrame) { if (air == true) { _y += gravity; state = 3; } if (Key.isDown(Key.LEFT) && !_root.leftbound.hitTest(_x, _y, true)) { _x -= walkSpeed; _xscale = -scale; } if (Key.isDown(Key.RIGHT) && !_root.rightbound.hitTest(_x, _y, true)) { _x += walkSpeed; _xscale = scale; } if (_root.ground.hitTest(_x, _y, true)) { air = false; } else { air = true; } if (Key.isDown(Key.UP) && jump == true) { _y -= jumpSpeed; } if (air == false) { jump = true; jumpcount = 0; jumpSpeed = 22; } if (Key.isDown(Key.UP)) { jumpcount += 1; } if (jumpcount>maxjump && jumpSpeed>-2) { jumpSpeed -= 2; } if (air == false && !Key.isDown(Key.LEFT) && !Key.isDown(65) && _currentframe<4 or air == false && !Key.isDown(Key.RIGHT) && !Key.isDown(65) && _currentframe<4) { state = 1; } if (Key.isDown(Key.LEFT) && air == false && !Key.isDown(65) && _currentframe<4 or Key.isDown(Key.RIGHT) && air == false && !Key.isDown(65) && _currentframe<4) { state = 2; } if (!Key.isDown(65)) { gotoAndStop(state); } _root.statetxt = state; } onClipEvent (keyUp) { if (Key.getCode() == 83) { jump = false; } }
|
|
|
Post by bazen on Sept 1, 2007 12:49:14 GMT 2
|
|
|
Post by keano on Sept 3, 2007 18:56:40 GMT 2
tak
|
|
|
Post by bazen on Oct 21, 2007 19:44:03 GMT 2
playeren skal vist bestå a 3 frames... 1 frame står stille, 2 frame skal han gå til venstre (eller omvendt) og 3 skal han gå til højre (eller omvendt).. håber det hjalp..
|
|