• 1ER CODE

    onSelfEvent (enterFrame, includingFirstFrame) {
    //Move it
    _x += velX;
    if (_x > width/2) {
    velX -= Math.random()*speed*(s/100);
    }
    else {
    velX += Math.random()*speed*(s/100);
    }
    _y += velY;
    //Gravity
    velY += gravity/50;
    }


    2 CODE


    onSelfEvent (load) {
    n = 80;
    // number of snowballs (also affect how far they fall)
    width = 550;
    // width of spread
    speed = 3;
    // speed (across wise)
    gravity = 10;
    // gravity rate (smaller to fall slower)
    curDepth = 1;
    spriteName = curDepth;
    SnowBall.velX = 0;
    SnowBall.velY = 0;
    SnowBall.width = width;
    SnowBall.s = 100;
    SnowBall.speed = speed;
    SnowBall.gravity = gravity;
    }
    onSelfEvent (enterFrame, includingFirstFrame) {
    //make sure the oroginal snowball stays at the top
    SnowBall.velX = 0;
    SnowBall.velY = 0;
    //create a new snowball
    spriteName = curDepth;
    SnowBall.duplicateMovieClip(spriteName,curDepth);
    //give it some motion
    eval(spriteName)._x = (Math.random()-0.5) * (width*3/2) + width/2;
    eval(spriteName)._y = -20;
    s = Math.random() * 90;
    eval(spriteName).s = s;
    eval(spriteName).velX = (Math.random()-0.5) * speed * 2 *(s/100);
    eval(spriteName).velY = Math.random() * speed / 2 *(s/100);
    eval(spriteName)._alpha = 100-s;
    eval(spriteName)._xscale = s+10;
    eval(spriteName)._yscale = s+10;
    eval(spriteName).speed = speed;
    eval(spriteName).gravity = gravity;
    eval(spriteName).width = width;
    //reuse old snowballs
    curDepth++;
    if (curDepth > n) {
    curDepth = 1;
    }
    }


    votre commentaire
  • on (release) {
    play();
    }


    CODE POUR LE TEXTE


    on (press) {
    gotoAndPlay(1)}

    CODE POUR LE GIF A DEPLACER


    onFrame (1) {
    stop();
    }


    CODE POUR SCRIPT RESUME SENE 1


    votre commentaire
  • onSelfEvent (enterFrame) {
    now = new Date();
    hour = now.getHours();
    minutes = now.getMinutes();
    seconds = now.getSeconds();
    extension = "";
    if (hour >= 0) {
    extension = "";
    if (hour > 24) {
    hour = hour - 24;
    }
    }
    if (hour == 0) {
    hour = 0;
    }
    if (minutes < 10) {
    minutes = "0" add minutes;
    }
    if (seconds < 10) {
    seconds = "0" add seconds;
    }
    horloge.text = hour add ":" add minutes add ":" add seconds add " " add extension;
    }


    votre commentaire
  • onSelfEvent (enterFrame) {
    _rotation += _xmouse/20;
    }

    rOTATION D4UN OBJET AVEC LA SOURIS


    votre commentaire
  • onSelfEvent
    (rollOut) {
    startDrag(_target, false);
    }


    OBJET QUI SUIT LA SOURIS


    votre commentaire


    Suivre le flux RSS des articles de cette rubrique
    Suivre le flux RSS des commentaires de cette rubrique