Visualizzazione dei risultati da 1 a 2 su 2

Discussione: help codice colore

  1. #1
    Utente di HTML.it L'avatar di lid
    Registrato dal
    May 2002
    Messaggi
    555

    help codice colore

    ho incollato un pezzo di codice di un file .as

    l'unica cosa che voglio fare è cambiare il colore al pulsante, e secondo me la parte da cambiare è il numero 16777215,14342874,16316664 per capire se è giusto dovrei testarlo ma non questi codici a che colori corrispondono e soprattutto se io volessi trasformarlo in blu che numero dovrei mettere? Esiste tabella di conversione da cui posso scegliere i colori che preferisco?


    case "falseup":
    {
    if (_l4)
    {
    this.drawRoundRect(this.__get__x() + 1, this.__get__y() + 1, w - 2, h - 2, 4, [16777215 , 16777215], 85, 0, "radial");
    this.drawRoundRect(this.__get__x() + 2, this.__get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0, "radial");
    this.drawRoundRect(this.__get__x() + 3, this.__get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
    }
    else


    grazie

    Lid
    "ciascuno di noi può creare qualcosa di unico e di significativo per se stesso"

  2. #2
    Utente di HTML.it L'avatar di lid
    Registrato dal
    May 2002
    Messaggi
    555
    aggiungo maggiori dettagli, magari così mi sapete aiutare


    Devo modificare i colori di un components,un pulsante deve diventare
    blu e poi blu chiaro quando ci si passa sopra, ma proprio non ci
    riesco a capire come devo fare,

    incollo di seguito i codici che sono stati usati:

    sul components pulsante: l'istanza si chiama "Template_ControlButton"
    e il label "Control Button"

    Questo fla conentente il pulsante è composto da 2 frame, sul primo
    frame c'è questo codice: (una parte dovrebbe essere relativa al
    preload e l'altra al pulsante, ma non so bene in che modo.)

    _global.style.setStyle("themeColor", 12713984);
    stop ();
    onEnterFrame = function ()
    {
    var _l1 = getBytesLoaded();
    var _l2 = getBytesTotal();
    if (_l1 > 4 && _l2 > 4 && _l1 >= _l2)
    {
    delete onEnterFrame;
    gotoAndPlay(_currentframe + 1);
    }
    else
    {
    var _l3 = Math.round(_l1 / _l2 * 100);
    loader_txt.text = _l3 + " %";
    } // end if
    };


    Il tutto credo sia collegato ad un file .as ( RedGreenBlueSkin.as) con
    questo codice:

    class RedGreenBlueSkin extends mx.skins.RectBorder
    {
    var _parent;
    function RedGreenBlueSkin()
    {
    super();
    } // End of the function
    function ButtonSkin()
    {
    } // End of the function
    function init()
    {
    super.init();
    } // End of the function
    function size()
    {
    this.drawHaloRect(this.__get__width(), this.__get__height());
    } // End of the function
    function drawHaloRect(w, h)
    {
    var _l5 = this.getStyle("borderStyle");
    var _l6 = this.getStyle("themeColor");
    var _l4 = _parent.emphasized;
    this.clear();
    switch (_l5)
    {
    case "falseup":
    {
    if (_l4)
    {
    this.drawRoundRect(this.__get__x() + 1,
    this.__get__y() + 1, w - 2, h - 2, 4, [16777215, 16777215], 85, 0,
    "radial");
    this.drawRoundRect(this.__get__x() + 2,
    this.__get__y() + 2, w - 4, h - 4, 3, [0, 14342874], 100, 0,
    "radial");
    this.drawRoundRect(this.__get__x() + 3,
    this.__get__y() + 4, w - 6, h - 7, 2, 16316664, 100);
    }
    else
    {
    this.drawRoundRect(1, 1, w - 2, h - 2, 4,
    [11918606, 11918606], 100, 0, "radial");
    this.drawRoundRect(2, 2, w - 4, h - 4, 3,
    [11918606, 11918606], 100, 0, "radial");
    this.drawRoundRect(3, 4, w - 6, h - 7, 2,
    11918606, 100);
    } // end if
    break;
    }
    case "falsedown":
    {
    this.drawRoundRect(this.__get__x() + 1,
    this.__get__y() + 1, w - 2, h - 2, 4, [16766518, 16766518], 100, 0,
    "radial");
    this.drawRoundRect(this.__get__x() + 2,
    this.__get__y() + 2, w - 4, h - 4, 3, [16766518, 16766518], 100, 0,
    "radial");
    this.drawRoundRect(this.__get__x() + 3,
    this.__get__y() + 4, w - 6, h - 7, 2, 16766518, 100);
    break;
    }
    case "falserollover":
    {
    this.drawRoundRect(this.__get__x() + 1,
    this.__get__y() + 1, w - 2, h - 2, 4, [16766518, 16766518], 100, 0,
    "radial");
    this.drawRoundRect(this.__get__x() + 2,
    this.__get__y() + 2, w - 4, h - 4, 3, [16766518, 16766518], 100, 0,
    "radial");
    this.drawRoundRect(this.__get__x() + 3,
    this.__get__y() + 4, w - 6, h - 7, 2, 16766518, 100);
    break;
    }
    case "falsedisabled":
    {
    this.drawRoundRect(1, 1, w - 2, h - 2, 4, 13691237,
    100);
    this.drawRoundRect(2, 2, w - 4, h - 4, 3, 13691237,
    100);
    this.drawRoundRect(3, 3, w - 6, h - 6, 2, 13691237,
    100);
    break;
    }
    case "trueup":
    {
    this.drawRoundRect(this.__get__x() + 1,
    this.__get__y() + 1, w - 2, h - 2, 4, [16766518, 16766518], 100, 0,
    "radial");
    this.drawRoundRect(this.__get__x() + 2,
    this.__get__y() + 2, w - 4, h - 4, 3, [16766518, 16766518], 100, 0,
    "radial");
    this.drawRoundRect(this.__get__x() + 3,
    this.__get__y() + 4, w - 6, h - 7, 2, 16766518, 100);
    break;
    }
    case "truedown":
    {
    this.drawRoundRect(this.__get__x() + 1,
    this.__get__y() + 1, w - 2, h - 2, 4, [16766518, 16766518], 100, 0,
    "radial");
    this.drawRoundRect(this.__get__x() + 2,
    this.__get__y() + 2, w - 4, h - 4, 3, [16766518, 16766518], 100, 0,
    "radial");
    this.drawRoundRect(this.__get__x() + 3,
    this.__get__y() + 4, w - 6, h - 7, 2, 16766518, 100);
    break;
    }
    case "truerollover":
    {
    this.drawRoundRect(this.__get__x() + 1,
    this.__get__y() + 1, w - 2, h - 2, 4, [16766518, 16766518], 100, 0,
    "radial");
    this.drawRoundRect(this.__get__x() + 2,
    this.__get__y() + 2, w - 4, h - 4, 3, [16766518, 16766518], 100, 0,
    "radial");
    this.drawRoundRect(this.__get__x() + 3,
    this.__get__y() + 4, w - 6, h - 7, 2, 16766518, 100);
    break;
    }
    case "truedisabled":
    {
    this.drawRoundRect(1, 1, w - 2, h - 2, 4, 13691237,
    100);
    this.drawRoundRect(2, 2, w - 4, h - 4, 3, 13691237,
    100);
    this.drawRoundRect(3, 3, w - 6, h - 6, 2, 13691237,
    100);
    }
    } // End of switch
    } // End of the function
    static function classConstruct()
    {
    mx.core.ext.UIObjectExtensions.Extensions();
    _global.skinRegistry.ButtonSkin = true;
    return (true);
    } // End of the function
    static var symbolName = "ButtonSkin";
    static var symbolOwner = mx.skins.halo.ButtonSkin;
    var className = "ButtonSkin";
    var backgroundColorName = "buttonColor";
    static var classConstructed = RedGreenBlueSkin.classConstruct();
    static var UIObjectExtensionsDependency =
    mx.core.ext.UIObjectExtensions;
    } // End of Class



    spero di aver inserito tutto il codice necessario per modificare il
    pulsante.
    "ciascuno di noi può creare qualcosa di unico e di significativo per se stesso"

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.