ActionScript 3.0 :: On Click - Movieclip Color Change?

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:


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

Similar Posts:

ActionScript 3.0 :: Change Color On Mouse Click?

Oct 17, 2011

I have followed Ned's code from another post, whereby if a text button is clicked, the color will change.  The code is like

var clicked:Boolean = false;
var clicked2:Boolean = false;
btn1.addEventListener(MouseEvent.CLICK, btn1click);

Now if I click on the first button, it changes color and stays like that, which is perfect.  If I click on btn2, this changes color and stays like it.  The problem is that if btn2 is pressed, it should change color and stay like it (as it is doing), but btn1 should return back to its normal color (black).

View 1 Replies

ActionScript 2.0 :: Click Mc To Change Color But Not When Dragged?

Dec 27, 2009

I am trying to simulate onpress and onrelease functions but using onMouseDown and onMouseUp.squareContainer can be dragged around but squareBack, which is inside squareContainer changes colour when clicked. These both work.But.. when I drag squareContainer around, if the mouse is on squareBack (back) it changes colour as it sees it as onMouseDown. In the mouseUp, if squareContainer has changed position then it has been dragged. Then, using this I somehow want to say in mouseDown that if squareContainer is being dragged then dont change colour.. but it doesnt work!!![code]

View 1 Replies

ActionScript 2.0 :: Click A Different Color Tab Or Whater To Change?

Jul 26, 2005

in my drawing program i have it so when u click a different color tab or whater to change the color it takes you to a new frame with the coding the same except the color. but when it goes to a different frame the stuff it formerly drew gets erases. how can i fix this!

View 9 Replies

ActionScript 3.0 :: Grid Planner : Change Color On Click?

Mar 21, 2011

Im making a tool to plan dungeons, its a 25x25 grid made up of movieclips, the movieclip used has 10 layers, each layer a different colour/pattern to represent a room type. The idea is to choose the room from the legend then click on the movie clips you want to turn them into that room type.i have tried 2 methods, 1st i generated a grid and added a "cell"+count to each new instance as made, however i can only get it to change the last cell, no matter which clip is clicked.Now the 2nd "noob" method is to make each cell(instance square on the grid) and label them by hand, as well as add the code for each cell, but clearly this is alot of work. But it works, the next steps would be To convert the current grid setup into a text string to save Add a counter so you know how many squares you have used Reset button.

View 1 Replies

ActionScript 3.0 :: Button / Mc Change Color On Click In Slideshow?

Jul 12, 2011

I have a slideshow with keys that when clicked, direct the viewer to a certain image in a slideshow.  I did this using some as3 directing flash to go to certain frames with specific labels tied to specific 'keys' or little navigation buttons.
Often I see slideshows where once the little navigation button that represents a certain slide in a show is clicked, it changes color.  Not just when it is clicked, but when it is currently on the specified image.  When another button is clicked, and when that image in the slideshow is no longer 'current', the color of the button (or mc if that's what it needs to be) changes back to the normal color.  Currently, I have the button's over and down states as one color, and the up and hit states as another color.  What do I need to do to ensure that when the button is clicked, and it's corresponding image is the 'current' image shown on screen, that the button changes to a different color to distinguish it from the rest of the nav buttons?
Here is an example of what I want to do:[URl]...

View 3 Replies

ActionScript 3.0 :: Button Color Change Every Time Click It?

Mar 21, 2012

flash professional cs5 and i dont know how to do thing like in actionscript 3.0

View 1 Replies

ActionScript 3.0 :: Change Button's Color Evertime I Click It?

Mar 25, 2012

I want to change the color of my button each time i click it using action script[code]...

View 1 Replies

Flex :: Click On AdvancedDataGrid Cell And Change Its Color?

Oct 9, 2010

simple (?) question: what's the easiest way to programmatically change the style of an ADG cell most recently clicked by the user? Important note: I'm assuming cells not to editable and the selection mode to be singleRow, i.e. the specific cell needs to render differently from the standard highlight that comes with being part of the selected line.

View 1 Replies

Actionscript 3.0 :: Change Color Of A Product When Button Click?

Jun 27, 2010

some are there on internet like product demo swfs(phone,ipods,cars)they have some feature bottom of screen has 4,5 color buttons.if we click red button product color change to red.ny one know how to do that..?is that change color of movie clip or insert another image or how..?

View 3 Replies

ActionScript 2.0 :: Change All Background Color When U Click A Button?

Jun 16, 2005

Everybody has seen the braingiants website (url..). And all the bouncing box efx.But, does anybody know how to change tha all background color when u click a button...? like the ones in braingiants. standing in the html

View 5 Replies

ActionScript 2.0 :: Change Text Field Color On Click?

Apr 15, 2007

I have a dynamic text field that updates when an mc is clicked. Just wondering how I can change the color property of the text when when the on click event happens.

View 4 Replies

ActionScript 2.0 :: When Click On Colour / Movieclip's Color Is Changed

May 12, 2010

how exactly I'd be able to make a color wheel so that when I click on a color, the movieclip's color is changed.

View 1 Replies

ActionScript 3.0 :: Changing Color Of Text In A Movieclip On Click?

Feb 4, 2010

I'm looking to change the color of text in a movieclip when the user clicks it(IE it'll turn red for wrong, and green for correct). I've set it up so it can do other things, like gotoAndPlay, I just can't get it to change color. Here's what I've got so far for AS. The movieclip on the stage with the text in it is called q1, for question 1.

q1.addEventListener(MouseEvent.MOUSE_DOWN, navPress);
function navPress(event:MouseEvent):void{


View 3 Replies

How To Change Color Of MovieClip

Aug 6, 2009

I have a movieclip I want to change the color. I am trying to do
PHP Code:
_root.Mc._tint = 0xff0000
but its not making it red.

View 2 Replies

Tint - Movieclip - Change The Color

Aug 6, 2009

I have a movie clip i want to change the color i am trying to do PHP Code:

_root.Mc._tint = 0xff0000

View 1 Replies

ActionScript 3.0 :: Change The Color Of Movieclip?

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:
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

Flash :: Change The Color Of A MovieClip?

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

ActionScript 3.0 :: Change A Color Of A MovieClip?

Sep 1, 2009

change a color of a movieClip?

View 4 Replies

ActionScript 2.0 :: How To Change MovieClip Color

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

ActionScript 3.0 :: On & Off Color Change MovieClip?

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:

import flash.display.Sprite;
var box:Sprite = new Sprite();


View 7 Replies

ActionScript 2.0 :: Change The Color Of A B/w Movieclip ?

Jan 20, 2003

Is it possible to change the color of a b/w movieclip with AS in flash 5?

View 4 Replies

ActionScript 2.0 :: Movieclip Color Change?

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-> wise.

View 3 Replies

ActionScript 2.0 :: How To Change MovieClip Color Value

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

ActionScript 3.0 :: Change The Color Of A Movieclip Dynamically?

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

ActionScript 2.0 :: Change MovieClip Color On Rollover?

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).

for (i in mc) {
if (typeof (mc[i]) == "movieclip" && i != "click") {


View 2 Replies

ActionScript 2.0 :: How To Change Color Of MovieClip (Booth)

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 this possible through actionscript? [URL]

View 1 Replies

ActionScript 2.0 :: Change A Movieclip's Color Randomly Every Second?

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

ActionScript 3.0 :: Change The Color Of A Movieclip On The Stage

May 30, 2010

i found the "Changing color i actionscript 3" tutorial here on kirupa and tested it out and then modified it so it would fit my needs.. But now im stuck...Im using this piece of code to change the color of a movieclip on the stage:


View 2 Replies

ActionScript 2.0 :: How To Change Color Of Image Within MovieClip

Dec 27, 2010

I am trying to change the color of an image within a MC using color matrix. What I want to do is adjust he hue, saturation, contrast, and brightness so I can create a realistic color change without affecting shadows when you click on a color box. I have played with the filters within the application and can achieve it but want to do so with actionscript.

On each button I have a code similar to...
on (release){ = "color2";

Then within the primary timeline I have if then's under the myClickedBtnFunction to the effect of...
if (_root.btn=="color2"){
code will go here...
Here is a link to the file I am trying to apply the effect to [URL].

View 1 Replies

Copyrights 2005-15, All rights reserved