Code for Button Sequence

Im making a game where you have to push certain buttons in
the correct order so it moves you to the next stage...
I have everything ready to go, graphics, buttons, etc....and
I know how to add sound to everything...but I dont know what code I
would enter so that when I play buttons A, C, D it moves to a new
page.
Can anyone direct me in the right direction?

hmm...Im not quite sure what you mean...do you have an
example? Lets say I dont have any function applied to my button
right now.
I can press the button, but nothing currently happens. How
would I store the correct sequence in an array? Im a little new at
this. I would greatly appreciate the help. Even if you could point
out a tutorial that would help me with this.
my buttons are:
btnA
btnB
btnC
btnD
btnA.onRelease=function(); should I start with that? not sure
what the function would be though

Similar Messages

  • How to find function code for buttons on toolbar in oops alv

    Hi experts,
    I want to remove some buttons from toolbar in oops alv, i know the procedure like get function code and pass the value in a table and pass that table to IT_TOOLBAR_EXCLUDING of
    method set_table_for_first_display but I WANT TO KNOW HOW TO FIND FUNCTION CODE FOR BUTTONS ON TOOLBAR IN OOPS ALV

    Hi Prakash,
    -->First you have to set the pf status in your alv program by,
    {FORM pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'FIRST'.
    ENDFORM.                    "PF_STATUS}
    -->Pass this Subroutine name in the Function module, Reuse_alv_grid_display's parameters i.e,
          i_callback_pf_status_set          = 'PF_STATUS'}
    *-->Then doble click on that pf status,
    From the menu bar, select Extras->Adjust Template->List Viewer,
    This will give you the existing statndard gui status of the program*
    ->Then catch that function codes in the User command Parameter of the Function module Reuse.. i.e,
          i_callback_user_command           = 'COMM'
    And make a subroutine of the name 'COMM'i.e,
    FORM comm USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
      DATA: okcode TYPE sy-ucomm.
      okcode = ucomm.
      CASE okcode.
        WHEN 'REF'.
        CALL FUNCTION 'POPUP_TO_INFORM'
          EXPORTING
            titel         = 'MANSI'
            txt1          = 'CREATED BY'
            txt2          = SY-UNAME
          TXT3          = ' '
          TXT4          = ' '
    endcase.
    Hope it helps you
    Regrds
    Mansi

  • Code for button located inside the MC

    I decided to rearange my flash site and now things don't work.
    I used to have an image collage where all the images were buttons and each image was located on the stage ( which made a stage with 10+ loose images)
    I made each image a button. Below is a code example for one of the images named "icysophistication_app_btn". The previously working code for it was:
    icysophistication_app_btn.addEventListener(MouseEvent.CLICK, onClick_IcySophisticationPopUp);
    function onClick_IcySophisticationPopUp(event:MouseEvent) :void {
              gotoAndPlay("icysophistication");
    Then I decided to unite all the images into one mc called "imgscollage_buttons_mc" (because later on I want to build another collage and have them sliding on the screen with tweener engine)
    imgscollage_buttons_mc.icysophistication_app_btn.addEventListener(MouseEvent.CLICK, onClick_IcySophisticationPopUp);
    function onClick_IcySophisticationPopUp(event:MouseEvent) :void {
              gotoAndPlay("icysophistication");
    I am guessing I have to put something before -  gotoAndPlay("icysophistication");
    but can't figure out what.
    Please suggest

    your original code was on the main timeline and it was the main timeline that contained the frame labeled "icysophistication"?
    your new code is still on the main timeline and the main timeline still has that frame label?

  • Help with writing code for button

    Hi!
    Can someone help me with the code for a button that sends my menu back to 0?
    This is the code current code, and I've created a button called sistapilen that I want to insert where the regular button "arrow" is not visible. I want sistapilen to navigate me back to 0. (Or if I can get "arrow" to do it and delete "sistapilen"). 
    /Jen
    // File downloaded from www.riacodes.com
    import com.greensock.*;
    var arrayX :Array = [0,-800,-1600,-2400,-3200,-4000,-4800];
    var currentIndex:Number=6;
    left_mc.addEventListener(MouseEvent.CLICK,navigate);
    right_mc.addEventListener(MouseEvent.CLICK,navigate);
    left_mc.buttonMode = true;
    right_mc.buttonMode = true;
    checkArrows();
    function navigate(e:MouseEvent):void{
    if(e.currentTarget == left_mc) currentIndex --;
    else currentIndex ++;
    checkArrows();
    TweenLite.to(content_mc,.5 ,{x:arrayX[currentIndex]});
    function checkArrows():void{
    if(currentIndex == 0) left_mc.visible=false;
    else if (currentIndex == arrayX.length - 1) right_mc.visible = false;
    else{
    left_mc.visible = true;
    right_mc.visible= true;

    Add a listemer for whichever other button you plan to use...
    sistapilen.addEventListener(MouseEvent.CLICK,navigate);
    And try changing your navigate function as follows...
    function navigate(e:MouseEvent):void{
         if(e.currentTarget == left_mc) {
              currentIndex--;
         } else if(e.currentTarget == right_mc){
              currentIndex ++;
         } else {
              currentIndex = 0;
         checkArrows();
         TweenLite.to(content_mc,.5 ,{x:arrayX[currentIndex]});

  • Generated Code for Button Bar - Not Working

    Hi all,
    I'm working with LightSwitch 2013 (Visual Studio 2013 Update 4), and I noticed that when I view my HTML5 client in Internet Explorer 11 and switch between tabs (in the HTML5 client), the buttons become barely visible (like they were disabled, but they're
    still enabled). Is there a quick fix for this, like regenerating the javascript that was generated to do this?
    Thanks,
    Gareth
    Edit: Here's a picture of what I mean. The button looks disabled, but is actually enabled. Any buttons that are disabled just show up as even less visible. Also, if I switch between tabs enough times, it'll fix the issue and look enabled again. Any advice
    would be greatly appreciated. Thanks!

    Have you added the button to the command bar for each tab or only the first tab?
    If you want 'Add OS' available in more than one tab then you need to add buttons to all relevant tabs, but wire up to the same command and event handler in code behind.
    Dave
    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

  • Code for button is affecting the entire movie

    The following code is on the timeline and the button
    instance, cancelMC, is also on the same timeline in a different
    layer and appears 4 times throughout the timeline. I've asked this
    question (worded differently) at kirupa and the post has gone
    ignored for some reason - maybe the title is too long or something.
    The code tells the button, onRelease, to "gotoAndStop(1)" however,
    if you click anywhere on the interface it does that. This is what
    would have happened if I had put on the timeline
    "this.gotoAndStop(1)." But I did not type that as you can see:
    with(cancelMC){
    onRollOver = function(){
    this.ExplainMC.gotoAndStop("cancel");
    onRollOut = function(){
    this.ExplainMC.gotoAndStop("void");
    onRelease = onReleaseOutside = function(){
    _root.searchPanelMC.mainMenuMC.gotoAndStop(1);
    this.gotoAndStop("user");
    Notice it says "this.cancelMC"? That is the button. Someone
    please help with this - I am at a loss and have tried everything to
    make it work.

    your original code was on the main timeline and it was the main timeline that contained the frame labeled "icysophistication"?
    your new code is still on the main timeline and the main timeline still has that frame label?

  • BDT Function Code for button

    Hello Folks ,
    Iv'e Created a new screen using BDT technology and added a button inside screen .
    how can i handle the function code within this screen in a way that i won't have system messeage "Unknown function code XXX" while clicking on this button.
    tanks in advance.
    Herzel .

    Hi,
    You need to implement for your button a function module for the BDT event FCODE. You can have a look at the fms *_BUPA_EVENT_FCODE, to get an idea on how to implement it.
    Thanks and warm regards,
    Smita.

  • Plsql code for button.....

    i have a page which contain fields term_id,*term_desc*,*term_condition*
    and some buttons Add,*delete* and save..
    Actually no data in the table..
    when i press Add button the term_id should get increment by '1' .
    where i have to wite the below coding in Edit Add button?
    can i put the coding in Conditional Item Display condition type PLSQL?
    declare
    a number;
    begin
    select max(nvl(term_id,0))+1 into a from term_creation;
    *:P5_TERM_ID*:=a;
    end;
    Edited by: skud on Mar 5, 2011 2:05 AM

    You can submit the page with a request say "MY_REQUEST" and run a conditional PLSQL block(request equal to MY_REQUEST) and add the PLSQL code there.
    If you want to do it without submitting page
    <li>Apex Version 4 : Add an id to button (button attributes, id ="MY_BUTTON" ) and add a Dynamic Action fired on click of DOM element : MY_BUTTON , event type would be PLSQL and write your PLSQL code there(add required page items to be submitted in the field)
    <li>Apex 3.x and 2.x(works iwth apex 4 too), create an ondemand PLSQL process, call the process from a javascript function(add the item values to session using the ajax request handle) and call the javascript function from the button click( action type: redircet to URL , javascript:function_name(parameter1,parameter2) )

  • Action three code for button re-appearing

    I am creating a video and I need a play button to appear anytime someone hits the pause or stop button on the skin. Is this possible and if so does anyone have a sample code I could use. I am a super novice. I would also be ok with the entire preview movie clip appearing... as long as I can click it to play. Thanks!

    if you're using an flvplayback component with instance name flv, use:
    import fl.video.VideoEvent;
    flv.addEventListener(VideoEvent.STATE_CHANGE, changeF);
    function changeF(e:VideoEvent){
        if(e.state=="paused"||e.state=="stopped"){
            playBtn.visible=true;

  • Executing javascript code for button click

    in my application i have report page where i am displaying table data when i click a button it selects first row and returns it using htp.prn() now i m getting that record in jvascript now i want to execute this java script code when the button is clicked i tried using onClick attribute but it didn't work can anyone tell me how to do it?

    Hi,
    I think this is related to Application express, right ?
    You could post your question in Application Express forum
    Oracle Application Express (APEX)
    Also please give more detail about your issue. Post e.g. code (pl/sql & javascript) you try to use.
    Also if you setup sample about your problem to http://apex.oracle.com will help others to help you.
    Help us to help you =)
    Br, Jari

  • How do I redeem my code for Mountain Lion OS X when I can't find a redeem button in the Mac App store anywhere please?

    How do I redeem my code for Mountain Lion OS X when I can't find a redeem button in the Mac App store anywhere please?
    How do I find the redeem button?  What do I have to do?

    Welcome to Apple Support Communities
    Open the Mac App Store and press the Redeem button:

  • Code for send button. I need your help, guys!

    I would appreciate a Java code for a "send" button or a "send page" link that would send a complete web page to my email address. I have some forms for my users to fill out online and send them to me, and so the problem I am having is that when I use FrontPage forms (text boxes, check boxes, radio buttons, etc.,)for them to use, I am getting the input from those form only. What I NEED to get is the complete page, exactly what the users see on the screen with all the text in the forms. The need for this is that these forms (reports) will later be printed out, so they MUST look exactly as on the screen.
    So I am thinking a bit of Java code could help me out. Would you give me a hand guys? Thanks!

    Do some JNI and take a snapshot of the screen, it is the ONLY way I know to ensure EXACTLY what you ask for: even the HTML from the page may look different than what the users sees when filling out the form when that HTML is displayed on a different machine and system.
    Otherwise your agument seems a little trivial and you could just replicate the form on your local machine and insert the data you captured with a normal post operation into the local copy of the HTML form.

  • Streamlining the code for the button group with individual links and rollover imgs

    I am looking for a solution to streamline the code for the array of 20+  buttons located inside the scroll pane.
    I know I can make an array if all the buttons would have a unified code executable change, i.e. they would become larger and brighter.
    My problem is that each button represents an product image in the lights off stage, then of rollover it is a lights on stage so I have to import two images in the on and off stage and play around with the opacity.
    Additional problem is that each button has to ling to a different label.
    My question is: is it possible to unify the code if buttons have that much individuality or I have to make each one of them as in the example below.
    // makes a hand cursor appear over a mc acting as a button for all the buttons inside the scrollpnaeBckgrnd_mc.scrollpaneBckgrnd_btns_mc.
    MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.buttonMode = true;
    MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.useHandCursor = true;
    ///////////////INDIVIDUAL BUTTONS
              MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLyte _btn.FloraLyte_ON.alpha = 0;
                        var  FloraLyte_btn_Tween:TweenLite = TweenLite.to(MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.F loraLyte_btn.FloraLyte_ON, .5, {alpha:1, paused:true});
                        MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLyte_btn.addEventListener(MouseEvent.ROLL_OVER, overHandler_FloraLyte_btn);
                        MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLyte_btn.addEventListener(MouseEvent.ROLL_OUT, outHandler_FloraLyte_btn);
            MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLyte_btn. addEventListener(MouseEvent.CLICK, onClick_floralytePopUp);
                      function onClick_floralytePopUp(event:MouseEvent) :void {
                                            gotoAndPlay("floralytepp");
    function overHandler_FloraLyte_btn(e:MouseEvent):void{
             FloraLyte_btn_Tween.play();
             trace("you rolled over me");
    function outHandler_FloraLyte_btn(e:MouseEvent):void{
             FloraLyte_btn_Tween.reverse();
             trace("you rolled off me");
    MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLytell_btn .FloraLytell_ON.alpha = 0;
                        var  myTween:TweenLite = TweenLite.to(MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.F loraLytell_btn.FloraLytell_ON, .5, {alpha:1, paused:true});
                        MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLytell_btn.addEventListener(MouseEvent.ROLL_OVER, overHandler);
                        MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.Flor aLytell_btn.addEventListener(MouseEvent.ROLL_OUT, outHandler);
            MovieClip(mc_pane2.content).scrollpaneBckgrnd_mc.scrollpaneBckgrnd_btns_mc.FloraLytell_bt n.addEventListener(MouseEvent.CLICK, onClick_floralytellPopUp);
                      function onClick_floralytellPopUp(event:MouseEvent) :void {
                                            gotoAndPlay("floralyte2pp");
              function overHandler(e:MouseEvent):void{
             myTween.play();
             trace("you rolled over me");
              function outHandler(e:MouseEvent):void{
             myTween.reverse();
             trace("you rolled off me");

    as ned suggested, plan your flow and code into it. here is one example:
    var buttonArray = [someButton, someOtherButton, aDifferentButton];
    for(var i = 0; i < buttonArray.length; i++){
         //get reference to county movieclip
         var mc = buttonArray[i];
         //then add listeners
         mc.addEventListener(MouseEvent.ROLL_OVER, overMe);
    function overMe(e:MouseEvent){
         var mc = e.target;
         switch(mc){
              case: someButton:
                       someOtherButton:   doThis();
                                                     break;
              case: aDifferentButton:     doThat();
                                                     break;
              default:                            //do nothing;
                                                     break;
    function doThis(){
         trace("do this")
    function doThat(){
         trace("do that")

  • Code  for  'enter' button in user command.

    hi experts,
                       i have developed a initial screen as selection screen for table control.
    data is displayed in second screen(table control).
    <b></b>when user enters inputs in selection screen and presses enter on keyboard
    it should execute to second screen. code for enter button. <b></b>

    Hello,
    in the PBO process should you have the next code:
    for example:
    case sy-ucomm.
    when 'ENTER'.
        CALL SCREEN 0200. " The second window
    when 'SAVE'.
    when ...
    endcase.
    You should have all conditions in the case statement, otherwise you have a error.
    Regards,

  • Func- Code for Radio-button in Module-pool Prg.

    Hi Friend's.
    I have define 2 Radio button
    on Module-pool screen.
    I am not been able to triger the Radio button in
    Pai .
    How can i assign the function code for
    radio-button in module-pool.
    pls can any one help me

    Hi,
    For radion buttons, what ever the name you will give that name only will hold that value ( Either selected or not ). But this variable should be declared as global variable in main program.
    Still if you want to assign function code, you can assign one like other fields on the screen.

Maybe you are looking for

  • Problem Upgrading Photoshop 5.0 to CS1

    I have been using Photoshop Elements 6 for a few years now. Recently, I decided to upgrade to Photoshop CS (yes, the first one). However, I found out I needed a version of Photoshop, not Elements if I wanted to do this. So I purchases Photoshop 5.0 o

  • Ipad2 digital AV Adapter

    Hi, I am planning to purchase and mount an ipad 2 in the wall in my kitchen - similar install as per this video on youtube ( do a search for mykitchenipad) only difference being I will have two side cutouts - one for the home button and one for the f

  • How to pass parameter into extract function (for XMLTYPE)

    I have a table PROBLEMXML with XMLTYPE field xml_column. In this column there are several deffinitions for the problem. There is no max amount of deffinitions and it can be no definition at all. I need to return all definitions for every problem as a

  • DVD Playback Error Problems.

    Hi, When I put in a DVD a initialation error pops up saying Player requires a newer version of DVD Playback frame work [-70103]. How do I fix this? Thanks.

  • Cannot enable iCloud backup?

    Cannot enable iCoud Back up on my iphone, worked before.... Please help