Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash


ActionScript 3.0 :: On Click - Movieclip Color Change?

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 (Posted: 08-08-2010, 11:46 AM)

Sponsored Links:

Related Forum Messages For Flash category:
ActionScript 3.0 :: Change Color On Mouse Click?
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).

Posted: Oct 17, 2011 6:29 AM

View 1 Replies!   View Related
ActionScript 2.0 :: Click Mc To Change Color But Not When Dragged?
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]

Posted: 12-27-2009, 03:15 AM

View 1 Replies!   View Related
ActionScript 2.0 :: Click A Different Color Tab Or Whater To Change?
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!

Posted: July 26th, 2005

View 9 Replies!   View Related
ActionScript 3.0 :: Grid Planner : Change Color On Click?
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.

Posted: 03-21-2011, 07:01 PM

View 1 Replies!   View Related
ActionScript 3.0 :: Button / Mc Change Color On Click In Slideshow?
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]...

Posted: Jul 12, 2011 8:46 AM

View 3 Replies!   View Related
ActionScript 3.0 :: Button Color Change Every Time Click It?
flash professional cs5 and i dont know how to do thing like in actionscript 3.0

Posted: Mar 21, 2012 9:17 PM

View 1 Replies!   View Related
ActionScript 3.0 :: Change Button's Color Evertime I Click It?
I want to change the color of my button each time i click it using action script[code]...

Posted: Mar 25, 2012 10:07 PM

View 1 Replies!   View Related
Flex :: Click On AdvancedDataGrid Cell And Change Its Color?
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.

Posted: Oct 9 10 at 5:11

View 1 Replies!   View Related
Actionscript 3.0 :: Change Color Of A Product When Button Click?
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..?

Posted: Sun Jun 27, 2010 4:32 pm

View 3 Replies!   View Related
ActionScript 2.0 :: Change All Background Color When U Click A Button?
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

Posted: June 16th, 2005

View 5 Replies!   View Related
ActionScript 2.0 :: Change Text Field Color On Click?
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.

Posted: April 15th, 2007

View 4 Replies!   View Related
ActionScript 2.0 :: When Click On Colour / Movieclip's Color Is Changed
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.

Posted: 05-12-2010, 05:58 PM

View 1 Replies!   View Related
ActionScript 3.0 :: Changing Color Of Text In A Movieclip On Click?
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{


Posted: February 4th, 2010

View 3 Replies!   View Related
How To Change Color Of MovieClip
I have a movieclip I want to change the color. I am trying to do
PHP Code:
but its not making it red.

Posted: August 6th, 2009, 09:58 AM

View 2 Replies!   View Related
Tint - Movieclip - Change The Color
I have a movie clip i want to change the color i am trying to do PHP Code:

_root.Mc._tint = 0xff0000

Posted: 08-06-2009, 10:44 AM

View 1 Replies!   View Related
ActionScript 3.0 :: Change The Color Of Movieclip?
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.

Posted: Jun 21, 2009 8:58 AM

View 1 Replies!   View Related
Flash :: Change The Color Of A MovieClip?
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

Posted: Jan 6 10 at 17:52

View 2 Replies!   View Related
ActionScript 3.0 :: Change A Color Of A MovieClip?
change a color of a movieClip?

Posted: 09-01-2009, 04:30 PM

View 4 Replies!   View Related
ActionScript 2.0 :: How To Change MovieClip Color
I want to change the movieClip color with the actionscript, but I am not able to get to how to change it

Posted: 10-28-2010, 04:04 PM

View 3 Replies!   View Related
ActionScript 3.0 :: On & Off Color Change MovieClip?
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();


Posted: 11-19-2011, 02:25 PM

View 7 Replies!   View Related
ActionScript 2.0 :: Change The Color Of A B/w Movieclip ?
Is it possible to change the color of a b/w movieclip with AS in flash 5?

Posted: January 20th, 2003

View 4 Replies!   View Related
ActionScript 2.0 :: Movieclip Color Change?
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.

Posted: May 25th, 2011

View 3 Replies!   View Related
ActionScript 2.0 :: How To Change MovieClip Color Value
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.

Posted: June 30th, 2004

View 5 Replies!   View Related
ActionScript 3.0 :: Change The Color Of A Movieclip Dynamically?
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.

Posted: 02-06-2009, 01:27 PM

View 3 Replies!   View Related
Copyright 2005-08, All rights reserved