ActionScript 2.0 :: Set Alpha Of Individual Buttons?
Aug 11, 2010
I have two buttons without names and I'm trying to have the same exact code on each so that you can click the button and it will turn white (or look like it), and click it again and it will turn back to blue (alpha at 100).This is the code I'm using on each button:
Code:
on (release){
if (_alpha == 100){
_alpha = 1;
[code]...
Unfortunately it causes both buttons to change their alpha to 0, not just the one that the code is on.Could anyone tell me why this is and how to make it so that only the button clicked is the one that has the alpha change? The reason I'm doing it this way is that I am going to end up using over 600 buttons like this, and I would much rather be able to copy and paste them in rows instead of naming them (I've already spent upwards of 45 minutes naming them A1, A2, B1, B2 and changing the code to fit).
I have a movie clip that holds a button (latter a dynamic textfield -- (button is quicker for testing )). I have the movie clip alpha set at .65 as I want the background image to bleed through slightly. I put the button on the movieclip as I want it to be visible as the movieclip tweens on stage. My question is, can I target the buttons alpha when the button is a part of my movie clip or does the movie clip and the button have to be seperate?
I am working on a project for school using ActionScript 3. I have a matrix created with an animated movie clip. The matrix looks like a bunch of shapes changing size and color on the screen. I would like to have it so when I move my mouse moves over an individual shape in the matrix the alpha will change to be more transparent... like 0.5. I'm sure it would be a mouse move function, but I don't know how to write that part of the code.[code]...
how to grab the transparency (or alpha value) of individual pixels in an embedded or loaded video? We tried copying over a frame of video into a bitmapdata object with transparency enabled. However, even though we can "see through" the video at certain spots (indicating alpha = 0 there), the alpha value comes back as 0xFF for every single pixel in the BitmapData object.Obviously alpha data is being stored inside the embedded video, but how can I actually get that value?
I started creating a simple navigation bar: [URL] But decided to make individual buttons: [URL]
As you can see the latter repeats, however the code (after about an hour checking it seems to be identical: Actions for frame one: _root.buy_mc.onEnterFrame = function() { if (mouse_over_buy_mc) { _root.buy_mc.nextFrame(); } else { _root.buy_mc.prevFrame(); }};
Actions for invisible button: on (rollOver) { _root.mouse_over_buy_mc = true; } on (rollOut) { _root.mouse_over_buy_mc = fstartlse; }on (release){ getURL("[URL]"); }
I've gotten as far as getting a listbox with a list of articles to display the articles in a dynamic text box, only i can only get it to work if i use one huge external text file that contains all the articles. what i want is to have each item on the list open up its own external text file, i.e. for each item on the list, there exists a separate text file. I'm about ready to put my fist through the monitor, and that would suck because this is a really nice monitor
im trying to navigate through a movie clip and stop at frame labels using individual buttons to call to individual labels while being able to see the on the way to the frame(for a blurred effect).my goal is to jump from point A to point F to point Z and see all the frames in between and visa versa.
I need to make the buttons that are associated with this code, toggle, so once you press them they become greyed out. So I was thinking of after you press a button, the alpha is reduced to 40%. Can someone help me place that piece of code into this monster? -I know it should go into the presto function of my script. Which works fine, but then it stays at 40%alpha after the user click on a different button. I need it to toggle off once someone clicks on the next button. [code]
I have a bunch of thumbnails which I want to be treated the same on rollover/rollout/press. Right now, I have it working so that the alpha changes on all of them on rollover/rollout/press, but to do that, I have a code for each individual thumbnail, and I know there has to be a way to just have one code that applies to all of them instead of repeating so much (but I'm just not sure how to do it). This is what I have right now:
I figured out how I can create a roll over effect on one button so it fades in & out depending on if you are on it or not. I'm trying to create the same effect for my other 13 or so buttons & I can't seem to get it. I keep getting errors any way I try to code it. This is the code I have **trying to add the code for my first 2 thumbs"
I am creating a 50 state map. You can see the swf right here - URL... am trying to quickly make it so each state fades to 50% opacity on rollover. But I haven't been able to make it work.[code]
[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?
As far as I know theres in no way to cahnge the alpha of a dynamic text box. I put one in a movie clip and when i try to change the alpha of it everything else in it changes its alpha but the not the DT box. Could someone plz verify for me that u can't change alpha and help me find a component that allows alpha control with a dynamic text box. thx in advance.
make an interactive flash simulation of a display that has several different settings. these need to work individually so that the user can set the different indicators to the number they want. the picture shows the two main functions; a number indicator and a status bar (kind of like the reception bar on a phone).i have tried to get .swf files to load on top of each other, but they keep erasing previous settings in other indicators. is there a way to get this to work? or maybe a completely different approach that would be smoother? or can someone point me in the direction of a tutorial or a template that has this function?
[code]I would like to populate 'allLinks' with objects 's'.However I have been unsuccessfull in my attempts.I need this loop to work for a a large number of items so I dont really want to have to add each individual item.
With get- and setTextformat I can set the individual color of a section in a TextField. There is a problem with getting and setting a textformat from and to a TLF (set- does give an error message when putting the TextFormat back to the TLF).Now if I have two strings and want them to have different color and size in one TLF what would be a good way to do that. I don't want to programm all TextFormat propertys for every different Text in my application.
I have figured out a way to change the style of tabs at run time with following logic:
var cssStyle:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".MyTabs"); cssStyle.setStyle("borderColor", "red");
But here ".MyTabs" class is applicable to all the tabs between first and last tab. As per getStyleDeclaration javadoc, it only accepts "class selector" and "type selector" not the id selector.
How can I change the individual tab style at run time?
I need a way of recognizing what weapon is currently being held.The way the weapons works is it is a movie clip, with multiple frames, each with a different weapon, and each weapon has a different minimum/maximum damage they can do. How can i make a code that recognizes which frame the weapon movie clip is on?
I been trying to find this but no luck so far. Is it possible to get different soundmixer values for two different sounds that are playing at the same time?
At the moment it seems to me that the soundmixer takes the combined sound output for analysis, which si not what I need.
Let's say I have and HTML page that contains lots of small SWFs: example: Code: [URL] Let's say each of those SWFs has also assigned method STOP(); which stops it from playing further and PLAY(); which starts playing it(ex: u can see "PLAY" btn in example attached). Now what i want to do: I want to be able to controll ANY of those SWFs from ANY other SWF inside that HTML file. Ex: i click 1 SWF to PLAY(); and ALL other playing SWFs will be STOP();-ped, so that only 1 SWF plays at a time.
in a actionscript file, is there anyway to have different codes target different movieclips? For example, if i want one movieclip to tint to red and another to tint to blue, can I do that in the same actionscript file or do I need to do that in separate actionscript file?
I've created a loop to define onPress functions for a group of movieclips. The code is here:
Code: var select:String = "none"; var elist:Array = ["dappled", "panda", "red", "blue", "green", "gray", "fire", "earth", "water", "garden"];
[Code]....
All the mcs now have an onPress function. However, they all define the "select" variable as the last item in the array. Is this because every mc is referencing the new curs? I'm not really sure... Is there a way I can fix this so select is given the correct (unique) value every time?
I have created a function which spawns a enemy out of the library random upon any of the four corners of the stage. But know I want to add individual AI to each one: This is the random spawn:
[Code]...
How would I go about such a task. Btw if you have trouble understanding the mechanics of my messy code please say and I'll do my best to explain it.