Vi =) 0 Denunciar post Postado Junho 12, 2008 Olá alguem saberia me dizer como trocar a cor de um movie-clip através do Tint por Action Script? Para trocar o alpha eu sei que é usando o _alpha mas e o Tint? Tem como fazer isso tambem? Obrigada, Thais Compartilhar este post Link para o post Compartilhar em outros sites
leila•trupe 1 Denunciar post Postado Junho 12, 2008 A propriedade tint não existe via action, mas você consegue fazer o que quer com ColorTransform. Pesquise no help ou no fórum sobre ele. Compartilhar este post Link para o post Compartilhar em outros sites
Pino 0 Denunciar post Postado Junho 12, 2008 tint nao tem como você tem q criar uma classe e objeto pra manibular isso... seria tipo... var Cor:Color = new Color(teste_mc); var Cor2:Object = {ra: 50, rb: 244, ga: 100, gb: 112, ba: 255, bb: 90, aa: 40, ab: 70}; Cor.setTransform(Cor2); onde teste_mc é meu objeto q vai mudar de cor... ra is the percentage for the red component (-100 to 100). rb is the offset for the red component (-255 to 255). ga is the percentage for the green component (-100 to 100). gb is the offset for the green component (-255 to 255). ba is the percentage for the blue component (-100 to 100). bb is the offset for the blue component (-255 to 255). aa is the percentage for alpha (-100 to 100). ab is the offset for alpha (-255 to 255). Compartilhar este post Link para o post Compartilhar em outros sites
Vi =) 0 Denunciar post Postado Junho 12, 2008 Pino, é exatamente isso que precisava...mto obrigada a todos... Mas so mais uma ajudinha, nao to acertando na cor desejada. Eu preciso que fiquei com a cor cinza (#666666). Coloquei no rb, no gb e no bb o numero 102 q corresponde a ele no rgb. Mas não consegui acertar, fica amarelo =/ Compartilhar este post Link para o post Compartilhar em outros sites
Eder Fortunato 15 Denunciar post Postado Junho 13, 2008 testa assim: var Cor:Color = new Color(teste_mc); Cor.setRGB(0x666666) você tem que usar o 0x ao invés do # []´s Compartilhar este post Link para o post Compartilhar em outros sites
Pino 0 Denunciar post Postado Junho 13, 2008 depende da situacao... se você for so mudar a cor..., tipo, verde, vemelho, azul, vale a pena usar o modo q o eder falou mas se você for usar um controle desses de setinha, q você escolhe a cor, mais escuro, mais claro, ai vale a pena estudar o q te passei =] a inicial q você cria objeto acaba influenciando ele!!! Compartilhar este post Link para o post Compartilhar em outros sites