ActionScript 3.0 :: Get A Movieclip Fill Color To Change Once Clicked
May 23, 2009
I'm trying to get a movieclip fill color to change once clicked. I'm able to get the mouseover and mouseout working. But the click state isn't working properly.
Here's my code:
Code:
my_mc.addEventListener(MouseEvent.MOUSE_OVER, onFolderOver, false, 0, true);
my_mc.addEventListener(MouseEvent.MOUSE_OUT, onFolderOut, false, 0, true);
my_mc.addEventListener(MouseEvent.CLICK, showMovieclip, false, 0, true);
[code]....
When I use the above code, nothing happens once clicked. I tried using the color property, but, although that made a color change (black), it wasn't the color I had indicated (white).What I have is a movieclip ("my_mc"). Inside the movieclip are other movieclips. When one is clicked, only that movieclip ("my_mc.movieclip01"), is highlighted.
View 1 Replies
Similar Posts:
Oct 27, 2009
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?
View 1 Replies
Jan 19, 2012
I have a normal rectangle shape in flash. Id like to change the fill color of it using code, so I can use flashvars and be able to change the color of the shape with a few HTML adjustments.All I need to know is how to change the fill color of the shape. I've got the flashvars sorted.
View 1 Replies
Jan 28, 2007
How can I dynamically change the color of fill for something created like this:[code]I'd like to change the fill color onRollOver, onRollOut, onRelease, etc., but I don't know which property to refer to.[code]
View 8 Replies
May 15, 2010
ActionScript 3 - CS5'm new to Flash and wondering how to change fill color from code. Something like this - btnRed.fillColor = "0xff0000"
View 1 Replies
Dec 29, 2009
When I use begin/endFill it work only for sprite dynamicaly drawed. So I use colorTransform to color a Sprite which is already on the stage. However all is colored. Is it possible to select what you want to color (line or fill)? I want to change only the fill color.
View 3 Replies
May 19, 2009
i have found a beautiful water effect made in as3. The effect is available to download on the website below.I am trying to change the fill of the water (that is blue or any color that you pick).The original code fills the water like this:
Code:
public function renderWater():void {
shape.grapics.clear();
shape.graphics.beginFill(0x006699);
shape.graphics.lineStyle(0, 0x000000, 0);
[code].....
I tried to follow the instructions on the beginBitmapFill help, but i am receiving the water with no fill.
[code]...
View 1 Replies
Jan 28, 2009
Detail: I am reading some data from SVG and getting them as Sprite objects; now I need to change the fill color of these sprite objects dynamically without affection the outline color. I gave it a try with ColorTransform but that changes everything in the object.
PS: I already tried searching the forum for the same thing but search seems to have some technical issues... therefore had to
create new topic :(
View 1 Replies
Feb 12, 2009
Can i change the fill color of an existend rounded rectangle primitive?[code]
View 7 Replies
Feb 22, 2009
How can I fill a MovieClip with a random color using Actionscript 3?
View 13 Replies
Nov 24, 2004
can change the color of the button when clicked, however I want to make sure when you click on a different button, it changes the previous button back to its original color.I know i can do this the ghetto way and list out all the buttons i want with no color each time but if later i have 50 buttons i dont want to list them. So i built a loop but the loop is not working rightThis code is an example of what might be on the first button:
Code:
on(release){
for(i = 0; i<11; i++){
[code].....
View 7 Replies
Oct 23, 2010
I am new to flash, trying to do some animation character. I have 2 queries
1. What is lock fill; whenever I am trying to fill a color, it shows lock fill....
2. If I am creating a non regular figure like say with pencil, if I draw some part of it & do other part by later; these will be assumed different objects & I am not able to fill the whole figure with a selected color.
View 2 Replies
Sep 29, 2008
How can I make it stay the rollon color after it's clicked and then the rolloff color when another button is clicked?
[Code]...
View 7 Replies
Jan 31, 2004
How 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 Replies
Jun 16, 2003
Hoping someone can point me in the right direction with this. Instead of creating a button and nesting movie clips for each state, I'm trying to script an animated button of a square (no fill) where on rollover the stroke color changes from one color to another (tweening the tint). I want to do this to the button symbol so it's the same for all instances. Is this possible or do I have to go the button > nested MC route? Sorry if this is lame...it's been awhile since I've used Flash and I've forgotten quite a bit.
View 7 Replies
Aug 6, 2009
I have a movieclip I want to change the color. I am trying to do
PHP Code:
onClipEvent(load){
_root.Mc._tint = 0xff0000
}
but its not making it red.
View 2 Replies
Aug 6, 2009
I have a movie clip i want to change the color i am trying to do PHP Code:
onClipEvent(load){
_root.Mc._tint = 0xff0000
}
View 1 Replies
Jun 21, 2009
I am trying to change the color of my movieclip, but am having alot of trouble targetting it. Its within a button, that is within another movieclip, its path looks something like:
root.fullgrid.b1x1.planetfill
fullgrid is movieclip
b1x1 is button
planetfill is movieclip <---this is the one I'm trying to change color.
function change color(e:Event):void { var colorTransform:ColorTransform = target.transform.colorTransform; colorTransform.color = 0xFF0000; target.transform.colorTransform = colorTransform;
}
I am able to change the color of a movieclip on the stage, so I know the code works, its just a targetting issue.
View 1 Replies
Jan 6, 2010
Happy New Year 2010 everyone :) Just getting back into the Flash groove, and having a simple question.I have a movie(video player) where the color of the buttons changes. I've already drawn out the buttons and created a 1 color box(movieClip) that will be the background of all the buttons.
I've used ColorTransform to change the color of a rectangle that I used code to create, but what is the simplest way to go about changing a color in a movieClip containing a graphic that you physically have drawn out. Path to movieClip that I need to change the HEX value of: controls.btn_Sound.colorChip
View 2 Replies
Sep 1, 2009
change a color of a movieClip?
View 4 Replies
Oct 28, 2010
I want to change the movieClip color with the actionscript, but I am not able to get to how to change it
View 3 Replies
Nov 19, 2011
I have implemented this code to see if it was any easier to do as part of my plan. My objective is to be able to click a square and for it to change color then click again for it to revert back to the original color BUT I want this to repeat constantly if possible as it wont do currently after the code I added:
Here is the code:
Code:
import flash.display.Sprite;
import flash.events.MouseEvent;
var box:Sprite = new Sprite();
[Code].....
View 7 Replies
Jan 20, 2003
Is it possible to change the color of a b/w movieclip with AS in flash 5?
View 4 Replies
May 25, 2011
i have to change the movieclip color on press it, i did it. the thread is how to change the color of movieclip from two color (i,e) for example take two colors red and blue, in first press it change into red color and in second press change into blue, for third change into red, for fourth press change into blue,fifth->red.........like wise.
View 3 Replies
Jun 30, 2004
How to change a movieclip's colour value using AS? Thing is I need it to fade from 1 to another, not just flick like in all the tutorials I've found so far.
View 5 Replies
Feb 6, 2009
How can I change the color of a movieclip dynamically and still keep it's filters? For example:
I have a movieclip on stage with a bevel filter on it. I then want the movieclip to change from blue to red when it's moused over and vise versa when moused out.
The color values I have are hexidecimal: 0xff0000, 0x0000ff
How can I do this? I tried colortransform but when I use that it changes color but removes filters.
View 3 Replies
Oct 8, 2009
On layer 2 I have my movie clips loc1, loc2, loc3....etc... inside a movie clip (Inner Main) , and on layer 1 I have a movie clip (click).
Code:-
for (i in mc) {
if (typeof (mc[i]) == "movieclip" && i != "click") {
[code].....
View 2 Replies
Aug 8, 2010
I'm trying to get a movieclip fill color to change once clicked. I'm able to get the mouseover and mouseout working. But the click state isn't working properly.Here's my code:
Code:
Code:
my_mc.addEventListener(MouseEvent.MOUSE_OVER, onFolderOver, false, 0, true);
my_mc.addEventListener(MouseEvent.MOUSE_OUT, onFolderOut, false, 0, true);
my_mc.addEventListener(MouseEvent.CLICK, showMovieclip, false, 0, true);[code]......
When I use the above code, nothing happens once clicked. I tried using the color property, but, although that made a color change (black),it wasn't the color I had indicated (white).What I have is a movieclip ("my_mc"). Inside the movieclip are other movieclips. When one is clicked, only that movieclip ("my_mc.movieclip01"), is highlighted.
View 9 Replies
Jan 22, 2008
I am trying to link my list component to the movieclips drawn from an xml...basically my app reads an xml and draws a floorplan of booths...the list is populated with exhibitors and is linked to the rented booths on the floor plan...currently when you click an exhibitor in the list, the alpha of the booth changes to 10...then back to 100 when you choose another exhibitor...I want to change the color of the booth to something else like yellow...is this possible through actionscript? [URL]
View 1 Replies
Feb 6, 2009
I'm trying to change a movieclip's color randomly every second using actionscript 2. Additionally, I like to use fading as the transition between the colors.
View 5 Replies