A single button, multiple functions

Hello.

I used the upload script to load an external swf into the current project. I added a button to unload the external when file you want and I was wondering if you might have multiple functions for this button, so that when you click on it to unload it works as a 'home' so button and takes the user to the main page?

AS3 btw.

Might want to mention that I am a bit new to as3 and flash from adobe and don't know if the way I used to load external swf file was the easiest. Looks like some have had some problems with this subject before me as well.

Any pointers in the right direction is appreciated. See you soon.

You can reduce the time button code to...

btnHeim.addEventListener (MouseEvent.CLICK, heimClick);

function heimClick(e:MouseEvent):void {}

Loader.Unload ();

gotoAndStop(1,"Mainpage");

}

As far as the error goes, go to your publication of Flash settings and select the option to enable debugging.  Then your error message should include the line number of the code that causes the problem.  It will appear just after where it say frame2.  So some line in frame 2 identified is where the problem exists.  As regards the 1009 error goes, there are a variety of reasons why it occurring..., but they all point to the same basic problem... any object the code speaks is not when the code runs...

This may mean that the object...

n ' is not in the display list

n ' is not have an instance name (or the name of the instance is misspelled)

n ' is not in the frame where this code tries to talk to her

-is animated in place, but is not assigned the name of the instances of each keyframe for her

-is one of the two or more consecutive keyframes of the same objects without a name assigned in the image previous (s).

Tags: Adobe Animate

Similar Questions

  • Read multiple audio files with a single button - Playlist

    Hello

    im working on an interactive project that require the playlist function,

    The idea is to have a single button on a page that will play all the audio files on the page in the order they

    as you play a complete album in itunes or other players, when the first ending song the following begin to play and so on.

    Any ideas?

    Thank you

    Guy

    (1) put all the audio files in the Indesign document.

    (2) create a button,

    3) go to the Control Panel button and add multiple actions for 'Her', and for what actions define the audio file name

    Now go to the Panel of Timing and to organize the sequence of the audio file to read, just as the Panel layer, (drag / drop)

    Check the output.

  • Addition of two functions in a single button (gotoAndStop, sound judgment)


    Hi all! First of all, I would like to say that I am a beginner total with respect to as3. Okay, let's look at my problem... I have 2 scenes (first of all is a main menu with the button New Game; second scene is the intro for the game). I'm having difficulties to do two functions within a single button. Why do I need that? The first function is to go to the next scene (in my case, IntroScene). Second is to disable the sounds, so I can not hear them in the next scene.

    Here is the code:

    var bobobg:bobomusic;
    var sndChannel:SoundChannel;

    bobobg = new bobomusic;
    sndChannel = bobobg.play ();

    MAIN - NEW GAME MENU BUTTONS
    newgame_btn.addEventListener (MouseEvent.CLICK, buttonClick3);
    newgame_btn.addEventListener (MouseEvent.CLICK, buttonClick4);
    function buttonClick3(event:MouseEvent):void {}
    gotoAndPlay (1, "IntroScene");
    }
    function buttonClick4(event:MouseEvent):void {}
    bobobg. Stop();
    }


    Error message: "TypeError: Error #1006: stop is not a function."
    to MainMenu_fla::MainTimeline/buttonClick4().

    I would appreciate if someone could help me with this. Thank you!

    Ok.  Just do this:

    var bobobg:bobobgmusic = new bobobgmusic();
    var sndChannel:SoundChannel = new SoundChannel();

    sndChannel = bobobg.play ();

    MAIN - NEW GAME MENU BUTTONS
    newgame_btn.addEventListener (MouseEvent.CLICK, buttonClick3);

    function buttonClick3(event:MouseEvent):void
    {
    gotoAndPlay (1, "IntroScene");
    sndChannel.stop ();
    }

  • Switch between two intelligent forms with a single button?

    Hello!  I work at 8 Captivate and try to use a single button to switch between two smartshapes.  I can't for the life of me figure out how to do it.  I know its possible to make it 'show' and 'hide', but is it possible to simply create a user click on a button and whenever we click on it, it comes and goes between two different smartshapes?

    Im trying to show the user the functionality on a piece of equipment when they press a button.  When they push the button, it comes and goes between two different read out on the screen.

    Thanks in advance!

    Have you looked at the blog post that I posted a link: I offer 4 scenarios.

    It can also easily be done, if you have a separate (shape) button to switch between two different objects:

    1. Create a user with a default value of 0 v_visib variable
    2. Create two objects and one of them is visible, the other invisible output ("eye" in the Properties Panel icon); I've tagged the ShapeOne and ShapeTwo, where ShapeOne is visible at the beginning
    3. Create this advanced conditional action (you can also turn it into a shared action):

    IF v_visib equals 0
    Hide ShapeOne
    See the ShapeTwo
    Toggle v_visib
    ON THE OTHER

    Hide ShapeTwo

    See the ShapeOne

    Toggle v_visib

    4 assign this action to the success of the button event

  • can perform us two actions with a single button in two clicks, one after the other?

    Mr President.

    can perform us two actions with a single button in two clicks, one after the other?

    I want that when I click on the button Add once it add data to the database and when I click again on this button it clears the form data to the empty fields.

    Concerning

    Tanvir

    In the code, it should be easy.

    The following code adds that a button called butman with text 'ADD '.
    It then registers a listener that will be called if the user clicks the button.

    This listener then calls the runAddData method if you clicked butman while it contained the text of "ADD" and it calls the runClearData method otherwise.
    That's why he will swap the functionality of the button between ADD and CLEAR on each click.

    final Button butman = new Button("ADD");
    butman.setOnAction(new EventHandler() {
              @Override
              public void handle(ActionEvent t) {
                        if (butman.getText().equals("ADD")) {
                                  butman.setText("CLEAR");
                                  runAddData();
                        } else {
                                  butman.setText("ADD");
                                  runClearData();
                        } // END IF-THEN
              }});
    

    I hope that's what you wanted.

    Further reflection.
    You might want to run the ADD and CLEAR methods in their own son so that it can run in the background without slowing down your user interface.

    I also reuse rather a single button for several features instead of to apply with hundreds of nodes used only rarely with masses of code to show and hide as needed.

  • Two actions with a single button Oracle adf

    Hello
    Dear all,
    I want two action with a single button. Before posting, I studied this thread, but it seems that it cannot solve my problem two actions with a single button?
    It's my button and its action http://4.bp.blogspot.com/-tpP5wIW8JLI/T66zhLZgG0I/AAAAAAAAAPY/F1A-Ka8KGPY/s1600/req1.JPG
    getReqID button is actually a call to a procedure that returns a value to his class of action. The cb1_action function is...
    public String cb1_action() {}
    BindingContainer links = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("getReqID");
    Object result = operationBinding.execute ();
    int id = Integer.parseInt (result.toString ());
    System.out.println ("result =" + id);
    If (! operationBinding.getErrors () .isEmpty ()) {}
    Returns a null value.
    }
    Returns a null value.
    }
    It works very well. Don't know I want to, click this button, it also opens a page of .jsff. but I'm unable to open this page.
    Help, please
    Thank you
    Muhammad Nasir

    The first image you provided shows a small 'Attention' sign on the "request for quote-global-TF" which, I guess, gives you the sentence.
    This warning tells you that there is a problem with the task flow that you imported from the pot. Move the mouse over the warning sign a see what message you get from the frame on the error. If you don't get one, in 'source' view and look for red or orange squares in the gutter of the right hand. Scroll to the position of the red square and move the mouse over the underlined part red or orange of the code.

    Timo

  • How to use a single button to drive another click of the button

    I am trying to find a way to fix a bug in my application.  The simple solution would be to have a single button that animates a mouse on another button click event whenever the PlayBar in my application reaches the end of the screen and go back to its origin.

    How could do?  I made a lot of progress since my last post a question in the forum of the ActionScript 3, which was last night.

    Thanks in advance,

    Markerline

    So just run the function one of the buttons would otherwise be run when you click on it, then just call this function when you need to.  If you set the event to the function null argument, you can call it without havoing of clicking on anything...

    function whateverBtnClicked(evt:MouseEvent=null):void {}

    etc...

    }

    So if you need perform this function without clicking the button you can just use...

    whateverBtnClicked();

  • Failed to create a single button on form

    Hi all
    I created a form in this form, I used the data block.
    in this data block, I chose option multiple records.
    It shows several text fields, its ok
    But when I'm putting the button on the layout editor there are several buttons that I select multiple option
    How can I set single button on this form?

    Create a new Datablock (which will be a ctrl blk - using version of the option of a new datablock manually) and move the button to the new block.

  • How to move or get rid of the green button in the upper left screen McAfee. Cause 1/2 inch of screen to be tied to a single button.

    Green button McAfee lie 1/2 line display available for a single button. A way to move or delete this button?

    This has happened

    Each time Firefox opened

    == Installation

    What extensions do you have? Check by going to tools | Add - ons | Control Panel extensions

    Uninstall the Extensions:

    Extensions:

    1. in the menu bar, select Tools

    2 modules

    3. Select the extension you want to uninstall.

    4. click on Uninstall . Once again when you are prompted

    You need to restart Firefox

    It may also be listed in the Panel. Add or remove programs

  • How would I go on a labview VI generation that has multiple functions of the device?

    Hi, I'm building a Labview Vi that needs to have multiple functions of the device. I need to have options of the Panel before which will show you the camera live stream without saving changes, on which option will show the live camera and record an image and an option which shows the live camera and records several frames. I know there are VI in IMAQ that capture, blink of an eye, and so on, but combining them is harder than I thought. Someone has any advice on this for me? I use a PXI - 1409, in case you were curious.


  • Multitask single-button

    Hi guys, I'm Kinni. I am correctly with my mission and I fight with my Labview project. Can I ask for help from you guys?
    The question is, I do a single button to perform different tasks. Simply put, the button must execute the task as below:
    One click = LED 1 = T LED 2 = F LED 3 = F

    Click new = 1 LED = F 2 3 = LED LED T = F

    Click new = 1 = F 2 3 = F = T LED LED LED

    Click new = 1 LED = LED 2 = 3 LED F = F T

    and so on...

    Also, this will get done.

  • Can we apply a createInsert single button for the two master form, details of Table?

    Mr President.

    Can we apply a createInsert single button for the two master form, details of Table?

    I want to just click a button and fields are available in form-Master and details-table.

    As below

    vfdt.png

    Concerning

    Mr President.

    My worm jdev is 12 c

    And I can do your job for you.

    His code

    For any organization that wants to do this job

     public void createVoucherAndVDetailsRow(){
                VoucherViewImpl voucherVO=this.getVoucherView1();
                VoucherViewRowImpl row=(VoucherViewRowImpl)voucherVO.createRow();
                voucherVO.insertRow(row);
                RowIterator iterator= row.getVoucherdetView();
                String voucherNumber=row.getVoucherId();
                NameValuePairs nvps=new NameValuePairs();
                nvps.setAttribute("VoucherId", voucherNumber);
                VoucherdetViewRowImpl voucherdetRow=(VoucherdetViewRowImpl)iterator.createAndInitRow(nvps);
                iterator.insertRow(voucherdetRow);
                }
    

    Concerning

  • A single button for more than one task?

    I have search the forum but vacuum came on it.  So, if it has been discussed, I apologize in advance!

    I have a form with auto numbering as a way to keep track of individual requests.  My shape is on a network drive.  I would add a single button that does the following: SAVE the file of the application number/PRINT the application to the person assigned to printer automatically / OPEN an email that uses the demand for the subject heading number and adapts electronic mail form, clicking 1 button on the form. Is this possible with a script? or what I need to do the individual buttons?

    Any input you would know that my plant manager is everywhere on me to get there!

    Thank you

    Brian

    All this can be done with a single button using JavaScript. Here are some tips:

    1. for more information on the savings, see: https://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

    2. printing is easy using the JavaScript doc.print method. More information is in the Acrobat JavaScript reference, which is included in the kit SDK Acrobat: Acrobat SDK Documentation DC | Adobe Developer Connection

    3. you can start an email in various ways as shown here: https://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address

    The doc.mailDoc method will be probably the most flexible for what you do.

  • How to display the column single line with function of nested groups

    SQL > select deptno, Max (sum (sal)) SalSum
    2 of PEM
    3 Group of deptno;
    Select deptno, Max (sum (sal)) SalSum
    *
    ERROR on line 1:
    ORA-00937: not a single group group function

    Can you please help me to get the Max (sum (sal)) with Deptno...

    Or:

    select max(deptno) KEEP (DENSE_RANK LAST ORDER BY SalSum) deptno,
    max(SalSum) from  (
      select deptno,sum(sal) SalSum
      from emp
      group by deptno
    );
    
  • How to get out of edit mode tex with a single button?

    Hey,.

    Is there a way to escape from the editing of text with a single click or a button?

    Until now I always press CTRL + ENTER, then V and then I click outside the canvas so that the subsection is not highlighted. But it's a pain in the butt! Cant it be a single button for this?

    Thaks

    AO

    Something interesting, I just noticed: double click outside a text box can have different effects depending on the context.

    • With the selected pointer tool, double click on a text box allows you to edit the text. In this "quick editing" mode, double click outside the text box to go back to the pointer tool.
    • If the text tool has been manually selected, double click outside a text box will create a new text box.

Maybe you are looking for