ActionScript 2.0 :: When Click On A Button, It Changes Color

Oct 8, 2003

I have a list of buttons, en what I'm trying to do is when you click on a button, it changes color.

The color of the text of the original button is blue. On top is a movieClip with the same text but in black. So when you click a button I want to change the _alpha property from the black movieclip to 0. Meanwhile the _alpha of the rest of the buttons must be set back to 100; so if a button is already blue, it becomes black again.

Here's my code: the maximum value of the list of buttons is saved in 'max_array'

function anim(mc_huidig) {// function anim starts when you click 'mc_huidig'
for (i=0; i<max_array+1; i++) {
mc = eval("newsitem"+i);

[Code]....

When I use the trace on 'deactief', it does the trace but the trace keep going on, it never stops. It seems to me that "clearInterval(fadeout);" doesn't happen.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Flash Click On Color Button And Write In Textarea With That Color Font?

Oct 6, 2010

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.

View 14 Replies

ActionScript 3.0 :: Click On Color Button And Write In Textarea With That Color Font

Oct 6, 2010

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 Replies

ActionScript 3.0 :: Change Text Color In Previous Button When Click A New Button?

Mar 11, 2010

If I have say 7 buttons, each containing text that changes color on rollover using the "Up" "Over" and "Down" keyframes in the buttons' timeline.  Is there a simple way to get the button's text to change color when clicked, stay that way, and then change back to the original color once one of the other 6 buttons are clicked?
 
The only thing I can come up with is writing pages of code for each button that changes the color of every other button regardless of whether it was active.

View 13 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

Professional :: Make Button Keep Color After Click Or Touch

Aug 5, 2011

I am trying to figure out how I can have my buttons keep a color after it has been clicked or pressed.This is important since I need to make the viewer understand what answer was correct.I have set the down state but I need my button to keep that down state color.

View 1 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

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 :: When Click Button The Moviclip Mc To Tween To A Different Color?

Jun 27, 2005

i have a movieclip named mc. it has a color of

r=255
b=0
g=0
a=70%

i have 3 buttons that when i click i need the moviclip mc to tween to a different color. so when i click button a i want it to tween to the new color:

r=255
b=255
g=0
a=70%

if i click button b it tweens from this new color to a different color:
r=51
b=102
g=204
a=70%

etc. etc.

View 2 Replies

ActionScript 3.0 :: Flash Changing A Button's Color Via A Mouse Click?

Jun 8, 2011

I'm trying to learn a simple way to code a button's color to change when you click on the button itself. I got the button's alpha to work by doing the following: Create a text field with the word "Preflight" and convert it to a button. Drag the button onto the stage and give it an instance name of "Preflight1". On the first frame of the timeline, insert the following code:

import flash.events.MouseEvent;
import flash.geom.ColorTransform;
Preflight1.addEventListener(MouseEvent.CLICK, Preflight1Click);

[Code].....

Now when you test the movie, anytime you click the button "Preflight" the button's alpha drops (dims) by 10%. Works perfect and easy. Now, how can I do this exact same thing with the button's color? When you click the button, its color changes to some new color? I've tried colorTransform, but no luck.

View 6 Replies

ActionScript 3.0 :: Tween Color Of Movieclip Object From ColorA To ColorB When Click A Button

Jun 16, 2009

I have a movieclip object and I want to tween the color of this object from colorA to colorB when I click a button. What is the best way of doing this, is it possible to do it with the tween class? As far as I can see its not possible to tween a tint with the Tween class?

View 2 Replies

ActionScript 1/2 :: Click A Button On 2 Different Ways Shift Click Or Ctrl Click?

May 12, 2010

Lets say i have a button on frame 1. And if you press it normal, you ll get to frame 2. But then if you click it on another way, you ll get to frame 3. How do i do that easy?! With another way i mean like shift click or ctrl click or is it an easier way?

View 3 Replies

ActionScript 2.0 :: Active Button - Stay The Rollon Color After It's Clicked And Then The Rolloff Color When Another Button Is Clicked?

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

ActionScript 2.0 :: Script An Animated Button Of A Square (no Fill) Where On Rollover The Stroke Color Changes From One Color To Another

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

Actionscript 3.0 :: Flash Buttons (Up - Over - Down - Hit) - Button Color Change To A Different Color

Feb 24, 2011

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

Flex :: Color Of Icon When Changing Color Of Button?

Sep 16, 2011

I have a button with an icon. I want to have the button in gray so I change the chromeColor but when I do that, the icon became darker.On the left the button without changing the color, on the right, the gray button with and darker icon.How can I have a gray button without changing the icon color?

View 2 Replies

IDE :: Have The Button Color Change To A Different Color When It Is On The Page?

Feb 24, 2011

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.[URL] (When you are on the home page the button is red, but when on the about page the home button changes to white to show hierarchy.)

View 4 Replies

ActionScript 3.0 :: Click On The First Button Loads Ok But When Click On Second Still Showing The First Movie Clip In The Back

Dec 14, 2011

I have read all threads and can not find a solution but i am not somebody with a lots of knowledge about actionscript so here is my problem i am using this script .

[code]....

the problem is that when i click on the first button loads ok but when click on second still showing the first movie clip in the back ,,,,, i have try everything without luck ,,,, i guess i need to keep reading but will like to find an answer to this situation ,

View 3 Replies

Actionscript 3.0 :: If Function - When Click On The Button Takes To Another Page Without Showing The Click Animation

Sep 11, 2010

I created a movieclip animation that only activates when i rollover the movieclip button. I further extended the frames and created another frame animation that i active only when user clicks the button. So i have a roll over/out animation and click animation in the same movieclip in the same layer. Now the problem is that when i click on the button, its supposed to take me to another page, and it does, unfortunately without the click animation. That means after i click on the button its supposed to first finish the click animation and then go to another page. But when i click, it takes me to another page without showing the click animation

SO I tried the If function, but i seem to make a mistake somewhere and i dont know what to do. Now there is no error in script, but onw there is a problem in link, the button finishes the click animation but it does not go to the tarrgeted"about" frame. here's the code

[Code]...

View 1 Replies

Flex :: Menu Control - Click A Button And A Menu Is Displayed. Click That Button A Second Time And Hide That Menu?

Jun 20, 2010

Basically, I have a button and on click it displays a menu. I want to click that menu a second time and the menu closes. Currently, every time you click the button, the menu reopens. I pasted the Flex livedoc example below. If you click the button, the menu keeps reopening.Now, I rigged it up by setting a var to open and closed, so when clicking the button it does a check. However, if you click away from the screen, the HIDE event gets dispatched, and the menu closes. This messed up the open close var being set.

How could I make this Flex example below show the menu on button click, and then on a second button click, it closes the menu? Take into affect that if you click away from the menu, it closes it.Also, I played around with the MOUSE_DOWN_OUTSIDE event for the button and set the preventDefault, and the FlexMouseEvent event.cancelable is set to false.Changing to a PopUpMenuButton is not an option. I have to much skinning involved.Here is the Flex example:

<mx:Script>
<![CDATA[
// Import the Menu control.
import mx.controls.Menu;

[code]....

View 1 Replies

ActionScript 2.0 :: CS3 Movieclip Button - Click To Play, Click To Stop?

Jun 21, 2010

I am building a flash interface and I would like a menu where it is hidden to begin with (just a tab). You click the tab to expand it, and click again to collapse it. I've made a movieclip with animation of the menu opening up and closing, but I can't seem to work out how I'd go about making the movieclip open and close properly.

View 4 Replies

Actionscript 2.0 :: Counter Click Button That Can Storage Every Click On A Txt File?

May 18, 2011

I need a counter click button that can storage every click on a txt file or something..

View 1 Replies

ActionScript 2.0 :: When Rollover A Button It Fades To Another Color / When Rollout It Fades Back To The Original Color

May 7, 2002

This is my first post here and it my be a hard one to understand? Overview I have four buttons on the main stage (info) (help) (bio) (main) When you Rollover a button it fades to another color/when you rollout it fades back to the original color I have a script that does the color change because I do not want to use motion tweens. Here is what I did I made a 2 frame MC named infoMC In the 1st frame of the MC I made the word (info) a nested MC and attached the color change code to it. The 2nd frame of the MC Is the same as the 1st frame but I revesed the color change

[Code]....

View 8 Replies

ActionScript 1/2 :: Click Button To Play And Click To Reverse?

Nov 12, 2009

I have a test button i would like to have play a movie where a graphic expands. Once stopped, I would like to be able to click that same button and have the graphic go backwards. I would prefer to have timeline reverse, rather than lengthen the timeline of the mc because then i have to line up the start and end, and if one changes, i have to remember to change the other.

btn_test.onRelease = function(){  if (_root.adinstance._currentframe != 1) {  while(_root.adinstance._currentframe != 1) {  _root.adinstance.prevFrame();  else {    _root.adinstance.play();  }}

[code].....

View 3 Replies

ActionScript 3.0 :: Click On The Red Button And Click Back And Previous?

Jul 26, 2010

I am trying to work out this issue in as3 and I'm sure its simple but can't seem to get my head around it. If anyone can see a sollution I would be very happy to hear from you. [URL]..If you click on the red button and click back and previous you will notice that the speed it goes back when you click previous is much slower the further through the slides you go?

[Code]...

This is a simplified version on the code, I'm sure its in this chunk somewhere.

View 4 Replies

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

[Code]....
 
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 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:

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







Copyrights 2005-15 www.BigResource.com, All rights reserved