Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
chrism59 webforumsuser@macromedia.com #1
beginGradientFill() NOT WORKING
I pass the following function a hex color "00FF00" and a MovieClip name. the clip is on the stage and visible when the function is called.
The clip changes color when the with statement is commented out and the color statements at the bottom are uncommented.
WHY can't I get the gradient to work??? I have been trying for 3 weeks. HELP PLEEEEEEEEEASE!!!!
function chgBroder(newColor:String, myClip:MovieClip) {
if (newColor<>" ") {
var colorHex:Number = parseInt(newColor, 16);
with (myClip) {
colors = [colorHex, 0x000000];
alphas = [100, 100];
ratios = [0, 255];
beginGradientFill("radial", colors, alphas, ratios);
endFill();
}
//var bColor_color = new Color(myClip);
//bColor_color.setRGB(colorHex);
}
}
I have placed this on the back burner until the end of the project. Well I'm there and I can't complete it until I make this code work. I'll try any suggestions!!!!
chrism59 webforumsuser@macromedia.com Guest
-
beginGradientFill() > matrix
Hi, I'm having some difficulty understanding the matrix properties for the beginGradientFill method. So far (I think) I have found out the... -
beginGradientFill() NOT WORKING MX 2004
I wrote the following code for flash 7.0, it will not work! somehow my settings got switch to 6.0 and the code works fine. Is there something wrong... -
beginGradientFill Question
In the beginGradientFill method, what exactly does the transformation matrix control...... ? I mean the a:somevalue b:somevalue etc....I can't... -
beginGradientFill HELP
lineTo (not lineto) moveTo (not moveto) -
beginGradientFill?
I cut and paste the sample code in the help files for beginGradientFill and nothing shows up. I found some example code of it online and tried... -
Jack. webforumsuser@macromedia.com #2
Re: beginGradientFill() NOT WORKING
beginGradientFill is missing the matrix parameter, it fails without it,
from the Reference -
myMovieClip.beginGradientFill (fillType, colors, alphas, ratios, matrix)
regards
Jack..
Jack. webforumsuser@macromedia.com Guest
-
chrism59 webforumsuser@macromedia.com #3
Re: beginGradientFill() NOT WORKING
The matrix is an optional parameter.
I have an image in the movieclip.
I am trying to change the color of the image contained in the clip.
chrism59 webforumsuser@macromedia.com Guest
-
Jack. webforumsuser@macromedia.com #4
Re: beginGradientFill() NOT WORKING
>The matrix is an optional parameter
is this new feature of MX2004 ?
this fails in MX -
this.createEmptyMovieClip("grad",1);
with(grad){
colors = [0xFF0000,0x0000FF]; alphas = [100,100]; ratios = [0,0xFF];
//matrix = {a:500,b:0,c:0,d:0,e:200,f:0,g:350,h:200,i:1};
beginGradientFill("radial",colors,alphas,ratios);//,matrix
moveto(100,100); lineto(100,300); lineto(300,300);
lineto(300,100); lineto(100,100); endFill();
}
you might be able to adapt the method used in the file at this link,
[url]http://www.jackleaman.co.uk/flash/two/color1.swf[/url]
regards
Jack..
Jack. webforumsuser@macromedia.com Guest



Reply With Quote

