Image

Imagethree3period wrote in Imageflashdev 😡frustrated

Some trouble with ColorTransform

Hey all, I'm writing a small flash application for novice guitarists that shows the locations of all the notes on the fretboard, and allows highlighting (with a MovieClip) of all the notes in different keys. I was implimenting a feature to allow for the selections of particular notes (A, B, and C# for example) for easy inverting and creation of Chords. I'd like the MoveClip to either be a different one (from the library), or change color. I was trying ColorTransform, here's my code...

A button calls function ChordColor(y), y = the name of the note inputted (A1, C5, D#11, etc.)


and this code is located on frame 1 of the timeline:

import flash.geom.Transform;
import flash.geom.ColorTransform;

var y; // the name of the note
var yx; // location of the movieclip being edited (currently not used)
var yy; // location of the movieclip being edited (currently not used)
var chordTrans:ColorTransform = new ColorTransform(0,1,0,1,255,255,0,0)
var transClip:MovieClip; // not sure if this is nessisary

function ChordColor(y) {
transClip = y;
var trans = new Transform(transClip);
y.colorTransform = chordTrans;
trace(y.colorTransform);
trace("trans - " + trans)
trace("chordTrans - " + chordTrans)
}


any help would be greatly appreciated. To see the file, go here
http://movingbox.teejayvanslyke.com/ChordSmith.swf