ActionScript 2.0 :: LineStyles - Change Line Color
Jun 25, 2004
I am doing a drag and drop game where lines are drawn between two movieClips (one fixed and one draggable). At the moment the lineStyles properties are set up within the initiation function and then used to draw the lines. I now have the problem that for some lines I have to change its color and I think the on enterFrame event is messing everythiong up; I can change all of their colors at a time but not one at a time :< the line snippet of the code that deals with lines are below...
I am building a line drawing movie where I would like the user to be able to change colors using the AdvColorPicker I downloaded from Sephiroth.it.I don't know how to write the code that will change the line color upon picking one from the AdvColorPickerHere is the actionsript for the line drawing:
ActionScript Code: colors.onMouseDown = function() { if (1) {
I have a few movie clips that change color when they are rolled over and rolled out of which is great and works correctly but now I have add glows to those buttons to serve as borders or a stroke and when you roll over the buttons the color and the filter color changes.
What I am trying to do is to have the button color change to a different color when it is on the page. The color only changes when I roll over it or hit it. Once I am on the page it changes back to the color it is on the up state.
How is it done? All I've seen on the web is how to change the color. Well how about going back. I'm talking about a MC with many colors. I can't just change back to a single hexadecimal color.
I can accomplish the change as it passes over a frame, but I can't get it to change back.
In the frame is this:
Code: cHurtColor = new Color(_root.compMC); cHurtColor.setRGB(0x00FF33);
All I've seen on the web is how to change the color. Well how about going back. I'm talking about a MC with many colors. I can't just change back to a single hexadecimal color.I can accomplish the change as it passes over a frame, but I can't get it to change back.[code]
I am looking for a way to change stroke color via AS3. The objects I would like to change are created with flash professional. They do have a fill. I just want to change the stroke color and not the fill color... is this possible? ... or am I stuck removing all fills and using a filter?
I�d like to add something more but don�t know how.I[d like to make the MC to load a random color, in a color range that I specify, like #000000, #FFFFFF and #111111.Also, I want somew buttons to change between this colors, but with an ease transition.
I saw the following AS3 code in a "Class" which is used for changing the font color. How to modify it to change another font color say, Red, Green or Yellow.
What I am trying to do is to have the button color change to a different color when it is on the page. The color only changes when I roll over it or hit it.Once I am on the page it changes back to the color it is on the up state.[URL] (When you are on the home page the button is red, but when on the about page the home button changes to white to show hierarchy.)
Is it possible to smoothly change the color of the line in this sprite over a period of time?Code: Select allvar sp:Sprite = newSprite();addChild(sp);sp.graphics.lineStyle(3, 0x31FF1A);I saw a bit of code that used Tweener to do this with a movie clip, but I can't make Tweener work with a sprite.
So when I call lineTo() and then next call lineStyle() with a new color - that previous lineTo gets drawn in the new color, not whatever color was previously set. It is strange but I don't know if there is some kind of justification for the behaviour?Example: this is meant to draw 2 white lines but the second is drawn in blue if I do a blue lineStyle immediately after. Insert a moveTo or similar "end-draw" function then it's ok. seems broken to me...
//EDIT: - put this rect draw bit first graphics.beginFill(0x000000);graphics.drawRect(0,0,50,50); graphics.lineStyle(1, 0xFFFFFF); graphics.moveTo(0,5); graphics.lineTo(30,5);
I have a Line Series Chart in Flex with values from 0 to 90. I would like to set the background of the chart in such a way that, 0 - 30 is in green, 31 - 60 is in red and 61 - 90 is in blue.
I am trying to construct a line dynamically, with a start and end gradient. I want to avoid using a GradientBox, as the lines are dynamic. All I want to do is have the line start red, end blue. This code does not work though :(
I have a movieclip containing a vector drawing, can I dynamically change the color of the fill and line in AS2, or do I need to use setRGB and divide the movieclip?
I'm a noob, so please forgive me if i'm asking something really stupid! I'm doing a group project and i've just got the code from someone else, so i can add my part.
I am trying to add text in actionscript 3 (in a actions frame) simple enough. but.i want to have words next to each other, that have different fonts, font sizes and colors. I've been googling and experimenting for most of the day and haven't really got anywhere.
I will post what i have and what i would like to do, and if someone can help me, i would be most grateful.
Here the code that i'm working with:
[Code]...
When i first got the code, all that was there, was the info.text = "Animal...... line, i added the rest and also tried adding other line of code to make other words be in different fonts, but it didn't work.
So heres what i'm trying to do; I would like to have the headings, example; Animal name, Animal Type.. in one font, and the answers, example; Kangaroo, Mammal in another font.As it is at the moment, it look crap, because its all in the same font, color and size.
Thing is, after applying a new color theme for my Flash Builder enviroment, the only thing I couldnt find was an option to change the color when you enter in debug mode. When you have a brakpoint there, the color of that line change to light green, and I got dark background and white characters.. so, I dont see anything, I have to manually highlight the line.. really annoying.
I'm making a little coloring "game" for kids. The user selects a image (our originals are flash vectors), use the color picker to choose a color and click on parts of the image to color it as desired. Really simple stuff.
Now I'm trying to implement the program with automatized color filling (the old program requires that each part to be colored have to be a separate movie clip). After much research, I failed to find a method like the floodFill in BitmapData for MovieClips, so I tried to take a snapshot of the image as Bitmap with the BitmapData.draw method and use the floodFill directly.
The attached Ai file contains several parts (states) each of which needs to be imported to Flash as an individual movie clip; and then be able to color each of the states individually. At some later stage actionscript 3 needs to change each state's color.
I have a flash xml gallery in AS3. For the life of me I can not figure out how to change the font color. Its very complex and, I have know idea where to look. It dosn't seem to be driven from the xml, and I can only see very limited color # in the AS. only want to change text color.