ActionScript 2.0 :: Make A 4 Color Gradient, A Separate Color On Each Corner?
Jun 7, 2007make a 4 color gradient, a separate color on each corner?
View 2 Repliesmake a 4 color gradient, a separate color on each corner?
View 2 Repliesmy first time trying to draw a multi-color gradient in actionscript 3. So I got this code from the help docs, but I can't seem to get a vertical gradient, whatever formula or number I use for rotate, it stays stuck on the default horizontal gradient :(
[Code]...
How would I make a dynamic text boxes border a certain color, along with background color.
View 1 RepliesHow can I make the color from a mc, a square with a flat fill, fade from one color to another (by using actionscript only) ?
View 4 Repliesi have a button, with instance name lightblue_color. I am assigning a color to its color field like this: lightblue_color.transform.colorTransform.color = 0x65ffff; then i am adding an eventlistener to the button like this: lightblue_color.addEventListener(MouseEvent.CLICK, ChangeColor); Then, in the function: public function ChangeColor(evnt:MouseEvent):void {trace(evnt.target.transform.colorTransform.color);} It prints 0. Why is that? Shouldn't it print 0x65ffff or do i need to do some type conversions?
View 2 RepliesI want to make a full screen flash in html, its all works well until the background problem...
i want to make a gradient background and flash only allowed me to use solid color for the stage. how do i change the color to become gradient so it will looks nice in full screen?
I am facing a wiered problem in Flex. I Have a canvas with a HBox and Label. Please find the code below.
<mx:VBox verticalAlign="top" horizontalAlign="center"
fontSize="12" fontWeight="normal" verticalGap="0">
<mx:Label text="Cover" />
<mx:Canvas width="120" styleName="pbcontainer">
<mx:HBox id="pb" height="35" />
[Code]...
I am facing a wiered problem in Flex. I Have a canvas with a HBox and Label. Please find the code below.
<mx:VBox verticalAlign="top" horizontalAlign="center"
fontSize="12" fontWeight="normal" verticalGap="0">
<mx:Label text="Cover" />
[code]......
I want textfield text color in gradient at runtime.
Has anybody work with this???
how to set up 2 pre selected colors to tween a gradient to instead of "random" ones. My Goal would be to use this class as a dynamic background creater and i would like to have different gradient backgrounds on different pages.
View 1 RepliesI was wondering if there was anyway of changing the internal colour of an mc to a gradient?
View 3 Replieswhy do my gradient color doesn't work as mask?
I thought I can use the gradient color to assign a different opacity level to my mask. isn't correct ?
It just works as a normal mask...
I have a movicelip that has a cirlce with a gradient fill. When I rollover I use a color transform to change the color. I'm not sure how to get the color transform to return to its original gradient fill once I roll out of the movieclip
var overColor:ColorTransform = new ColorTransform;overColor.color = 0xffcc00;
mc1.addEventListener(MouseEvent.ROLL_OVER, buttonOver);
function buttonOver(e:MouseEvent):void{ mc1.transform.colorTransform = overColor;}
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 :(
[Code]...
I am trying to set the gradient background color for my panel via skins. I try to change my code but nothing seems to change. Not sure what to do.
My skin file
/<!-- layer 2: background fill --/>
<!--- Defines the appearance of the PanelSkin class's background. -->
<s:Rect id="background" left="1" top="1" right="1" bottom="1">
[Code]....
I use the following code to change the color of a gradient logo:
var myColor:Color = new Color(logo_mc);
myColor.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0});
Playing around with Fireworks, however, I found out that if I were to increase HUE from 0 to 121 the logo would look much better. how to modify the object {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0} to reflect a HUE increase of 121 points?
For a project I'm working on I'm trying to create a Flash file with a constantly color-shifting gradient that fills up the entire browser window. For a better explanation please see the following link:
View the Example
Don't worry about the moving balls, those are just there to challenge the frameRate of the movie, which has a maximum of 60. If you look at the background you can see the gradient effect I'm referring to.
The method I'm currently using to create the gradient animation is a simple shape tween on the Flash timeline that tweens between shapes with different gradient colors. I'm definitely not achieving the performance I want using this technique.
I've also tried creating a static gradient and shifting its color over time using ColorTransform, but this doesn't offer any better performance.
So that's a long-winded way of asking what people think would be a better way to create such a color-shifting gradient while getting better performance? Some examples might be through bitmapData or using PixelBender, but I'm not versed enough in these techniques to know which would get me the best performance.
I'm wondering if it's possible to create dynamic text field with a gradient color.
View 1 RepliesI'm attempting to create a color wheel component in Flex 4 that will allow me to represent RGB and HSL data.I'm doing so with a circular color wheel representing the various hues available to me and a rectangular gradient in the center of that which will represent the lightness and saturation fields
Currently I have the objects represented but I cannot determine the best way to fill them in. I have no problem creating the gradient necessary in the center square, but I cannot get the outer ring to build a -circular- gradient. It seems the only two native gradients in flex are linear and radial, but I need the gradient to linearly follow the path around the ellipse. How would I make this possible?
Here's the attempt I've made thus far:
<s:Group>
<s:Ellipse x="7" y="7" width="136" height="136">
<s:stroke>
<s:LinearGradientStroke weight="14">
[code]....
How do you get the color of a separate MC dynamically?
View 4 RepliesI'm trying to take a png and create two images, one that represents the color data and the other a grayscale version of the alpha channel.
Extracting the correct data was no problem, i'm just embedding the png, creating a new instance (as a Bitmap) and then extracting the relevent channels of it's bitmapData to two new bitmapData instances.
ActionScript Code:
[Embed(source='/../deploy/images/alpha_test.png')]
public var image : Class;
[code]....
The problem that i'm having, is that when i assign the colors bitmapData to a bitmap instance to display it, the background color is showing as black, even though the default fillColor of a bitmapData instance is white. how i can use the alpha channel data to create an 8 bit, grayscale image, that's the reverse of the channel?
If I've set a color for an MC with new Color(),how can I remove that color again?
Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {[code]..........
i want to change a colors tint and store that color for later use to apply to dynamically created sprites, for some reason the code changes my place graphic as expect but when i draw a square using the Colortransform.color property the color always in gray scale?
Code:
package{
import flash.display.*;[code].....
I want to do as follows: * click a "red" button write in textarea with red color font click "blue" button
* write in textarea with blue color font Isn't this possible in flash 10 using AS3 I tried using setTextFormat but the problem is i have to have text before inserting format on that.
i'm doing a school project of mine and i am having trouble doing the changing color objects. here is an axample of the script that i;m using:
on (rollOver) {
var colorful = new Color("_root.shapes");
colorful.setRGB(0x003366);
}
For this script it does change color, but how do i make it to stay the same color that user selected after going to another scene?
click a "red" button write in textarea with red color fontclick "blue" buttonwrite in textarea with blue color font Isn't this possible in flash 10 using AS3 ? I tried using setTextFormat but the problem is i have to have text before inserting format on that.
View 20 RepliesI am using a tilelist I want to change the border color and the background color of the tile on selection.
View 1 Replieshow could i remove these two colors for the header.... i could override rollover for the columns and leave the selection, but i want to remove these two effects from the header and i couldn't find a way to do that....
View 2 RepliesI'm making a flash app that allows you to create text, edit it. At some point, I need to get the text's color.
[Code]...
Then, you can stick the text on the movie and make a new one. During the creation of the movie clip holding the created text, all the format parameters of the text are passed to the movieclip. When I call back the .color parameter, it shows a value that isn't hex nor RGB... I've been googling for the last hour trying to find how to convert this back to RGB or hex values with no success. In this case, the value is : 65535
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.
View 1 Replies