ActionScript 3.0 :: Menu - When I Click On The Button , Alpha Return To 1 For The Previous Button?
Jan 12, 2011
i was making asimple menu .
ActionScript Code:
var currentLink:MovieClip = a_mc;
//buttons mode[code]...........
when i click on the button the alpha of this button will be 0.5 , when i click on another button the alpha of the previous button is still 0.5 , and so if i clicked on all buttons the alpha of all buttons will be 0.5,,,i didn't want that , i want when i click on the button , alpha return to 1 for the previous button .
View 5 Replies
Similar Posts:
Mar 18, 2011
Am creating a two page document in flash cs4. Each of these 2 page documents have links to a learning resource on a web server.All I want is for the user to be able to navigate to and fro this two page document. Infact, I want to be able to click on a NEXT button to go the the nextpage and PREVIOUS PAGE button to go back to the previous page.
View 1 Replies
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
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
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
Jan 1, 2007
i new to actionscript and am not sure where to begin so i will explin what i would like to do. i have a myspace site that i have created a div overlay with...<a [URL] now what i would like to do is use actionscript so when you click on the menu button a image wil pop up in the ipod screen and when u click the play button something else will pop up
View 6 Replies
Apr 9, 2008
I'm trying to add a back button once I click a main menu button then remove the back button once it is pressed. I get the title error.
[Code]...
View 6 Replies
Jun 8, 2009
I have a navigation with three buttons. When one button is clicked, it turns a certain color. When the next one is clicked, that one turns a different color, and the previous one turns back to it's original color. So far when I click, the buttons turns colors, and then when i click on the other, the previous one doesn't turn back. Here is my code so far:
Code:
function navClick (e:MouseEvent) {
var mc = e.currentTarget;
switch (mc.name) {
[Code].....
View 2 Replies
Oct 3, 2002
I just recently visited the site for j records [URL]If you noticed everytime you click a button two of the MC's go to designated points from where ever they where previous.
View 14 Replies
Mar 12, 2010
In my scene, I have five buttons and each one will start a movie clip within the scene.o, I have only one frame for the entire scene( but four layers: button,background(with music), action and my last one is animation.Each time a click a button( with onPress or onRelease actionscript 2.0.), a movie clip starts(that's ok..)But, when I click an another button, I want the previous movieclip to stop and disappear. In my case, the new movieclip starts but over the last one who is still there.Furthermore, when I want to click on a button that had already been pressed, I want him to start over his movieclip. For now, I need to press it once again to cancel his movieclip and then press it again to start his clip.In resumé, all I want is that each time I press a button, the last movie clip disappear because the new one starts and an already been pushed button, when pushed again, starts his movie clip without the need of pushing it to cancel his first operation and then pushed it again.
View 5 Replies
Jan 27, 2010
The menu is like this http:[url]... (the site is in portuguese but it doesnt matter), when I click in on menu the actual menu does an alpha to 0 and the next menu appears using the alpha from 0 to 100 (and some animations like the cellphone going up).Now, how can I do a menu like that, whatever the menu I choose, it does that alpha animation ?
View 1 Replies
Feb 1, 2011
So, in my base flash file I have movieclips playing inside of a container.
They are cued from external .swf files.
When one is pushed another checks to see if that movie is at its "midframe" and then plays the remainder of that movie before playing the movie that was pushed.
ALL OF THIS, works fine. The problems is that I have a button inside of these movieclips that I need to play the remainder of the movie to then return to the main menu.
This is the code on the buttons which cycle through the movieclips:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "illustration";
container.loadMovie(illustration);
[Code].....
If I wanted the movie to only return to to the main menu I could use this code, but it's flawed for two reasons:
on(release){
_root.gotoAndPlay(1);
}
a. This doesn't play the rest of the movie before returning to the main menu.
b. Once it returns you to the main menu, none of the other movies will play again.
View 3 Replies
Feb 18, 2011
I am unable to change alpha of movieclip on button click using as2.[code]...
View 1 Replies
Feb 21, 2011
i am developing one small imteractive game.in that i'm getting one difficulty.Difficulty is: i want to play a moviclip whenever i 'll click on button ,and .For that i hav applied logic in following way.
function onMouseClick(event:MouseEvent):void
{
this.alpha=0; (alpha of 1st movieclip will 0 )
[code]......
View 5 Replies
Feb 21, 2011
i am developing one small imteractive game.in that i'm getting one difficulty.Difficulty is: i want to play a moviclip whenever i 'll click on button ,and .For that i hav applied logic in following way.[code]whenever i'am clciking on first movieclip(btn), it definitly goes to 0(i.e off), but 2nd movieclip(instance name "alpha") is not coming to 1.
View 3 Replies
Jun 10, 2009
I have an .5 alpha layer that I want to fade out when any 1 of 5 buttons is clicked.
1) The alpha layer is on the screen, but its not at 50%, its solid
2) Its not fading when a button is clicked
3) Its not in the right position
4) I am getting an output error message that says:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@3f7e34c1 to colorbars.
at flash.display::MovieClip/gotoAndPlay()
at Colorwheel/goColor()[Colorwheel::frame1:17] (
This code is telling the int_btn to go to the alpha layer frame, which continues thru frames 1 and 8) the code they are referring to is on frame 1 with a button that is also on frame 8 that I don't want the mouse up function to affect the alpha layer. The 4 other buttons on frame 8 should affect the alpha layer. The code on frame 8 tells the mouse up function to fade out the alpha layer:
var colorscreen:colorbars = new colorbars;addChild(colorscreen) //this is working its the alpha layer mccolorscreen.x = 0;
//this is not workingcolorscreen.y = 51;
colorscreen.height = 513;colorscreen.width = 612;colorscreen.alpha = .5; //not working
// all buttons below work but wont fadeout the alpha layer
[Code] .....
How do I tell it not to listen to the int_btn on mouse up? Should I be using an array or enter_frame or remove event listener or use all three to achieve my goal of fading out the alpha layer when any of the 4 btns are clicked?
View 5 Replies
Oct 16, 2007
I'm trying to put together a sideshow using a modification of load_images.fla (a sample file supplied with Flash) combined the the 'Kirupa Menu with Slider' tutorial ([URL]) The slideshow uses a 'next' & 'previous' button to click thought the images. In addition to this I have a separate slide menu navigation (currently just numbers 1-7), with a rectangle highlighting the number of the image being viewed. I would like to move the rectangle to show which image is being viewed, when the 'next' or 'previous' button is pressed. The follow code shows the actionscript for the 'next' & 'previous' buttons....
[Code]....
View 2 Replies
Jun 19, 2010
I created a Button in MXMXL. On button click, I create a Menu as a child of the Button. I am using an XML datasource. The reason for creating it this way, was due to the amount of custom skinning involved. A popupmenubutton was not an option. Anyway, so my question is this: when clicking the button, the menu is displayed. However, if you click the button again, the menu reopens. I want the menu to close if the user clicks the button a second time. Now, I got it to work by setting a var after opening the menu, and then I check that var on each click to make sure that the menu isn't already open. If true, then it will close the menu, instead of reopening it. This works, until the user clicks away, in which the HIDE event gets dispatched and the menu closes. My hack no longer works.
View 1 Replies
Feb 24, 2010
Is it possible to do this: Have two separate menus on web page. Want to reload or send some variable or any kind of way that if you click any button in one menu it also deactivates any pressed button in second menu...
View 1 Replies
Feb 23, 2010
I'm making a menu in flash and I want that when I Click the button/movieclip moves up and when I Click again it moves down again. I already did it with MOUSE_OVER and MOUSE_OUT but that gave me problems.
Here is the Code:
Actionscript Code:
//Eventlistenersmenu_over.buttonMode = true;
menu_over.addEventListener(MouseEvent.MOUSE_OVER,onOver,false,0,true);
menu_over.addEventListener(MouseEvent.CLICK,onOut,false,0,true);
//Functionsfunction onOver(e:MouseEvent):void {menu_over.gotoAndPlay("menu_op");
}function onOut(e:MouseEvent):void {menu_over.gotoAndPlay("menu_beneden");
}
View 1 Replies
Jun 12, 2011
A "Remove" context menu item is to be shown when the user right-clicks on a button. If the user clicks on the "Remove" option, that button should be removed from its Tile parent container. How would I implement this using Flex 3 and ActionScript 3?
View 1 Replies
Jun 26, 2009
I was getting in to transitioning from AS2 to AS3 a while back and had designed a page that had menu buttons that when clicked, loaded an external swf in to a container. Pretty simple accept for the fact that it was a while ago and my computer crashed so I'm having to redo this and learn it all over again. I have read in to flash on the subject but I am not to sure on the best way to go about this. I know there are a lot of people on here who make thing a lot more simple and structured than I do. I'm so used to putting the actionscript on the button and I'm a little stuck on the best way to combine the actionscript for the button and loading the swf. I would need to make a button load an external swf in to a container when clicked? I figure I just need one and then I can copy it to all the other menu buttons.
View 2 Replies
Apr 18, 2009
I am completely new to this with flash and action script. I checked the Flash MP3 Player tutorial and I wonder how I'm doing a previous button and a volume scrolling button in action script?
View 1 Replies
Mar 14, 2007
I'm loading in 5 jpegs from an external file using "loadMovie" and i have 5 corresponding buttons (1-5) to load them with.
I want to change the jpeg the button loads in depending whether a separate navigation button has been pressed -
i.e.
navigation buttons:
-motorbike pics
-car pics
-lorry pics
If a user clicked on "car pics" then the loading buttons 1 to 5 would load "car1.jpg", "car2.jpg" and so on...
similarly if the user clicked on "lorry pics", the same loading buttons 1 to 5 would load "lorry1.jpg" and "lorry2.jpg"
View 1 Replies
Jun 25, 2004
my program is i can choose several movie to load and the movies are save in an array... For example: i choose movie 1 , 2 and 3. Movie 1 was loaded. After i lick 'next 'button, movie 2 will be show .Beside that,if i click 'previous' button, movie 1 will be show. i facing a problem that my previous button is not back to my previous loaded movie but is trace my choices in arrays backward. The next problem is, my first movie load to the second movie load will be a bit lagging. but the rest 1 is ok.
View 14 Replies
Jul 5, 2009
What code would I use to make a button, that when you click, it returns you to frame one. Gotoandstop doesn't work.
View 1 Replies
Mar 21, 2005
does anyone know the tutorial that when you click on a button it scrolls over eitehr left or right to a new content kind of like this [URL]
View 4 Replies
Mar 2, 2006
I have various movies clip within a movie and my back (mc = arr2_mc) and next (mc = arr1_mc) buttons are on the main scene.This is on my main scene on a first frame
ActionScript Code:
movieclip.prototype.playBackwards = function(arg){
if(arguments.length>0) {[code]....
when it goes back, it goes back frame by frame without stopping but I want it to go only to previous Scene. instead of going to previous frame.Do i have to create a unique button? which i did but i didn't work?
View 2 Replies
Jul 31, 2009
When the page loads, the first menu button (PORTFOLIO) is automatically OnClick. I want the user to be able to rollover it and click it when the page loads. I attached my file.
View 0 Replies
May 26, 2005
I'm trying to create a set of 4 vertically arranged buttons that 'split' apart when those buttons are pressed. For example, if you click the topmost (1st) button, the bottom three buttons will drop down so submenus (for the 1st button) can now be revealed beneath. Again, when you click the 2nd button from the top, the bottom two buttons drop down, revealing submenus, and so on.
Now, is there a way that I can use actionscripting to tween the buttons to not only motion tween a drop down when a button is first pressed, but also to motion tween the button to return up to its original spot when another button is then pressed? Right now, I have two keyframes, side-by-side which each containing a different y-scale value for an object. Can I do some actionscripting to get the object to motion tween upward to its original spot instead of "clicking," or snapping back to is original spot when another button is pressed?
View 1 Replies