Results 1 to 5 of 5

Thread: LOOP AS

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: May:2009
    Location: varna
    Posts: 14

    LOOP AS

    ,

    , , ? !

    baslama_suresi = 50;
    kar_seyrekligi = 1;
    kar_hiz = 0.5;
    kar_boyut = 0;
    bitis_suresi = 3500;


    a = 0;
    i = -1;
    mc._y = -mc._height;
    function cogalt() {
    a++;
    if (a>bitis_suresi) {
    clearInterval(z);
    }
    i++;
    _root.mc.duplicateMovieClip("mc"+i, i);
    _root["mc"+i].hiz = kar_hiz+random(6);
    _root["mc"+i].boyut = kar_boyut+random(5);
    _root["mc"+i]._x = random(Stage.width);
    _root["mc"+i].rasgele = random(2);
    _root["mc"+i].cacheAsBitmap(true);
    if (_root["mc"+i].rasgele == 0) {
    _root["mc"+i].konum = -(random(3));
    } else {
    _root["mc"+i].konum = +(random(3));
    }
    _root["mc"+i].onEnterFrame = function() {
    this._y += this.hiz;
    this._x += this.konum;
    this._width = this._height=this.boyut;
    if (this._x>Stage.width or this._x<0 or this._y>Stage.height) {
    delete this.onEnterFrame;
    removeMovieClip(this);
    }
    if (_root.engel.hitTest(this._x, this._y, true)) {
    delete this.onEnterFrame;
    }
    };
    }
    s = 0;
    function sure() {
    s++;
    if (s>baslama_suresi) {
    z = setInterval(cogalt, kar_seyrekligi);
    clearInterval(zamanla);
    }
    }
    zamanla = setInterval(sure, 90);

  2. #2
    Registered User 's Avatar
    Join Date: Feb:2006
    Location:
    Posts: 653
    , , .

  3. #3
    Creative destructor OgiDogi's Avatar
    Join Date: Nov:2002
    Location:
    Posts: 7,601
    Quote Originally Posted by bobibene View Post
    ,

    , , ? !

    baslama_suresi = 50;
    kar_seyrekligi = 1;
    kar_hiz = 0.5;
    kar_boyut = 0;
    bitis_suresi = 3500;


    a = 0;
    i = -1;
    mc._y = -mc._height;
    function cogalt() {
    a++;
    if (a>bitis_suresi) {
    clearInterval(z);
    }
    i++;
    _root.mc.duplicateMovieClip("mc"+i, i);
    _root["mc"+i].hiz = kar_hiz+random(6);
    _root["mc"+i].boyut = kar_boyut+random(5);
    _root["mc"+i]._x = random(Stage.width);
    _root["mc"+i].rasgele = random(2);
    _root["mc"+i].cacheAsBitmap(true);
    if (_root["mc"+i].rasgele == 0) {
    _root["mc"+i].konum = -(random(3));
    } else {
    _root["mc"+i].konum = +(random(3));
    }
    _root["mc"+i].onEnterFrame = function() {
    this._y += this.hiz;
    this._x += this.konum;
    this._width = this._height=this.boyut;
    if (this._x>Stage.width or this._x<0 or this._y>Stage.height) {
    delete this.onEnterFrame;
    removeMovieClip(this);
    }
    if (_root.engel.hitTest(this._x, this._y, true)) {
    delete this.onEnterFrame;
    }
    };
    }
    s = 0;
    function sure() {
    s++;
    if (s>baslama_suresi) {
    z = setInterval(cogalt, kar_seyrekligi);
    clearInterval(zamanla);
    }
    }
    zamanla = setInterval(sure, 90);
    kar_seyrekligi = 0

  4. #4
    Registered User
    Join Date: May:2009
    Location: varna
    Posts: 14
    .
    "" , ?

    .

  5. #5
    Registered User 's Avatar
    Join Date: Feb:2006
    Location:
    Posts: 653
    - . setInterval , , , clearInterval . , .

Posting Permissions

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

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |