[ascoders] AW: Color Extension

  • From: Timo Hölzer <t.hoelzer@xxxxxxxxx>
  • To: <ascoders@xxxxxxxxxxxxx>
  • Date: Wed, 5 Nov 2003 13:01:19 +0100

Danke, hat sich erledigt!

Ganz blöder Tippfehler :(
Ich glaub ich brauch ne Brille!!!

Grüße
Timo H.


-----Ursprüngliche Nachricht-----
Von: ascoders-bounce@xxxxxxxxxxxxx
[mailto:ascoders-bounce@xxxxxxxxxxxxx]Im Auftrag von Timo Hölzer
Gesendet: Mittwoch, 5. November 2003 12:58
An: ascoders@xxxxxxxxxxxxx
Betreff: [ascoders] Color Extension


Hoi

Kann mir einer von euch sagen wo mein Fehler ist?
Die in den Objekten des Arrays definierten name(s)
ensprechen den Instanznamen der zu modifizierenden
MovieClips.

Leider "färbt" Flash immer nur den ersten????

items = [
        {name:"iglu",night:"darken",value:-30},
        {name:"angelfrosch",night:"darken",value:-30},
        {name:"schneeballfrosch",night:"darken",value:-30},
        {name:"engelfrosch",night:"darken",value:-30},
        {name:"lauffrosch",night:"darken",value:-30},
        {name:"schlittschuhfrosch",night:"darken",value:-30},
        {name:"feuerfrosch",night:"darken",value:-30},
        {name:"guckfrosch",night:"darken",value:-30},
        {name:"schlittenfrosch",night:"darken",value:-30},
        {name:"wolkenfrosch",night:"darken",value:-30},
        {name:"boarder",night:"darken",value:-30}
        ]

// brightness offset between -255 and 255
Color.prototype.setBrightOffset = function (offset) {
    var trans = new Object();
    trans.rb = trans.gb = trans.bb = offset;
    this.setTransform(trans);
}//rp


for(var i=0; i<this.items.length; i++){
        var clip = this[this.items[i].name]
        var prop = this.items[i]

        clip.colorObj = new Color(clip)

        if(prop.night == "darken")
                clip.colorObj.setBrightOffset(prop.value)

        else if(prop.night == "jump")
                clip.gotoAndStop(prop.value)

}


Thanks a lot!
Timo H.

------------------------------------------------------
Archiv   : //www.freelists.org/archives/ascoders/
Optionen : //www.freelists.org/list/ascoders
------------------------------------------------------

------------------------------------------------------
Archiv   : //www.freelists.org/archives/ascoders/
Optionen : //www.freelists.org/list/ascoders
------------------------------------------------------

Other related posts:

  • » [ascoders] AW: Color Extension