PDA

View Full Version : Desperate Need of Assistance by Flash Expert


screamhbk
03-16-2004, 12:22 PM
I am having trouble successfully completely on of my projects involving input text. My program is supposed to take and recognize text from an input box and then compare it with items in an array, and then from there know what info to use. Basically thats what it should do, I have two programs, 1 that shows visually how i want the change to looka nd the other with an attempt at performing this. If anyone is up for the challenge pleae IM me at Screamhbk, or reply to this post. You'd be helping me alot.

xxlm
03-16-2004, 02:49 PM
Can I help you ... ? :?

screamhbk
03-16-2004, 04:03 PM
I am trying desperately like a hundred different ways to change a movie clips color. At first I tried daling with beginFill but I am pretty sure now that isn't possible, any dieas?

xxlm
03-16-2004, 04:07 PM
color? just use it then...
color

screamhbk
03-16-2004, 04:20 PM
this might give you a better idea....

MovieClip.prototype.drawRect = function(x1, y1, x2, y2) {
with (this) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
};
MovieClip.prototype.colorChoice = function(randInt){
if (randInt == 1){
return 0x000000;}
if (randInt == 2){
return 0xFF00FF;}}

_global.GridModel = function(fColor, width, height, numOptions) {
this.width = width;
this.height = height;
this.numOptions = numOptions;
this.board = new Array();
for (var i = 0; i<height; i += 40) {
this.board[i] = new Array();
for (var j = 0; j<width; j += 40) {
this.board[i][j] = new Object();
this.board[i][j].id = i*this.height+j;
this.board[i][j].c = _root.createEmptyMovieClip(["sq"+this.board[i][j].id], this.board[i][j].id);
this.board[i][j].c._alpha = 100;
this.board[i][j].c.lineStyle(0, 0xffffff);
myColor = new Color(["sq"+this.board[i][j].id]);
myColor.setRGB(0x0000ff);
//this.board[i][j].c.beginFill(this.board[i][j].c.colorChoice(fColor));
this.board[i][j].c.drawRect(i, j, i+40, j+40);
//this.board[i][j].c.endFill;
}
}
};
GridModel.prototype.blender = function(xMouse, yMouse) {
for (var i = 0; i<this.height; i += 40) {
for (var j = 0; j<this.width; j += 40) {
//puts xMin, xMax, yMin and yMax into the object 'Bounds'
var Bounds = this.board[i][j].c.getBounds();
//checks mouse vs Bounds
if(xMouse > Bounds.xMin && xMouse < Bounds.xMax && yMouse > Bounds.yMin && yMouse < Bounds.yMax){

this.board[i][j].c._alpha = random(101);

}


}
}
};

//step 1 && step 2 are taken care of: they are built into flash (Mouse object and its broadcasting ability)
//step 3

black = 0x000000;
myGrid = new GridModel(1, 280, 560, 10);

//step 4
myGrid.onMouseDown = function() {
myGrid.blender(_root._xmouse, _root._ymouse);
};
//step 5
Mouse.addListener(myGrid);

My goal is to be able to click on the movieclips and not just change the alpha through "blender" but all the fill color of the movie clip...so far I can only get the setRGB to do the outline...

xxlm
03-16-2004, 04:33 PM
could we have the fla...
Better I think.
:)

screamhbk
03-16-2004, 04:47 PM
My problem has changed though...I got the fill to be set by setRGB but now I lose my outlines and I'm not quite sure how to place it in the blender function so that it will change the color as well as the alpha...

screamhbk
03-16-2004, 04:47 PM
Wait it didnt let me attach the fla, how do i do that?

xxlm
03-16-2004, 05:45 PM
Perhaps too big... more than 200k isn't accepted
try to put it on ftp somewhere else...