Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Color.setRGB

  1. #1
    Utente di HTML.it L'avatar di koln
    Registrato dal
    Sep 2004
    Messaggi
    388

    Color.setRGB

    codice:
    MovieClip.prototype.attach = function(num) { 
    var xadd:Number = 1;
    var yadd:Number = 2;
    for (i=0; i<num; i++) {
    this.attachMovie("neve", "neve"+count, count);
    currentSnow = _root["neve"+count];
    count++; 
    currentSnow._x = random(550);
    currentSnow._y = random(400);
    currentSnow._alpha = random(200);
    currentSnow._width = random(10);
    currentSnow._height = random(10);
    currentSnow._width = currentSnow._height; 
    currentSnow.onEnterFrame = function() {
    this._x += xadd;
    this._y += yadd;
    if (this._y>stageHeight+(this._height/2)) {
    this._y = 0-(this._height/2);
    }
    
    if (this._x>stageWidth+(this._width/2)) {
    this._x = 0-(this._width/2);
    } 
    };
    }
    };
    init = function () {
    stageHeight = 400;
    stageWidth = 550;
    count = 100;
    attach(950);
    }; 
    init();
    Effetto neve. La neve è bianca ma dovrei cambiargli colore. Ho provato con currentSnow.Color.setRGB(000000); ma non va.
    Un aiuto?
    Grazie.
    La noia è un privilegio che non tutti possono permettersi.

  2. #2
    Utente di HTML.it L'avatar di and80
    Registrato dal
    Mar 2003
    Messaggi
    15,182
    non ti conviene cambiarlo direttamente al clip in libreria?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.