ActionScript 3.0 :: Flash - Substract .1 Alpha From A Hex Color?
Nov 25, 2010How to substract .1 alpha from a hex color? For example:
[Code]....
How to substract .1 alpha from a hex color? For example:
[Code]....
I am trying to change the background color and alpha of a link bar in a Flex/Flash 4 application. No matter what properties I define, the background of said link bar is always white.[code]
View 1 RepliesI have a question how i add or substract 1 value to variable? up button should add 1 to display_week. down button should substract 1 from display_week.
HTML Code:
display_week = 0;
week(display_week,20);
week(display_week+1,100);
week(display_week+2,180);
_root.up.onRelease = function(){display_week++}
It does not work
I have the following code from a tutorial on Kirupa:
Code:
_root.currMovie = "home";
container.loadMovie(_root.currMovie+".swf");
[code]....
I am changing colors of an mc dynamically, in this way: I have an mc of the color green for example. What I want is it to turn to a specific color in time. I have in that mc a sprite, that is that specific color (red in this case). iIset it's alpha to 0 and put it in the layer above the green part. Now when I set its alpha to 1, it will be that colour. When I set it to 0.5 ofcourse it'll be a mix between those colours. Is it faster to do it, but changing 0xFFFFFF? I wouldn't know how to do it though. i want to be able to tell it to go 3/4 of color nr 1 and 1/4 of color nr 2, for example. i also want to be able to choose those colours specificly, for the sake of art. so just choosing 0xFF0000 for red, wont do, for artistic reasons.
View 3 RepliesSuppose I have a Bitmap containing a color which is some arbitrary mix of RGB, how would I go about setting the alpha value of that particula color?
View 6 Replieswhat is it called when you have a image say 50x500 but is shown as a 50x50 and every so many seconds it changes its x by +50 making it play like a filmstrip. Also is it possible to color-to-alpha images imported VIA .load ?
View 1 RepliesI have a MovieClip with white background and would like to change it's Background color and alpha settings at runtime. How can I?
View 1 RepliesI'm trying to merge two display objects into a single new BitmapData object, when it uses the color from one and the alpha channel from the other. The concept seems straight forward enough but I'm getting lost in the BitmapData APIs. I've been trying to use the Alpha blendmode with draw() but that doesn't seem to work.
View 2 RepliesIs it possible to make a dynamic textfield's background color alpha set to .5 and not affect the alpha of the text?
View 3 RepliesI have a button I am creating from 2 movieclips in the library. One is the button body (shape converted to MC). The 2nd is a series of button logo PNG's for an additional visual button state change.I add the logo MC with addChild to the button body. Then I add the button body to display/stage container. ll is layered correctly.If I add alpha or transform the color to the button body, it goes to the top - covering the button logo.Not applying the color or alpha to the button body and applying a color or alpha to the button logo has not effect (displays correctly).
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?
Inside movieClip container, there are colored buttons on layer1 and on layer2 there is movieClip square which covers the buttons. I want to use the color efffects and blending options of movieClip square to make layer 1 alpha. There are some blending options called alpha, difference, lighten and substract but Im not getting the right combinations. I want to make layer1 alpha only by using layer2.
View 1 RepliesI 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.
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.
View 1 Replies[URL] i want the object to fade out but in the object there's a lot of overlapping pictures and each becomes half transparent. how to make the movieclip to change the alpha as it was without objects?
[Code]....
just spotted this curious trick. If you want to flip something to go invisible on a click, and then reappear on another click (etc etc), try this:
create the sprite, setting alpha to either to 1 OR -1
mySprite.alpha=1; //OR
mySprite.aplha=-1;
[code]....
using AS, on loading a movie a solid shape is there with alpha at 100% then over a period of 5 secs its alpha is reduced to 0.
i'm new to this......please help if you want to if you don't have a good weekend but think of me struggling onwards and upwards...
How to convert color image into single Color as3?
View 2 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 have an issue working with the setStyle() on the modalTransprancyColor property. The module did not run on different variations of hexadecimal code, only one that seems to work is 0xDDDDDD. Anything else, this line of code will crash Flash.
Application.application.setStyle('modalTransparencyColor', '0xDDDDDD');
PopUpManager.removePopUp(this);
Tried: 'black', '0xff0000', '0xFF0000', '0x0116FC'
I'm using Flex 3.6v16995 with Flash Builder 4
I want to do aplpha = .5 for the whole app, but then have a MC display at full alpha, is there any way to do this?
View 6 RepliesIf 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 need to import a flv into flash project. i have encoded the flv in adobe media encoder, with alpha channel checked, but when i import it, it is not at all transparent.the .mov from which it was encoded is 100% transparent.
View 1 RepliesOk I know this practically sounds elementary, but I don't understand what I'm not doing correct here. I draw a simple rounded Rect
[Code]...
The trace on this loop shows the values are changing, but the actual event is instantaneous and without alpha.
PHP Code:function txtFade(mc:Object,i:Number):Number{[code]....
i would like to know if it is possible to have a letter that is made up of multiple colors. for example above you will see a hebrew letter. the DOT underneath it is actually part of the letter, but it is a different color.is it possible to have this same functionality in flash? what i would need to do is upload an XML file with all the words, and i would need all the dots below the letters to be a different color
View 2 Replies 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].....
How would I make a dynamic text boxes border a certain color, along with background color.
View 1 Repliesi'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?