[F8] Problem With Changing "Shape Fill Color" Color
Hi guys,
I am having some trouble trying to figure out how to change the Shape Fill Color for the corner which is currently in #FF6600.
Can someone advise me how I can access this attribute?
See files attached.
FlashKit > Flash Help > Flash General Help
Posted on: 11-20-2008, 08:42 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Changing Fill Color And Line Color Dynamicly And Seperately
Hi community,
In this case, I am going to load a swf with a looping animation colored in black and white only. I want to change the color of the animation dynamicly so that I could have different color at each time. Here is my code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import flash.display.*;
import flash.net.URLRequest;
private function init():void{
myCan.addEventListener(Event.ENTER_FRAME,capMotion);
}
private function capMotion(event:Event):void{
var bmd1:BitmapData = new BitmapData(mySwf.width, mySwf.height, true, 0x00CCCCCC);
bmd1.draw(mySwf);
var bitmap1:Bitmap = new Bitmap(bmd1);
bitmap1.x = 0;
bitmap1.name="org";
if (map.getChildByName("org") != null){
map.removeChild(map.getChildByName("org"));
}
map.addChild(bitmap1);
var bmd2:BitmapData = new BitmapData(mySwf.width, mySwf.height, true, 0xFFFFFFFF);
var pt:Point = new Point(0, 0);
var rect:Rectangle = new Rectangle(0, 0, mySwf.width, mySwf.height);
var threshold:uint = 0xFF999999;
var color:uint = 0xFFFFFF00;
var maskColor:uint = 0x00FF0000;
bmd2.threshold(bmd1, rect, pt, ">=", threshold, color, maskColor, true);
var bmd3:BitmapData = new BitmapData(mySwf.width, mySwf.height, true, 0xFFFFFFFF);
threshold = 0xFF000000;
color = 0xFF00CCCC;
maskColor = 0xFFFFFF00;
bmd3.threshold(bmd2, rect, pt, "==", threshold, color, maskColor, true);
var bitmap2:Bitmap = new Bitmap(bmd3);
bitmap2.name="dup";
bitmap2.x = bitmap1.x + bitmap1.width + 10;
if (map.getChildByName("dup") != null){
map.removeChild(map.getChildByName("dup"));
}
map.addChild(bitmap2);
}
]]>
</mx:Script>
<mx:Canvas id="myCan" x="10" y="10" width="650" height="603">
<mx:SWFLoader id="mySwf" width="100" height="250" horizontalCenter="0" verticalCenter="-7.5" source="dance.swf" complete="init()" scaleContent="false" autoLoad="true"/>
<mx:Image x="61" y="320" width="550" height="152" id="map"/>
</mx:Canvas>
</mx:Application>
It works quite fine but I afraid that it's quite resource consuming using enterframe and bitmap drawing. Is there any better method?
Thanks for help.
Changing The Fill Color
Hey all,
what I want to do is to change the fill color of my shape depending on a variable. I have all the stuff out and everything is nice. I just don't know how to change the fill color of my shape to reflect this.
thanks a bunch!
Changing Text Fill Color...
I am trying to create an effect where you rollover a text, and the text changes color. I tried the "setTextAttr" Property, but I don't think I am using it correctly. Anyone got any tips?
Thanks a lot.
Changing Fill Color Of An MC By Clicking Button
I have an MC, a picture of a shirt. I also have a color chart (ie rows of little colored squares that are buttons). If i click one of the squares, lets say its green, how can i make the color of the shirt change to green? Is there a way to do this with ActionScript? If so, where would i put the necessary code?
Changing The Color Of A Shape
Hey all
I'm new to Flash and AS3 and I'm trying to do a very simple thing. I want to change the color of a rectangle when the rectangle is clicked. I've managed to figure out how to detect a click on the rectangle with the following code
Code:
function clickHandler(event:MouseEvent):void {
trace("rectangle was clicked");
}
rectangle.addEventListener(MouseEvent.CLICK, clickHandler);
How do I change the color of the rectangle instance in AS3 when it's clicked?
thanks!
[F8] Changing Shape Color Within A Button
I've searched the board and google but can't find anything to help me.
I have five buttons each that load a swf. What I want is for the button to show that it is selected.
For example it will look like this first...
each of the numbers is a button and what I want is that if somebody then clicks number two the orange circle will be shown around the '2' not the '1'.
Hopefully that'll make sense and be possible.
Trying To Create Randomly Moving/color-changing Shape
I am pretty new to Flash, so I'm really just trying to figure things out. Anyway, I have a MC that is a red circle. I have an instance of it on the stage, and the AS for the instance is as follows
Code:
onClipEvent(enterFrame)
{
_alpha=random(100);
_x=_x=random(800);
_y=_y=random(600);
}
This accomplishes the task of the shape moving to a random location and changing transparency every frame. The last thing that I would like to do is get it to change to a random color every frame as well. How can I do this? Thanks for the help!
Fill Color And Stroke Color Option Not Working...
I am a faculty member at American River College who needs a word or two on how Flash CS3 works.
Specifically, how do I get back the option to add fill color to an oval drawing that I have made in Flash CS3? It appears that I have flipped a setting that makes that seemingly simple option unavailable.
I have several other documents where I have added fill color without a problem; however, as of this morning CS3 will not allow me do add such. When I open Flash, I draw on the Stage, the outline color is usually green, no matter what color I select for as Stroke Color and Flash will not allow me to change the Fill Color. I make a selection and nothing happens (just moments ago I opted for red as the Fill Color and the Fill remains white).
Is there a setting in Flash, that a rookie like yours truly could activated by accident?
Please help.
MacBrowne
How Would I Go Changing Lots Of Movieclips Color And Border Color Seperatly?
I am in the making of a isometric level editor, and I have about 15 movie clips with more to come.
I want to let people change the color of tiles to what they want from a list of colors, so how can I let them change the color of a tile dinamicly with actionscript so that it changes a tile's color while preserving changes of "shadows"?
I mean I have let's say a cube and to make it look 3D I need to change each face to make a feeling of 3D and not a flat one.
thanks.
Changing Color On RollOut Then Back To Color After 2 Seconds
I am using the code below to make a shape turn color using on rollOver, then on rollOut is changes to a differant color(blue), then I want it to change back to the first color(white), either on another rollover or I perfer to make it change back to the fist color after a 2 seconds,
on (rollOver) {
var colorful = new Color("_root.shapes");
colorful.setRGB(0x006699);
}
on (rollOut) {
var colorful = new Color("_root.shapes");
colorful.setRGB(0x006688);
I want to be able to rollOver change color, onRollOut Change color again, then back to the first static color after 2 seconds.
Anyhelp would be great Thanks
[CS3] Changing Color (and Opacity Of That Color) Of Movie Clip
Hi. I have a pretty large movie clip filled with pngs. It's a sprite for a game and I want to change it's color. The setRGB method works, but I can't figure out how to set the opacity of the color. I don't want to change the alpha of the movie clip itself, just the color I'm applying to it so that it's just a shade over the normal images.
Is there any way to do this?
Fill The Color
Hi, I have problems in fill colour again, but this time is the background. I want to set some color to my background but it mix with my character (because some of the part of my character is trasparent.
What can I do?
Thanks
Fill Color In Cs3
hi--i've been using flash for a while now, but i seem to be encountering a glitch in cs3. either that or it's a brain glitch: when i type in a hex number in the fill color dropdown box, the new color does not take. it reverts back to the color indicated when i opened the fill color box. it's driving me mad. it does not matter whether or not i have an object selected. it also will not change in the properties window. help?
Fill Color
hi all, how to fill color to sometime u drew? like in the paint program that is..cus i did a flash function someting dat allow users to doodle around, but i wnana have a button when selected, user can click on the ting they drew n fill it with color. isit possible? thanks!!!
Fill Color
hi all, how to fill color to sometime u drew? like in the paint program that is..cus i did a flash function someting dat allow users to doodle around, but i wnana have a button when selected, user can click on the ting they drew n fill it with color. isit possible? thanks!!!
Can You Change The Color Of A Fill Only
Assuming you have a movieclip that contains a simple box with an outline and a fill, is there a way to change only the fill or only the outline color (using actionscript) without making the outline and fill into seperate clips?
Unable To Fill The Color
I have tried many times to fill my hat or face ,but still unsucceed. I havent lock it and have already change option to Close Large Gap.
I think there is some small gap in my picture so I cant fill it. Anyone helps?
Thanks
Background Color Fill?
I have seen people do a paint bucket fill for a background in flash with a multie colored fill. How do you do this? It is like white/brown/blue and then an image in the brown color. When I click on the background 1st it is a movie clip then a graphic then a shape. How do I do this?
Thanks
Dyanmic Color Fill
hey everyone, i am trying to create a character creator problem i come across is that I want the people to be able to say what colour skin they want etc etc now i already have the shape drawn in flash in the location _root.test.skin
how can i change the colour of the shape? so instead of it being pink it can be brown?
dont want to have to draw different shapes for each colour cause then the thing will be huge
many thanks for any help!
[F8] Color Fill A Dynamic PNG
I am creating a banner which dynamically loads a png image through xml, no problem yet. The question i have is,
Is there a way to color fill the loaded image?
for example i have an png of a man loaded in with it's transparency. I want it to first appear filled white so it looks like a silhoutte which then fades into the image?
any simple fills i apply to the MC just don't seem to do anything once the png has loaded.
Select Same Fill Color
Anyone know of a Flash plugin that will select the same fill color? I do a lot of drawing in Flash and it would be so quick to have this feature. I know Adobe Illustrator can do it.
Thanks for your help!
Fill Color Using Actionscript
hi guys,
How to do something like this:
ActionScript Code:
on(release){
myMc.color = red
}
i've tried:
ActionScript Code:
on(release){
myMc.color = "#FF0000"
}
but it didn't work!
Auto Color Fill
Thanks to Inhan I can now do colorTransform. This question might be getting ahead of myself, but I was curious.
I've got something where users drag a color (MC) into a space (another MC) and the space becomes the color of the dragged MC. It's like a coloring book of sorts.
Now when the two MCs have a hitTest the color simply changes instantly. I thought it would be a cool effect if the color gradually filled the space like paint poured on the floor. I am thinking of a slow way where the dragged MC locks into the center position and then shape tweens into a preset fixed area, but I thought there might be some way to detect the shape it's in and just slowly fill that area.
I have a headache just thinking about this.
Thanks.
Select Same Color Fill
I draw a lot in Flash and it would really help if I could select the same color fill all at once. Right now I have to click on all the colors individually. I know Illustrator is capable of this. Does anyone know of a plugin that does this?
Thanks,
Andy
Fill Color In Movieclip
with (myClip) {
moveTo(0,0);
lineTo(50,0);
lineTo(50,100);
lineTo(0,100);
lineTo(0,0);
}
this creates shape which is empty .
I want to fill the shape created after i have set a certain parameter to
true. How to do that with movieclip.
beginFill not usable since it starts filling just from begining.
Color Fill Question
How do I flip the linear color fill so instead of going left to right it goes top to bottom?
Color Fill Png Dynamically?
Hi,
Didn't now where to put this, but AS3 looked like the best option.
So I'm developping a product configurator in Flex, and at a certain point the end -user should be able to "drag" a color to the product.
The product outlines are all dynamic loaded png's.
Now my question is how can I color fill these png?
With an underlaying sprite that i fill with a color is an option. But i've heard it's possible to use the png outlines as vectors, is it (maybe CS3 only)?
Thx!
Adding A Fill Color
i created a shape and i'm trying to add fill color to it, but it doesn't seem to work!
i drew the shape on layer2 and then selected the paintbucket tool and then my fill color and clicked the inside of my shape... but nothing is happening.
please help... it's driving me mad!
Color Picker And Fill Tool
i need a help..
i want to pick color and set color in drawings..
there is a color pallete, i want to click and get the value in a variable and i have defferent mc, when i click on some mc, the mc should get the previously chossen collor...
please help...
Choosing Gradients As A Fill Color
Hi.
I want to make an oval that fades from yellow on the inside to transparent on the outside. When I try to choose a gradient as a fill color in Flash, I only get certain options.. i.e. from red to black.. from white to black, from green to black, from blue to black, etc.
How do I customize my own gradients?
Thanks,
~j
Color Fill In Real Time?
Hi,
I've been looking at a post made, using some action script that will target a movie and fill the color according to to the color of your choice.....the problem i'm having is that i want to fill an image, but i want the image to retain it's original shading (so it still looks 3D without just completely filling it with one shade!!)
Is there any way of doing this??
Dynamic Color With Gradient Fill
Hi there,
I'm trying to figure out how to use dynamic colors within a gradient fill. This borrowed script works fine with hex colours, however when I use a dynamic field in there it doesn't take (line 2). It seems to not like the square brackets -the line style (a few lines down), has no problem taking the dynamic field. Any help would be appreciated..
Thanks
fillType = "linear";
colors = [_root.rollcolour,0x0000FF, 0x0000FF];
alphas = [75, 100, 25];
ratios = [50, 100, 200];
matrix = {matrixType:"box", x:200, y:150, w:150, h:100, r:0/180*Math.PI};
_root.lineStyle(0, _root.rollcolour, 100);
_root.beginGradientFill(fillType, colors, alphas, ratios, matrix);
_root.moveTo(200, 100);
_root.lineTo(350, 100);
_root.lineTo(350, 200);
_root.lineTo(200, 200);
_root.lineTo(200, 100);
_root.endFill();
How To Modify Outline OR Fill Color?
Is it possible with AS to change outline OR fill color?
I need somehow to highlight selected movieClip. But colors used in each particular movieClip can vary (as well as the background environment), so using colorTransformFilter on the entire movieClip instance does not work as needed.
Adjusting outline and fill color separately would help. Is there a way to achieve that at runtime?
Yaroukh
The Dynamic Color Fill Not Working For Me ?
i have the attachment
it suppose to fill the color to the position i mentioned ?
why the beginFill not working for me?
ActionScript Code:
var hor:Number;
var ver:Number;
var holder:MovieClip = _root.createEmptyMovieClip("holder",5000);
var count:Number =1;
selector = 0;
tile();
/////////////////////////////////////////////////////////////////////////////////////////
function drawline ()
{
// the below method not working for me?
// it suppose to fill colour after drawing a shape but its not happening
holder.beginFill(0xFFFF00);
holder.lineStyle(1,0);
holder.moveTo(newx,newy);
holder.lineTo(originx, originy);
holder.endFill();
tile();
originx = newx ;
originy = newy ;
}
// dot placement///
function tile() {
tile_width = 30;
tile_height =30;
//
x_max = 12;
y_max = 12;
for (x=1; x<x_max; x++) {
for (y=1; y<y_max; y++) {
s = _root.attachMovie("sprite", "s"+x+y, this.getNextHighestDepth());
trace(s11._x);
s._x = tile_width*x;
s._y = tile_height*y;
}
}
}
//// mouse position selector/////
for( count=1; count < 101 ; count++) {
btName = "s" + String(count);
this[btName].onRelease = function () {
if (selector == 0) {
originx = this._x;
originy = this._y;
selector = 1;
}
else {
newx = this._x ;
newy = this._y ;
drawline();
}
}
}
Change Color Of Fill In Drawing API
hi,
can I change the color of a fill that I've added to a sprite using the drawing API? This is not working:
Code:
var sp:Sprite = new Sprite();
sp.graphics.beginFill(0xCCCCCC, 1 );
sp.graphics.drawRoundRect(0, 0, 60, 60, 10);
addChild(sp);
sp.addEventListener(MouseEvent.CLICK, changeColor);
function changeColor(e: MouseEvent):void{
//sp.graphics.clear();
sp.graphics.beginFill(0xFF0000, 1 );
sp.graphics.endFill();
//sp.graphics.drawRoundRect(0, 0, 60, 60, 10);
}
Isn't it possible or am I missing something?
thanks :-),
Jeff.
Change Fill Color On The Layer
Hi everyone:
I can't seem to be able to do the obvious I have a symbol (movie clip) in the library - let's call it Ball - that consists of two layers. One layer has the outlines and the other layer has the fill. The goal is to create the Ball dynamically with a certain fill color:
Code:
var ball:Ball = new Ball(0xff0000);
addChild(ball);
The movie clip symbol is linked to a class like this:
Code:
package
{
import flash.display.MovieClip;
import flash.geom.ColorTransform;
public class Ball extends MovieClip
{
function Ball(color:uint):void
{
var colorTransform:ColorTransform = this.transform.colorTransform;
colorTransform.color = color;
this.transform.colorTransform = colorTransform;
}
}
}
But my problem is that when the code above is run everything changes color (the outlines and the fill layer). What I need to know is how to do this ColorTransform on a specified layer only?
(Or maybe there's a better way to change the fill color of an object?)
Donīt Color A Word But Fill It With Bitmap
Hi!
I have once seen a tutorial on how to fill a word by bitmaps. I canīt find it now. I have a word, kind of a logotype that I want to stand out from the background. I know you can do a lot of things in flash8. I would appreciate any tips of tutorials on this subject.
Controlling Mc Fill Color Externally
I have a project that demands control of the fill color of a rectangle shaped mc externally. So the user would have the control to change the fill color of a movie clip by editing something externally, not having to edit the flash file. Is this possible?
Making A 'fill With Color' Application
Hi.
I'm totally new with Flash, and I'm making an application where the user can fill some drawings with color. This is going to be a 'game' for kids aged 5-10, so it have to be really simple to use. You know, pick a color and fill a part of the drawing. The drawings are premade templates.
Since I haven't really learned enough about Flash to know if there is an easy way to do this, I'm asking you guys...
Any suggestion would be appreciated!
Rune Heggemsli,
HMP
Dynamically Change Fill Color
How can I dynamically change the color of fill for something created like this:
ActionScript Code:
this.createEmptyMovieClip("myClip",_root.getNextHighestDepth());with (myClip) { beginFill(0xffffff,100); moveTo(0,0); lineTo(50,0); lineTo(50,100); lineTo(0,100); lineTo(0,0); endFill;}
I'd like to change the fill color onRollOver, onRollOut, onRelease, etc., but I don't know which property to refer to.
I think this link probably would have answered my question, but unfortunately it's now dead:
Quote:
Originally Posted by senocular
http://www.toolblast.com/interactive..._from=&ucat=2&
Fill Color With Line Boundaries
What i need is the ability to "fill" an area of "color" in an imported image onto the stage to whatever color i need, and for it to fill the entire area until it reaches a boundary.
Now, if your as lost reading that as i was when i typed it, what i need is exactly what you have in mspaint (Microsoft Paint) basically i need my own paint bucket tool, so that i can fill an area of an imported image to whatever color i want.
I have played around with the BitmapData.threshold function, however whilst it works, if a user colors area1 blue, and then area 3 blue, then decides he really wants area 3 red, when he repaints area3 red, he will also paint area1 red too...
Threshold just works too well, i need to re-painting or "filling" to stop when it hits a border, and not change other parts of the image that are the same color.
An example of the image is located here: http://www.xavierit.com.au/lineDrawing.JPG i want the user to be able to paint individual cells any color they want, but i cannot find an approprate way of doing this.
Color Fill On Loaded Image
I'm loading images from a folder using a XML and inserting them in a movieclip.
Is it possibile to make a colorfill function on them (like the paint-bucket tool) ?
|