Clip couleur en n/b

Résolu
cs_yanexis Messages postés 1 Date d'inscription vendredi 31 août 2007 Statut Membre Dernière intervention 4 septembre 2007 - 4 sept. 2007 à 13:17
on_drag_on Messages postés 1236 Date d'inscription vendredi 13 mai 2005 Statut Membre Dernière intervention 6 octobre 2010 - 4 sept. 2007 à 18:22
élo, avec le code suivant j'arrive à créer une galerie de plusieurs vignettes chargées via XML et à partir desquelles (boutons) je charge des contenus de plusieurs autres photos. J'aimerais simplement que ces vignettes (photos couleurs) s'affichent en noir et blanc au survol (onRollOver).
merchi.

function createResourceList(resource_array,noofcolumn,noofrow,thumbxs,thumbys,thumbwidth,thumblength,bigimagewidth) {
    _global.noofcolumn = noofcolumn;
    _global.noofrow = noofrow;
    var listData = new DataProviderClass ();
    resourceCount = resource_array.length;
    noofpage = Math.ceil(resourceCount/(noofcolumn*noofrow));
    ofof.text = "pàgina: "+currentpage+"/"+noofpage;
    var resource, image, tmb;
    images = new Array();
    infotexts = new Array();
   
    pageindex =((currentpage-1) * noofrow *  noofcolumn);
   
    for (var r = 0; r < noofrow; r++)
    {
       
        for (var c = 0; c < noofcolumn; c++) {
            i = (r * noofcolumn) + c + pageindex;
           
            if(i<resourceCount)
                {
                    nodigits = new String(resourceCount);
                    resource = resource_array[i];
                    images[i] = resource.attributes.imagename;
                    infotexts[i] = resource.attributes.infotext;
                    loadme = "thumbs_advertising/"+images[i];
                    findme = images[i];
                    whichframe = "frame"+i;
                    this.attachMovie("thumbframe","thumbframe"+i,i+1);
                    this["thumbframe"+i]._x = (c * thumbwidth+293)+thumbxs;
                    this["thumbframe"+i]._y = (r * thumblength-40)+thumbys;
                    createEmptyMovieClip("thumbframein_mc"+i,(i+1)*1000);                   
                    onEnterFrame = function()
                    {
                        for (var tr = 0; tr < noofrow; tr++)
                        {
                           
                            for (var tc = 0; tc < noofcolumn; tc++) {
                                ti = (tr * noofcolumn) + tc + pageindex;
                               
                                if(ti<resourceCount)
                                    {
                                            tw = this["thumbframein_mc"+ti]._width;
                                            th = this["thumbframein_mc"+ti]._height;
                                            this["thumbframein_mc"+ti]._x = this["thumbframe"+ti]._x+(thumbwidth - tw)/2;
                                            this["thumbframein_mc"+ti]._y = this["thumbframe"+ti]._y+(thumblength - th)/2;
                                           
                                    }
                            }
                        }
                    }
                    this["thumbframein_mc"+i].loadMovie(loadme);
                    noofthumbs = (currentpage-1) * noofcolumn * noofrow;
                    nom = noofthumbs;
                    callbig(nom);
                    this.filename.text = " "+images[nom];
                    this["thumbframe"+i].onPress = function()
                        {
                            startsubstring = 10;
                            endsubstring = startsubstring + nodigits.length;
                            largeindex=this._name.substring(startsubstring,endsubstring);
                            callbig(largeindex);
                        }
                }
            }
    }
}}
           
        }
    }
    galleryChoice(0);
                    for (var i = 0; i<7; i++) {
                    var btn = this["thumbframe"+i];
                    btn.id = i;
                    btn.onRelease = function() {
                    galleryChoice(this.id);
                    }
                }

1 réponse

on_drag_on Messages postés 1236 Date d'inscription vendredi 13 mai 2005 Statut Membre Dernière intervention 6 octobre 2010
4 sept. 2007 à 18:22
Hello,
http://www.zoneflash.net/tutoriaux/t038.php

@+.
www.monblog.ch/telov
tutoriels Flash pour débutants
3
Rejoignez-nous