How to assign code to buttons?

the current code I have on the timeline now (where the buttons reside) is:
stop();
function playLifeboy(event:MouseEvent):void
gotoAndStop(3);
function playKrave(event:MouseEvent):void
gotoAndStop(2);
lifeboy_btn.addEventListener(MouseEvent.CLICK, playLifeboy);
krave_btn.addEventListener(MouseEvent.CLICK, playKrave);
These work fine the first time but when I return to them they don't work. (I was told I have to assign the code to the buttons, But how?)

OK Thanks,
I Have 2 buttons in MC named mcMovieTrans the AS for these buttons are in the MC's timeline, the code is:
stop();
function playLifeboy(event:MouseEvent):void
gotoAndStop(3);
function playKrave(event:MouseEvent):void
gotoAndStop(2);
lifeboy_btn.addEventListener(MouseEvent.CLICK, playLifeboy);
krave_btn.addEventListener(MouseEvent.CLICK, playKrave);
when the buttons are activated they go to there corresponding frames and Stop. As an example of what happens next I'll show you frame 3 which plays MC mcKraveMovie:
The AS for this timeline on Frame 45 is:
stop();
function playReturn(event:MouseEvent):void
gotoAndPlay(46);
return_btn.addEventListener(MouseEvent.CLICK, playReturn);
The AS for the timeline on Frame 90 is:
MovieClip(parent).gotoAndStop(1);
This is where the problem occurs because when this action takes place and it returns to the parent MC (mcMovieTrans) The buttons actions dont work anymore.
Thanks

Similar Messages

  • Using Actionscript 3, how do I code a button in a parent file to load at a specific frame in another swf file?

    Using Actionscript 3, how do I code a button in a parent file to load another swf file at a specific frame?

    You can either place the loading code in the desired frame of the parent file, or continuously monitor the currentFrame proiperty of the parent file and do the loading when the value matches the desired frame number.

  • How to assign a dynamic value to the value property of a button ?

    Hi Folks,
    I have a need, can i know how to assign a dynamic value to the value property of a button. Scenario is like follows...
    This is a struts based web application
    1. I have a file which consists of login user details (user name and his previlages) for a web application.
    2. I got those user details, into a List.
    3. When a user logged into the web app, in the home page there are few buttons. The type and number of buttons shown depends on the type of user/ user. (Buttons have different combination and the number of buttons available are not constant, they will vary from user to user).
    4. for each button, there will be a different action. I can pass the value of a button to an action class, but here button must have a dynamic value.
    Here is my test code:
    <%
    if (List != null)
    for (int i = 0; i <List.length; i++)
    %>
    <html:submit property="rduname" value= "<%=List%>" onclick="return submitRdu('<%=List[i] %>');"/>
    <%
    %>
    But my problem is how to assign a dynamic value to the value property of the button ( i know 'value= "<%=List[i]%>" ' will not work, just wanted show you guys).
    Thanks in advance,
    UV
    Edited by: UV_Dev on Oct 9, 2008 2:15 PM

    Let me try i know am not good at JSP but do we need double quotes here
    value= <%=List%>i think JSTL should help you about the dynamic thing                                                                                                                                                                                                                                                                                                                       

  • How to Assign T-code to a ZTable

    Hi All
    I have a requirement to assign a T-code for an ZTable. Please let me know how to assign a transaction code to Ztable.
    Does, any specific attributes has to maintained in ZTable in order to generate a transaction code for it.
    Thanks
    Prasead K

    Hi,
    First u have to do some steps in table maintainance..
    Here are the summarized steps for Table Maintenance
    1)  Go to SE11
    2)  In Delivery and Maintenance TAB
         i)  Delivery Class as A ( most of the times)
         ii) Data Browser/Table View Maint. as "Display/Maintenance Allowed"
    3) Enter the required fields.
    4) Goto Technical Settings.Enter the appropriate data
    5) Then go to Utilities-->Table Maintenance Generator
        i) Enter the Authorization Group (Varies from project to project...when no authorization required give &NC& )
        ii)Function Group as "Table Name"
        iii)Package varies from project to project
        iv)Maintenance Type as "One Step"
            a)Give overview Screen Number (Your own number..but remember)
            b)Single Screen "Any number"(it can be 0 also)
    6) Then click on the white color create button on menu bar(Create)
    7)    To view the maintenance Screen Transaction is SM30(There you need to give the table name)
    8)    If you want to change the description of the fields,alignment,mandatory,greying the fields,Validations and many more
         goto SE51 enter program name as "SAPL(TABLE NAME) EX:SAPLZH116 and enter the screen number what you gave in the step 5,iv,a.
    9)If u want to have a transaction to table maintenance
       a)Go to SE93
       b)Choose "Transaction with Parameters" Radio button
       c)Give the Package Name which is given in 5,iii
       d)Give transaction as SM30
       e)Choose Skip Initial Screen
       f)In GUI Support Choose all the three options
       g) In the default values Tab
           Name of the Screen Field        Value
           UPDATE                                        X
           VIEWNAME                                (Enter Table Name)
    After doing this goto se93..in 9(a)
    1.In the home page create a prgm name..
    2.give the description below description choose anyone suitable to ur project
    3.Give the program name and screen number
    4.In sap gui area enable all the check boxes...
    Regards,
    Ari
    3.

  • 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

  • How to assign chart of account to company code

    hi all,
              i am using SAP ECC 6.0
               in my hierarchy , i follow following menu path for assigning company code to chart of account but there is no option there
    my menu path is as follows :
    Financial Accounting (NEW) -> General Accounting New -> Master Data -> G/L Accounts -> Preparations
       and in sub menu (of Preaprations) following options there :
      1) Revise Chart of Accounts (only documentation)
      2) Edit Chart of Accounts List
      3) Define Account Group
      4) Define Retained Earnings Account
    also one more hierarchy is ther name as : Additional Activities , but no option for Assignment of company code to Chart of account (COA)
    now , how can assign company code to chart of account
    plz help
    regds
    shailesh
    Moderator: Please, avoid asking basic questions

    Hi,
    Financial Accounting (New)-Financial Accounting Global Settings (New)-General Ledger Accounting (New)-Master Data-G/L Accounts-Preparations-Revise Chart of Accounts,Edit Chart of Accounts List,Assign Company Code to Chart of Accounts,Define Account Group,Define Retained Earnings Account
    Direct try this Tcode is OB62 or logoff thesap and logon
    Regards,
    Kanike

  • How to assign reconcilation account to particular compant code ,

    Hi ,
    How to assign reconcilation account to particular compant code , please

    Hi siva
    You can create the reconciliation account in FS00 there while creating you can give the company code
    Another option is Copy the available reconciliation account in FS00 and change the company code.and give your own G/L account number. and save it
    Regards
    Srinath

  • How to Assign an event to a button in PCUI

    Hi everybody,
    How to Assign an event to a button in PCUI ?
    Thanks & Regards
    Hassan

    Hello Hassan,
    The button for which you are tying to assign is a part of Toolbar group, then in CRMC_BLUEPRINT_C there under Application element expand the node TOOLBAR GROUP, there select you toolbar group & on the left panel  you have ASSIGN EVENTS
    there you can assign the event.  Provided event should be defined before.
    Hope this helps.
    Thanks & Regards,
    Bhavya

  • How to code on button click how to increase row height in iphone/ios/uitableview

    how to code on button click how to increase row height in iphone/ios/uitableview
    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
        pppp=[postText objectAtIndex:indexPath.row];
        CGSize maxSize = CGSizeMake(280, MAXFLOAT);//set max height
         CGSize cellSize = [pppp sizeWithFont:[UIFont systemFontOfSize:14]
                           constrainedToSize:maxSize
                               lineBreakMode:NSLineBreakByWordWrapping];//this will return correct height for text
        // return  cellSize.height+115;
        BOOL isSelected = [self.selectedIndexPaths containsObject:indexPath];
        CGFloat maxHeight = MAXFLOAT;
        CGFloat minHeight = cellSize.height+115;
        CGFloat constrainHeight = isSelected?maxHeight:minHeight;
       CGFloat constrainWidth  = tableView.frame.size.width - 20.0f;
        NSString *text       = hChildPost[indexPath.row];
        CGSize constrainSize = CGSizeMake(constrainWidth, constrainHeight);
         CGSize labelSize     = [text sizeWithFont:[UIFont systemFontOfSize:15.0f]
                                constrainedToSize:constrainSize
                                    lineBreakMode:NSLineBreakByCharWrapping];
       // return MAX(labelSize.height+75, 100.0f);     return MAX(labelSize.height+75,cellSize.height+115);    
    i used this code but it crashed app

    On what line did it "crashed app" and what was the exception? The line within this function, not in main.m. If you haven't figured this out yet: view the debugger output, try single stepping, and/or add NSLog messages in the function.

  • How to assign own Process code to a function module

    Hi,
      In we42.
      How to assign own Process code to a inbound idoc
    function module?
      Here function module name is not coming in the list.
    Ansar.

    Hi,
    USe transactn: WE42, define ur process code, double click and assign func module...
    To know all the transactions for ALE IDOC.. use
    WEDI.. Goto SAP easy screen there just type WEDI in command box and enter.
    Plz mark if useful..
    Regards
    Divaakr

  • How to assign function module with process code in IDOC ?

    how to assign function module with process code in IDOC ? and what code i have to write in that function module for custom IDOC ?
    helpful answer will be rewarded?

    Hi,
    First goto transaction we42 -->editing mode --> new entries -->give name of your process code and description --> processing with alv service and function module -->then press enter -->after that enter the name of the function module you want to associate from the drop down and save it.
    Thats the way to assign function module with process code.
    In that process code we will have the Function modules and Bapi's which will take the data which we are sending through IDOC and then process it.
    for example: i am triggering the IDOC for every purchase order created then this process code in the receiver system will take the data which i have enetered in the sender system to create the purchase order and process it and creates the same purchase order in the receiver's system.
    Reward if helpful.
    with regards,
    Syed

  • How to Assigning the company code to the billing units from ecc to crm

    Hi,
    Iam doing the roll out project , i require the help.
    can any one suggest me how to assign the company code to the billing units from ecc to crm.
    Thanks
    Mustafa

    Hi Mustafa
    You can load this data from R/3 to CRM by going to transaction R3AS in your CRM system, and using load objects EQUIPMENT, MATERIAL, and CUSTOMER_MAIN.
    Best Regards
    Gavin

  • How to code a button to play and pause sound using load sound?

    how to code a button to play and pause sound using load sound?I have used load sound methos to attach the sound.Can anyone help me?

    Hey thnx,
    I have used this code on sound's button's frame.and my stop n play button is on another screen.main sound button and stop button is on diffrent screen.
    Here is my code-
    stop();
    adaDrut1.onRelease = function () {
              mySoundC = new Sound(this);
              mySoundC.loadSound("F#/Bhajni1.ark", true);
    mySoundC.onSoundComplete = function() {
    _root.mySoundC.start(0,999); }
             gotoAndPlay("play2");
            _global.myTaalLaya = "Low1";
    adaDrut1 is a sound button.And there are lot of buttons with diffrent sound.
    Thanks..

  • How to write code for page up and page down buttons on alv screen?

    Hi,
    Page up and page down buttons are not working in general alv report. Thease buttons are in disable mode. But is stnd. transactions (tcode : fbl5n)  these are enabled and working properly, but we can't debug this with /h
    How to write code for page up and page down buttons on alv screen?

    Poonam,
    On doing the screen debugging it took me over to    Include LSTXWFCC ,kindly check the below code.
    module cc_display.
      fcode = sy-ucomm(4).
      case sy-ucomm(4).
        when 'P--'.
          perform cc_firstpage.
        when 'P-'.
          perform cc_prevpage.
        when 'P+'.
          perform cc_nextpage.
        when 'P++'.
          perform cc_lastpage.
        when 'EX--'.
          perform cc_firstcopy.
        when 'EX-'.
          perform cc_prevcopy.
        when 'EX+'.
          perform cc_nextcopy.
        when 'EX++'.
          perform cc_lastcopy.
    I guess it can give you some lead.
    K.Kiran.

  • How to assign a user and position to a release code .

    How to assign a user and position to a release code ?
    I tried in SU01 but the data is not getting reflected in the table
    T16FW. from where the rule (20000026) is picking the user .
    is there a transaction to do so ?
    Thanks in advance .

    These are done in SPRO. Search for release in SPRO, you will find your answer.
    Regards, IA

Maybe you are looking for

  • Hoping for repsonse from HP, re: Laserjet 400 Color MFP M475dw can not locate wifi network

    Greetings!  MY HP Laserjet Pro 400 Color MFP M475dw (9 months old) no longer finds any wireless network in my home. It worked fine then stopped for no reason I can determine. Nor will it print via USB cable direct from my PC.  I opened a case with HP

  • Possible to do in Forms app?

    Hello! I would like to add a realtime peak meter system to my EqAPO GUI's. Peak meter should be able to - read the peaks from system audio output (as does here in an example: https://msdn.microsoft.com/en-us/library/windows/desktop/dd316561(v=vs.85).

  • Help needed in script

    Hi All... We have one custom form and driver program. Now i need to copy those two with diffrent names and i need to make some changes in that. What my problem is.. after making the changes we created an output type and we attached the form name and

  • Is there a way to monitor a developer's activity

    Hi,   Is there a way to monitor a developers's activity in SAP WEB AS 6.40 system. The view/change/delete function that he might have done on various Field, programs, data dictionary objects etc..   As a Admin this will be very helpful.   Thanks Arun

  • Importing 10g mapping in 9i

    Hi all, I want to know whether it is possible to import a 10g mapping into a 9i environment? Regards Bharath