Hiding the "Next" Button AS3

Hi Apologies if this has been discussed before.
I have a small microsite built using Flash 4. It contains 5 'pages' assigned to individual keyframes, each keyframe separated by 5 frames (F5s). Each Keyframe is labelled 'page1' through to 'page5'. I have a navigation bar for the entire site which includes NEXT and PREVIOUS buttons. When the user reaches the LAST PAGE/KEYFRAME I do not want the NEXT BUTTON to show. I suspect it is something simple like nextbutton.visible = true - but I've spent a day trying to work out how to do this but without success.
I am using AS3 and the existing coding is shown below. Any help much much appreciated.
Thanks George
nextbutton.addEventListener(MouseEvent.CLICK, nextPage);
previousbutton.addEventListener(MouseEvent.CLICK, prevPage);
function nextPage(event:MouseEvent):void {
    var thisLabel:String = MovieClip(root).currentLabel;
    var thisLabelNum:String = thisLabel.replace("page", "");
    var curNumber:Number = Number(thisLabelNum);
    if (curNumber < 5) {
        var nextNum:Number = curNumber + 1;
        MovieClip(root).gotoAndStop("page" + nextNum);
function prevPage(event:MouseEvent):void {
    var thisLabel:String = MovieClip(root).currentLabel;
    var thisLabelNum:String = thisLabel.replace("page", "");
    var curNumber:Number = Number(thisLabelNum);
    var prevNum:Number = curNumber - 1;
    MovieClip(root).gotoAndStop("page" + prevNum);

Hi Ned
I re-read your suggestion AFTER I had posted my reply and I'm delighted to say it now works.
Unfortunately, I have another related problem that you may be able to help with.
On the Home Page (i.e. KEYFRAME 1) there are a series of button links that take me to the other keyframe/pages. I also need the NEXT BUTTON icon to hide when that keyframe is accessed from KEYFRAME 1 - here is the code:
stop();
leftbutton1.addEventListener(MouseEvent.MOUSE_DOWN, leftbutton1pressed);
function leftbutton1pressed(event:MouseEvent){
    gotoAndStop("page2");
leftbutton2.addEventListener(MouseEvent.MOUSE_DOWN, leftbutton2pressed);
function leftbutton2pressed(event:MouseEvent){
    gotoAndStop("page3");
leftbutton3.addEventListener(MouseEvent.MOUSE_DOWN, leftbutton3pressed);
function leftbutton3pressed(event:MouseEvent){
    gotoAndStop("page4");
leftbutton4.addEventListener(MouseEvent.MOUSE_DOWN, leftbutton4pressed);
function leftbutton4pressed(event:MouseEvent){
    gotoAndStop("page5");
So if I use the NEXT/PREVIOUS BUTTON from any other page it works perfectly but not if I click the button on KEYFRAME 1. If I add nextbutton.visible = false;  at the end of the above code I get Error 1120: Access of undefined property next button.
Any help gladly recieved.
Thanks
George

Similar Messages

  • Making the "next" button inactive until video ends

    I am new to Captive and have downloaded the trial version to test out to set up an e-learning module.  I have managed to create my first quiz and was able to get it to work fine.  I used one of the pre made templates and I inserted a flv video.  The user needs to watch the video prior to taking an exam, but the way it is set up the next button is visable and active the entire time of the video.  I discovered where you could modify the time before a button appears, but the user can get around that by hitting the pause button and waiting for the elapsed time to expire.
         How do I set up the program so that the user has to watch the video in its entirety and only after the video is complete, they can proceed with the quiz.  Thanks.

    OK, after searching and googling, I think I may have found the answer.  I found a hiding and showing action function, I  will see if I can hide the next button until the video ends, at which point it will appear.  I'll give it a shot and see if it works.

  • How do I get the Next Button to appear on a form?

    I have a form built off of a view. I pass a parameter from a report through a link to launch the form with the appropriate values. I would like user to then be able to navigate to the next set of information from the report without having to navigate all the way back to the report. I tried to activate the Next button with the onClick event and doNext function but the button never appears to the user. Thank you for any assistance!

    Samuel,
    The reason that you don't get the "Next" button is that the query that the form is running on returns only one row. Take a look at EXAMPLE_APP.EXAMPLE_SQL_REPORT and EXAMPLE_APP.EXAMPLE_FORM. You'll find that this form also does not show the "NEXT" button when called from the report. However if you edit the report and change the link parameter from empno to deptno, you'll find that the button comes up in the form.
    I guess the best option you have is to create a custom button that simulates the functionality of the NEXT button i.e. have some logic to find out which empno must be the next one and then call the form like this :
    l_empno := <whatever logic you have come up with>
    l_url:=<portal_schema>.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=<module_id of the form>&p_arg_names=empno&p_arg_values='||l_empno||'&p_arg_names=_empno_cond&p_arg_values='||<portal_schema>wwv_standard_util.url_encode('=');
    <portal_schema>.wwa_app_module.set_target(l_url, 'CALL');
    Hope that helps,
    Hsiu

  • How can I grey out the 'Next' button until a user clicks 'Submit'?

    Hi guys,
    despite how I say it or display it in slides, users don't read the instructions before the quiz. This results in them doing the quiz and then asking me why they scored zero when they answered all the questions. So my question is, how can I disable/deactivate/grey-out the Next button until a user clicks Submit after answering the question?
    I've got Captivate 6.1 on a Windows platform.
    Advice appreciated.
    Carl

    Hello Rod,
    thanks for your answer - I should think more laterally in future.
    In my testing, another question has arisen - how do I get the Next button behind the Clear button? It sounds stupid but I can't get the Next button behind the Clear. I go in to the Master Slide, click on Next to highlight it, and then move it either by the mouse or with the arrow button so that it sits under the Clear button. While Next is still highlighted I click on the button in the toolbar 'Send selected objects backward' to be sure, so that I see 'Clear'. When I go back to the Filmstrip, all I see is 'Next' and when I preview the slides all I see is 'Next' - what am I missing here? What have I failed to do? What am I not understanding?
    Advice appreciated.
    Thanks

  • How do I make this code generate a new pro when the "NEXT" button is pushed

    How do I make this code generate a new set of problem when the "NEXT" Button is pushed
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    /* Figure out how to create a new set of problms
    * Type a list of specifications, include a list of test cases
    * DONE :]
    package javaapplication1;
    import java.awt.GridLayout;
    import java.awt.Window;
    import javax.swing.*;
    import java.awt.event.*;
    * @author Baba Akinlolu -
    class Grid extends JFrame{
        int done = 0;
        final int score = 0;
        final int total = 0;           
            //Create Panels
            JPanel p2 = new JPanel();
            JPanel p3 = new JPanel();
            final JPanel p1 = new JPanel();
            //Create Radio buttons & group them
            ButtonGroup group = new ButtonGroup();
            final JRadioButton ADD = new JRadioButton("Addition");
            final JRadioButton SUB = new JRadioButton("Subtraction");
            final JRadioButton MUL = new JRadioButton("Multiplication");
            final JRadioButton DIV = new JRadioButton("Division");
            //Create buttons
            JButton NEXT = new JButton("NEXT");
            JButton END = new JButton("End");
            //Create Labels
            JLabel l1 = new JLabel("First num");
            JLabel l2 = new JLabel("Second num");
            JLabel l3 = new JLabel("Answer:");
            JLabel l4 = new JLabel("Score:");
            final JLabel l5 = new JLabel("");
            JLabel l6 = new JLabel("/");
            final JLabel l7 = new JLabel("");
            //Create Textfields
            final JTextField number = new JTextField(Generator1());
            final JTextField number2 = new JTextField(Generator1());
            final JTextField answer = new JTextField(5);
        Grid(){
            setLayout(new GridLayout(4, 4, 2 , 2));
            p2.add(ADD);
            p2.add(SUB);
            group.add(ADD);
            group.add(SUB);
            group.add(MUL);
            group.add(DIV);
            p2.add(ADD);
            p2.add(SUB);
            p2.add(DIV);
            p2.add(MUL);
            //Add to panels
            p1.add(l1);
            p1.add(number);
            p1.add(l2);
            p1.add(number2);
            p1.add(l3);
            p1.add(answer);
            p1.add(l4);
            p1.add(l5);
            p1.add(l6);
            p1.add(l7);
            p3.add(NEXT);
            p3.add(END);
            //Add panels
            add(p2);
            add(p1);
            add(p3);
            //Create Listners
            Listeners();
    void Listeners(){
          NEXT.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
             int answer1 = 0;
             //Grab the numbers entered
             int numm1 = Integer.parseInt(number.getText());
             int numm2 = Integer.parseInt(number2.getText());
             int nummsanswer = Integer.parseInt(answer.getText());
             //Set the score and total into new variabls
             int nummscore = score;
             int nummtotal = total;
             //Check if the add radio button is selected if so add
             if (ADD.isSelected() == true){
                 answer1 = numm1 + numm2;
             //otherwise check if the subtract button is selected if so subtract
             else if (SUB.isSelected() == true){
                 answer1 = numm1 - numm2;
             //check if the multiplication button is selected if so multiply
             else if (MUL.isSelected() == true){
                 answer1 = numm1 * numm2;
             //check if the division button is selected if so divide
             else if (DIV.isSelected() == true){
                 answer1 = numm1 / numm2;
             //If the answer user entered is the same with th true answer
             if (nummsanswer == answer1){
                 //add to the total and score
                 nummtotal += 1;
                 nummscore += 1;
                 //Convert the input back to String
                 String newscore = String.valueOf(nummscore);
                 String newtotal = String.valueOf(nummtotal);
                 //Set the text
                 l5.setText(newscore);
                 l7.setText(newtotal);
             //Otherwise just increase the total counter
             else {
                 nummtotal += 1;
                 String newtotal = String.valueOf(nummtotal);
                 l7.setText(newtotal);
      //Create End listener
    END.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            // get the root window and call dispose on it
            Window win = SwingUtilities.getWindowAncestor(p1);
            win.dispose();
    //new Grid();
    String Generator1(){
         int randomnum;
         randomnum = (1 + (int)(Math.random() * 100));
         String randomnumm = String.valueOf(randomnum);
         return randomnumm;
    public class Main {
         * @param args the command line arguments
        public static void main(String[] args) {
            // TODO code application logic here
            JFrame frame = new Grid();
            frame.setTitle("Flashcard Testing");
            frame.setSize(500, 200);
            frame.setLocationRelativeTo(null);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);
    }Edited by: SirSaula on Dec 7, 2009 10:17 AM

    Not only are you continuing to post in the wrong forum but now you are multiposting: [http://forums.sun.com/thread.jspa?threadID=5418935]
    If people haven't answered you other posting its probably because we don't understand the question. Quit cluttering the forum by asking the same question over and over and then next time you have a new question post it in the proper forum. Your first posting was moved becuase you didn't post it properly.

  • TS1367 Hi, I am trying to install 'Playonmac' so I can install Meta Trader 4 - however, each time I reach the next button in order to install XQuartz it hits a deadend there - the 'Installing Quartz' window is saying installing Quartz,but thats as far as

    Hi,
    I am trying to install 'Playonmac' so I can install Meta Trader 4 - however each time I reach the next button in order to install XQuartz it hits a dead end
    - the 'Installing Quartz' window is saying installing Quartz, but all it does from there is the clock the spins around, just keeps spinning and nothing happens - I have waited and waited for it, but it just kind of freezes there.  I have reloaded the software over and over, and even switched off the firewall in case it was blocking Playonmac.  It is really important I load Meta Trader 4 on my Mac.
    Help will be much appreciated - Has anyone had this sort of problem?  Does anyone know how to resolve it? 
    Regards
    Joe

    According to wiki "the documentation from Apple states that Windows XP Service Pack 2 or Windows Vista is requisite for a Boot Camp installation, and it also mentions that trying to install an unsupported operating system could prevent the computer from booting even into Mac OS X". Sure that was from wiki, but it does seem to support and somewhat validate the problem I had with installing an earlier edition of XP.
    http://en.wikipedia.org/wiki/BootCamp_%28software%29#Other_operatingsystems
    Thanks for the info on the Filesystem info. My problem is that installing OS X on a mac is just a little bit more technical than installing Windows on a PC as there are a few more things to consider. Plus I'm not familiar with any of the utility programs as well. It's a **** miracle I managed to somehow create a volume to install OS X on when I thought I was erasing the partition I created for WinXP.
    But I'm still not sure about the missing 40GB from my 500GB HDD. Upon coming to the desktop straight after OS X was fully re-installed I noticed that the HDD only had 460GB and that 440GB of it available space. So the full installation of OS X was 20GB, but where has the other 40GB gone? I swear I saw that I had much more available space on my harddrive (BEFORE I tried to partition my HDD under Boot Camp Assistant and stuffing up the computer). Is the missing 40GB from the ORIGINAL FACTORY INSTALL of OS X INCLUDING all my iTunes music and other files I uploaded to the computer earlier? It would make sense but there's no way, as far as I know, of checking this. Any ideas?
    Cheers.

  • The "next" button of crystal report viewer does not work

    hi
    I use crystal report viewer control to show my crystal report on my aspx page.
    like:
    <CR:CrystalReportViewer id="CRViewer" runat="server" HasRefreshButton="False" PrintMode="ActiveX" DisplayGroupTree="False"
    AutoDataBind="True"
    SeparatePages="TRUE"
    Height="520px"
    Width="900px">
    </CR:CrystalReportViewer>
    however when I try to navigate to next page by click "Next" arrow button on the crystal report viewer toolbar, it only can navigate to the page 2, whatever I click the "Next" button, it still stay on page 2,
    actually this report has 10 pages.
    On the other hand, if I input the page number, such as 5 on the "goto" textbox, it will jump to page 5 correctly.
    Could you give me any good advices to solve this problem?
    Thanks.

    There are a few threads discussing the issue in this forum. See if these provide some guidance:
    "Next Page" wont go beyond page 2 in Html Viewer (Crystal.NET for VS 2008)
    Re: Crystal Reports .NET Visual Studio 2005
    Problem in CrystalReportViewer
    Ludek

  • Why is the 'Next' button in 508 Screen Reader mode not working for RichTree

    Hi ADF Experts,
    My JDeveloper version is 11.1.1.8. The 'Next' button in 508 Screen Reader mode for tables works fine.
    However, it does not work for trees, I can see only the first 23 or so items.
    Any ideas?
    What am I missing here?
    Regards,
    -ab

    There is no official JDeveloper version is 11.1.1.8.0!
    If you use an internal build ou should post to an internal forum.
    If you use an official version please tell us which on.
    Timo

  • In Question slide, When I enable the next button, the button look faded off in HTML 5 output.

    Hi,
    I am enabling the next button in Captivate 7 quiz slide. I am using these slides as CYUs. When I publish the slides, the web version looks fine, but the HTML 5 output shows the next button with faded look. I tried creating a new quiz slide from a separate file and inserting here. still the same issue is cropping. Please help in resolving this issue.
    Given the image for reference.

    Thank you Rod.... I changed the option to "Required - User must take the quiz to continue." Now the next is working .
    Thank you for pointing the right direction. But one quick question.. will the above setting affect my assessment? I have set the pass percentage to 100%...
    My next question - I have a open course menu (TOC). If the learner clicks the Knowledge check page, the knowledge check page is visible, but if you click any other page from knowledge check, it is not going...... by default, it takes to the next page. From that page, you can click any other page... IS this also related to the above option .. pls let me know..

  • I have my username, password, and sync key but I cannot click the next button to complete the sync setup?! Neither the next button nor the cancel button press?!

    I try to setup my sync account with Ubuntu 13.10 and I am able to enter my user name and password and recovery key but the next button will not click and neither will the cancel button. Only the back button, sync options button, and the x at the top of the screen are functioning?

    Did you enable the Side Bar?
    Select "Show Side Bar" from the "View" menu of iTunes.

  • The "Next" button is grayed out on quiz slides when running in HTML 5 Chrome browser and iPad

    Hi,
    Has anyone run into this problem for Captivate 8? The "Next" button is grayed out on quiz slides when running in HTML 5 Chrome browser and iPad. The Next button shows in IE/Flash mode.
    Thanks in advance for providing your help!
    Zhuoran.

    Thank you Rod.... I changed the option to "Required - User must take the quiz to continue." Now the next is working .
    Thank you for pointing the right direction. But one quick question.. will the above setting affect my assessment? I have set the pass percentage to 100%...
    My next question - I have a open course menu (TOC). If the learner clicks the Knowledge check page, the knowledge check page is visible, but if you click any other page from knowledge check, it is not going...... by default, it takes to the next page. From that page, you can click any other page... IS this also related to the above option .. pls let me know..

  • Adding a functionality to the next button

    Hi,
    In SSHR pages, i need to add a message to display when a next button is pressed in a seeded page.
    But am unable to find the functionality in the CO's for the next button so that i can modify it.
    There are functionalities written for back, saveforlater but not for Next button.
    Can somebody explain me?
    Thnaks a lot

    When the user selects a value from the poplist and moves to thenext page that is pushed to the vo and will be retained when the user navigates back and the AM is retained in all these navigation.
    I donot understand what you are trying to achieve, the user is still in the same transaction and the value selected by him in one step of the transaction is going to be retained through out the transaction. Why do you want the value to be blank again when he uses the back navigation button.
    You can still achieve that by programmatically resetting the value in PR of the page, but I donot understand what you are trying to achieve by doing that.

  • Every version of Firefox i try to install fails when hitting the NEXT Button

    I have versions 20 - 23.0.1 of Firefox. I click on the installer, the files are extracted, but when i click on the next button to start the install every version fails.
    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: setup.exe_Firefox
    Application Version: 1.0.0.0
    Application Timestamp: 4bc06cda
    Fault Module Name: StackHash_af10
    Fault Module Version: 0.0.0.0
    Fault Module Timestamp: 00000000
    Exception Code: 00000000
    Exception Offset: 00000000
    OS Version: 6.1.7601.2.1.0.256.4
    Locale ID: 1033
    Additional Information 1: af10
    Additional Information 2: af10e1b7f52f433b5dfddc6fa75d9e78
    Additional Information 3: 3a32
    Additional Information 4: 3a32f4805dfc71fa9ecf9a3e11622dee

    This article suggests also scanning for malware when the "fault module" is a StackHash: http://infopurge.tumblr.com/post/10438725843/what-is-stackhash
    These three scanners are highly regarded (and free):
    * Malwarebytes Anti-malware : http://www.malwarebytes.org/products/malwarebytes_free
    * AdwCleaner : http://www.bleepingcomputer.com/download/adwcleaner/ ''(ignore banner ads for other products)''
    * SUPERAntiSpyware : http://www.superantispyware.com/

  • Ever since Firefox updated, I cannot view slideshows on websites. If I click the "Next" button to see the next slide in an article, nothing happens. Why is this? How can it be fixed? I've cleaered cache, done everything.

    When I try to view any article with a slideshow, the next button on the slideshow doesn't work. It doesn't matter which website, it doesn't happen in other browsers (ie Chrome), and it didn't happen prior to the recent Firefox update. I've cleared cache, checked all of the settings, and nothing's fixing this. How do I fix it?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Forced Navigation - Want the next button to display after user clicks on all buttons.

    Hi. I'm new to using Captivate to make a learning module. I'm stuck on this forced navigation issue. I created 8 click boxes that the users have to click on. I created 9 advanced actions. Each AA for the click boxes hides text boxes that don't pertain to it, shows a text box, plays audio, and assigns a number 1 to a variable I created. There are 8 variables. I then created an conditional AA that displays the next button once all 8 variables have the number 1 assigned to it.
    For some reason, the next button doesn't display even though I'm sure each variable has the number 1 assigned to it. Also, I want the entire audio to play for the click box before the person can click on the next click box. Right now, I can click on a click box and then another click box right afterwards and the audio stops and the next audio starts. Can you all please help?
    I am using Captivate 6.0.0.199.  My computer is running Windows 7.  I want the output to be SWF.  Thank you in advance for your help!

    First of all, install the patch, you are still on the unpatched version that had a lot of bugs. Almost one year ago a fix was released, your version should be 6.0.1.240. Use Help, Updates.
    The difficult part will be the audio, the other part should be very easy, have explained that a lot of times. You could disable all click boxes, but then you need a new event to trigger the 'enable' action. Is it that important? Are those users not wise enough to listen to the audio, or is that audio not interesting enough? Why not instruct them about listening?
    I suppose you use the Play Audio statement, and indeed, when you trigger another audio clip the previous one will be stopping. You could attach the audio to an 'invisible' object, and make that visible which will play the audio. But that will cause another issue if the user clicks too quickly on a second click box: both audio will play at the same time.
    Lilybiri

Maybe you are looking for

  • Windows Vista trouble finding airport base station

    I recently bought an AirPort Extreme 802.11n. It was easily able to connect it to my mac, but when I try to connect it to my Windows Vista desktop computer, the base station in the airport utility software cannot be found. It finds the internet from

  • Why is all of my music greyed out on my iPhone 4?

    I haven't been able to sync my iphone with my iTunes music for several months now, which is getting increasingly frustrating, and as the holiday season approaches, I really need something to tune out all the holiday music >:-|. To avoid all the obvio

  • BSOD when installing Windows 7 on MacBook Pro Retina

    I tried everything I could but I'm unable to install Windows 7 on my MBP Retina using Boot Camp because of recurring blue screens always happening at exactly the same time. After creating a new partition with Boot Camp and restarting to the point whe

  • Hidden Messages

    Hi, When I go on 'get info' and look at the 'account info' window, it says that I have 60 in drafts, 70 in sent and about 4600 in inbox. The thing is I don't have nearly as many emails as that! I have none in drafts and sent, and about 70 in my inbox

  • Fireworks CS4 compatible with Dreamweaver CS3

    Is there any issues with developing pop ups in Fireworks CS4 and importing into Dreamweaver CS3? Thanks