A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Timer for non-english game

  1. #1
    Junior Member
    Join Date
    Feb 2006
    Posts
    14

    Timer for non-english game

    hi. i got a script off this website but its not in english...
    Im using flash 8



    function treffer(obj, pkt) {
    // wenn flugobjekt von sprungobjekt getroffen
    // dann punkte vergeben und wieder nach links positionieren
    if (obj.hitTest(_root.objekt.mund)) {
    if (obj.kind == "moehre") {
    // Punkte hochzählen
    _root.punkte = _root.punkte + (pkt*2);
    }
    if (obj.kind == "traube") {
    // Punkte hochzählen
    _root.punkte = _root.punkte + pkt;
    }
    if (obj.kind == "pilz" and _root.punkte <> 0) {
    // Punkte hochzählen
    _root.punkte =Math.ceil (_root.Punkte/2);
    _root.objekt.pilz =true;
    }
    // Sprungobjekt sagen, dass es wieder nach unten fliegen soll
    _root.objekt.spring = 2;
    _root.objekt.treffer = true;
    // Flugobjekte wieder an ihrer Ausgangsposition positionieren
    if (obj.startwo == "links") {
    obj._x = -22;
    } else {
    obj._x = 660;
    }
    // startvariable vorsichtshalber auf Null setzen, damit das Ding nicht gleich wieder losfliegt
    obj.start_this =0;
    }
    }
    function bewege(obj) {
    // gesteuert per random wandert das flugobjekt von links nach rechts
    if (obj.start_this <> 1) {
    obj.start_this = random(15);
    obj.wohin = random(15);
    if (obj.wohin < 3) {
    obj.gotoAndStop(3);
    } else if (obj.wohin > 3 and obj.wohin < 8) {
    obj.gotoAndStop(2);
    } else {
    obj.gotoAndStop(1);
    }
    } else {
    if (obj.startwo == "rechts") {
    obj._x = obj._x - 11;
    }
    if (obj.startwo == "links") {
    obj._x = obj._x + 11;
    }
    }
    // wenn das flugobjekt über den Rand hinaus ist, soll es wieder zu seinem Ausgangspunkt zurück
    if (obj.startwo == "links" and obj._x > 666) {
    obj._x = -33;
    obj.start_this =2;
    }
    if (obj.startwo == "rechts" and obj._x < 0) {
    obj._x = 660;
    obj.start_this =2;
    }
    }
    _root.punkte = 0;
    My game came out like this, not understanding the script.
    http://media.putfile.com/Peach--Glide-and-Grab

    Well. Now the real problem is i want to add on a timer. so that when the timer
    runs out you go to the time over screen. can anybody tell me where to put allof this time AS?
    Last edited by mutt124; 04-29-2006 at 07:06 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center