ActionScript 2.0 :: Getting An Active/viewed Button Script To Work?
Apr 10, 2010
Having spent ages finally getting an active/viewed button script to work, I thought all I had to do to complete things was add the button actions (I want each button to load an external swf). For some reason, this is then preventing the above working as it should. I suspect it's obvious to someone who understands this stuff, but I've got things working so far through a mixture of copy/paste and trial&error, and I've got completely stuck at this last hurdle.
[Code]...
I think this may have something to do with the order it's all in, and I suspect having most of the above commands in a for / if loop might not support me adding additional actions afterwards which may overrule the other ones.without anyone else wasting too much time, if anyone can see the (presumably obvious to some people) mistake I'm making in the above, please let me know!
View 2 Replies
Similar Posts:
Jun 23, 2009
My SWF contains a combobox that functions as expected when it is viewed alone. But when this same SWF is loaded into a 'container' SWF the combobox no longer works.
The container SWF uses AS3, and the SWF that is being loaded into it uses AS2. Could this be the problem?
View 1 Replies
Sep 22, 2010
I am currently building an assessment in flash using AS3. I want to have all navigation buttons visible on the main screen, including the "assessment" button where users will go to sit an assessment based on the content they just viewed.
how can I lock the assessment button until all the other pages containing the content has been viewed? A bonus would be a pop saying something like "Please view content first" appearing when they try to click it.
View 4 Replies
Oct 14, 2010
But on this occasion I have created an assessment in AS2 and I want my "Take Assessment" Btn disabled until the rest of the content has been viewed. If someone clicked on the Assessment button before it is viewed it would be good to have a message pop up saying "content must be viewed first" or something like that. How do I do this?I have the content set up in scenes.
View 1 Replies
Dec 17, 2004
I have a menu with five nav buttons (atcually MovieClips). Each has three frame labels: "on", "stay", and "off". The rollover and rollout animations play flawlessly, but I'm at a loss as to how to give each button a sticky "active" state. I'd like the button to stay in it's active state until another button is clicked, then I would like it to play it's "off" animation. Each MC has this code:
[Code]...
View 2 Replies
Mar 21, 2010
My first time making anything in flash, so go easy on me. I made a set of navigation buttons for a website I'm building for a friend of mine.
When I make it in Flash, everything looks perfect. When I save it as a movie and run on my computer (in Flash Player 6), it still looks perfect. But when I put it on my website, the "M" in "HOME" gets distorted (on all browsers). See here: [URL]
Using Flash MX, can't afford the upgrade to CS right now!
View 1 Replies
Feb 16, 2003
The code that u have recommended is not working properly... What i meant is that the function of the back button is to navigate where the users has last viewed the webpages..
View 1 Replies
Dec 13, 2010
I want to make a button (or graphic) active and visible if another button is clicked. But it must be invisible and unclickable before the other button is clicked. (this is a "find the differences between the 2 pictures game" and I want circles to appear over the differences that the user finds but only after he clicks it)
The button (or graphic) I want to become active has instance name of "sockcircle_btn" The button you click to make it appear is called "sock_btn"
In the first frame of the sockcircle_btn layer, this is my code
sockcircle_btn.addEventListener(MouseEvent.CLICK,sockcircledisable);
function sockcircledisable(evt:MouseEvent):void{
sockcircle_btn.mouseEnabled = false;
}
In the sock_btn frame (frame 3) this is my code
sock_btn.addEventListener(MouseEvent.CLICK,sockcircleenable);
function sockcircleenable(evt:MouseEvent):void{
sockcircle_btn.mouseEnabled = true;
}
The file is setup to loop between frames 2-3. But the sockcircle_btn never enables even when sock_btn is 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
Feb 26, 2011
I have an interactive story divided into scenes. At the end of each scene a button appears. This occurs on a frame on the timeline.
There are two different buttons that might appear based on whether a prior scene has been viewed or not.
For example, there are Scene_1 and Scene_2. At the end of Scene_2 one of two buttons will appear. The buttons will be either "Go see Scene_1" or "Return to Main Menu".
If the user has already seen Scene_1, Flash will know that and automatically go to the frame in Scene_2 that contains the button "Return to Main Menu".
Conversely, if the user has not seen Scene_1, Flash will know and automatically go to the frame in Scene_2 that contains the button "Go see Scene_1".
I imagine there would be an action frame at the end of Scene_2 that will contain the as2 code to enable this action.
Perhaps something like, but probably not at all like the following:
if ("Scene_1", last frame == true){gotoAndPlay("frame#");}else{gotoAndPlay("frame#");}
View 1 Replies
Aug 1, 2005
Buttons allow 'Up' , 'Over', 'Down' and 'Hit area' , but how do you show an 'ON' status or 'ACTIVE'. Say the user has pressed the button and you want to show that it it active after the user has released and moved the mouse off the button?
View 2 Replies
Nov 15, 2010
I'm trying to get some buttons to work that I have in a timeline. These buttons are on top of each other and are called to be visible only when a certain image comes up.my problem is the the topmost button is the only one active, because all the buttons are "on" even though you can't see them.currently buttons are set to alpha.0 at the beginning. I know there's a way for them to only be active when they are visible, but I can't find the documentation.I have my code started as such:
import flash.events.MouseEvent;
import flash.ui.Mouse;[code]..........
then as the buttons come up I bring alpha to 1 over a period of time, but there's some trick to the visibility
View 5 Replies
Jan 26, 2009
I have a movieclip that reacts to the cursor postion, but when the movie is embed into a browser such as firefox, i dont want the button to be active until the cursor has actully rolled over the flash movie as it seems to be active before the cursor has hit the actual flash object?
View 3 Replies
Oct 9, 2009
I like to know how to pursue this effect to have the active button highlighted. So visitors know which page are they on. Second part is how to have the fade out effect on the rest while have mouse over on certain text
View 9 Replies
Apr 6, 2010
I have a movieclip that I'm using as a button- the rollover state is on frame two, the up state is on frame one and I used actionscript to apply the different actions. All of the actions work fine normally, but about 25% of the time only part of the button is active. The mouse doesn't change to the hand symbol and the rollover/release effects don't work on most of the button, just on a small band around the perimeter of the button. Its not like it happens every time and there doesn't seem to be any consistency in what causes it.
View 1 Replies
Jun 3, 2010
On this fla file I am having troubles creating an active state for the bikes.I have this great scrolling affect in place which is working pefectly, however now I want each bike to have an affect when you click on it?
View 9 Replies
Aug 5, 2011
I have a script from a template I purchased that I need to edit.I have buttons that I want to stay active (ie, they still link back to the same page) once it's selected.Right now, when that button is the main button, it has no link attached to it.The portion of the script that I'm referring to is
onClipEvent (load) {
num = 2;
}[code]..............
View 3 Replies
Oct 4, 2010
I have this script for a circular menu (based from the menu by: Justin Windle - Soulwire July 2007 [url]...) that rotates with the active link rotating to the center. I need for the active link to change color so that it is easier to tell which page is active.[code]...
View 3 Replies
Apr 22, 2010
I want to have an object move towards the active button on a navigation. So if I click on a button, the object moves towards that button and stop there. Then if I click on another, it move towards it and stop.I looked online but I have a hard time finding the right words to find what I need..
View 3 Replies
Nov 20, 2010
I'm trying to make an online advent calendar, and I want to know whether it is possible to add an actionscript code to a button in flash, so that it wont be visible or active until a certain date?
View 17 Replies
Nov 4, 2009
I have a series of 7 buttons that use the following actionscript that gives each one an Active state and deactivates the active button when another one is pressed[code]...
View 3 Replies
Jun 12, 2010
how to associates the active button with current slideshow. See the link below from Apple. So, people know which button is active.[URL]
View 9 Replies
Oct 8, 2010
Currently, I'm developing a drag 'n' drop 'snap' game in flash. The meaning of this game is to drag ''crates'' from a boat and load the crates into a train.
What I got working in AS2:
- The crane arm follows the mouse cursor.
- It can drag and snap objects(crates)
But what still need to works is:
- When mouse button on object is released, the object (crate) is still floating in the air. When released mouse button, the object must fall down. (gravity)
View 9 Replies
Feb 9, 2009
I've been attaining help with buttons and movieclips here, and I got awesome code from cbeech.The buttons code I'm trying to write will keep a button in the active state when pressed, and if any other buttons are in the active state, they will close up...Im posting alink to a flash file of the effect i want in actionscript 2.0 . However, I need the effect/code in actionscript 3.0. and I need it to be modular where I can easily add or remove buttons to my heart is content.
Put more clearly, when a user rolls over a button, I want the button to play the "open" frame in the button/movieclip. When the users rolls off the button, the button/movieclip goes the "close" frame in that button/movieclip. If the user presses the button, the button/movieclip plays the "open" frame and will stop at the stop (action) to stay in the active state, and if there are any other buttons open, they should go their respective "close" frame and play from there. Here's my starting code. please bear with me; Im just migrating from 2.0:
[Code]...
View 1 Replies
May 10, 2009
I have a flash header at the top of an HTML page. Inside the flash header resides the navigation with mouse over buttons. Home | Services | FAQ | Contact Us When a person is on the Home page, I wish for that button to be in the mouse over state, which is 'active' state. The user then goes to the Services page, and there too, when the user gets to this html page I wish for this to go active. And so on and so on. How do I do this without making 4 different flash files? Isn't there a way I can control the movie clip's or button's states from the html page?? I believe I've seen this before but cannot for the life of me find a tutorial.
View 2 Replies
Nov 11, 2010
how to do that when you run the swf the Play button on the shortcut menu was always active
View 1 Replies
Jan 14, 2011
I am new to actionscript 3. I have created buttons with up/over/down states. The button changes colour during the over/down frames.How do I keep the over or down state active until the user clicks another button?
Right now when the user puts the mouse over the buttons, they change colour, but it goes back to the original colour once they click off. I would like it to remain on the changed colour so that the user remembers which button s/he's pressed until the another one is clicked.I came up with the following code in actionscript 3 and got it to partially work:
ActionScript Code:
btn1.addEventListener(MouseEvent.MOUSE_UP, startTransparent)
function startTransparent (e:MouseEvent):void{
btn1.alpha = .6;
}
So when it's in the down state, I get the transparent state and stays there. But how do I get it back to normal when the user clicks on another button?
View 7 Replies
Jul 18, 2009
My question is, Is there a way to highlight and active button when i navigate to different page on my site?Home - highlighted when on the homepage
View 1 Replies
Aug 5, 2011
I have a slideshow where you can click a button and it will bring you to a specific frame with an image on it. How can I code it so that the clicked button that represents the 'current' slide changes color until another button is clicked? When the other button is clicked, it will take on the 'current' color I bet this has been asked before, but I've only found responses for AS2.
View 3 Replies
Feb 23, 2012
I'm working on a slideshow presentation which cycles through ten slides. It also has ten buttons so that you can go between the slides.My problem is that I want the button to stay hovering while it's on it's specific slide.Right now when you hover over a button it will "rise" and when you mouse off it "lowers" I need the button to stay in the risen position while it's on it's specific slide, then lower when it transitions out and then the next button will rise in it's specific slide.
View 7 Replies