How to maintain the hover state of a button while it is in it's current page?

Hi,
I'm just a beginner in actionscript 3. I have this code about navigation using movieclip buttons. I just made the currently selected button disabled when it is in the current page but I just cant figure out on how to maintain it in its hover state (It keeps on returning to its normal state). Any ideas, your help will be very much appreciated. Thanks.
Here's the code I've written on the first frame on the main timeline(scene1), I have 4 buttons namely mcButton1, mcButton2, mcButton3, mcButton4 and 4 labeled frames, page1, page2, page3 and page4.:
var page:String;
var btnArray:Array = [mcButton1, mcButton2, mcButton3, mcButton4];
var pageArray:Array = ["page1", "page2", "page3", "page4"];
for (var i:int = 0; i < btnArray.length; i++) {
    btnArray[i].buttonMode = true;
    btnArray[i].addEventListener(MouseEvent.CLICK, onMouseClick);
    btnArray[i].addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
    btnArray[i].addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
function onMouseClick(event:MouseEvent):void {
    for (var i:int = 0; i < btnArray.length; i++) {
        if (event.currentTarget == btnArray[i]) {
            btnArray[i].mouseEnabled = false;
            page=pageArray[i];
            play();
        else {
            btnArray[i].mouseEnabled = true;
function onMouseOut(event:MouseEvent){
        event.currentTarget.gotoAndPlay("out");
function onMouseOver(event:MouseEvent){
        event.currentTarget.gotoAndPlay("over");

use:
var lastClickedButton:MovieClip;
var page:String;
var btnArray:Array = [mcButton1, mcButton2, mcButton3, mcButton4];
var pageArray:Array = ["page1", "page2", "page3", "page4"];
for (var i:int = 0; i < btnArray.length; i++) {
    btnArray[i].buttonMode = true;
    btnArray[i].addEventListener(MouseEvent.CLICK, onMouseClick);
    btnArray[i].addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
    btnArray[i].addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
function onMouseClick(event:MouseEvent):void {
    for (var i:int = 0; i < btnArray.length; i++) {
        if (event.currentTarget == btnArray[i]) {
            //btnArray[i].mouseEnabled = false;
lastClickedButton.gotoAndPlay("out");
lastClickedButton=MovieClip(event.currentTarget);
            page=pageArray[i];
            play();
        else {
            btnArray[i].mouseEnabled = true;
function onMouseOut(event:MouseEvent){
if(lastClickedButton!=event.currentTarget){
        event.currentTarget.gotoAndPlay("out");
function onMouseOver(event:MouseEvent){
        event.currentTarget.gotoAndPlay("over");

Similar Messages

  • How to use the Include Statement in the BADI

    Dear All,
            I am trying to implement the BADI. So i need to use the Include in the BADI.
    How to use the Include statement in the BADI. I cant able to use it in the Public, Private and protected statement.
    Where should i mention that,,,,
    Thanks
    Yogesh

    Hi Sharat,
      Thanks for your reply.
    I need to use the BADI HRWPC_PCR_APPR_FORM. In which the values are available in the Container. So if i need to use the container values then i need to use that include <cntain>.
    Is there any possible ways to make it.
    Thanks
    Yogesh

  • How to maintain the material master data in plant

    Hi all,
    while creating BOM I am getting an error "no material master data in plant' can some one help me how to maintain the material master data in plant
    Regards,
    Balu

    Check the material available in MARC table in SE11 transaction against your plant.If it is not available please maintain through MM01 transaction.

  • How to maintained the Text  language for CKF keyfigure

    Dear All,
    Please let me know how to maintained the text language for CKF I am using only keyfigures in CKF.
    Issue is text is not showing in Spain language when user exeuted the report (longin Spain) for CKF keyfigures .
    As per report design there are formuals and direct keyfigures and CKF has defined and we keep it under in Row struture in the report.
    After exeuted the report (Login Spain)Text has converted in all languages along with spain except for CKF keyfigures.
    Issue in text CKF's:
    There is a main  CKF (Cost) under this again we defined two sub CKF's those are total cost and average cost. We able to see the text in Spain language for Main CKF(cost) and also cheked in RSZELTTXT(Texts of reporting component elements) for the same.
    We can able to see the text in all languages for main CKF(cost) and enteries are there in RSZELTTXT table.
    We can see only  the text in english for  total cost and average cost and also enteris are there only in EN in RSZELTTXT table.
    It would help to me if any one can answer my question.
    Thanks in advance .
    Regards,
    MQ

    U can fetch the texts for the items using
    Read_text.
    Example:
        g_f_tdname = xvttp-vbeln.
        g_f_obj = p_obj.
        g_f_langu = 'DE'.
        REFRESH g_t_lines.
        CLEAR g_t_lines.
        CALL FUNCTION 'READ_TEXT'
             EXPORTING
                  id                      = p_var
                  language                = g_f_langu
                  name                    = g_f_tdname
                  object                  = g_f_obj
             TABLES
                  lines                   = g_t_lines
             EXCEPTIONS
                  id                      = 1
                  language                = 2
                  name                    = 3
                  not_found               = 4
                  object                  = 5
                  reference_check         = 6
                  wrong_access_to_archive = 7
                  OTHERS                  = 8.
        IF sy-subrc <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    The Required fields are,
    Text-id ,language,name,object.
    Let me know if you further require help.
    Regards

  • How to Maintain the Pricing Condition Records in CRM

    Hi
    I am new to the CRM
    How to maintain the pricing condition records in crm for the particular condition type?
    as we do in SD(VK11)
    Thanks

    Hi Binu,
    First of all, you could maintain pricing conditions in the following places:
    1. In General Condition Maintenance (GCM)
    2. At the product maintenance level
    3. At the 'Price agreement' tab of Contracts
    4. As manual conditions during order processing at item level
    Now, if you want to maintain conditions using GCM, you first have to maintain a condition maintenance group in the customizing where in you can assign condition table and condition type for different counter values. I am assuming that you have done this activity successfully.
    When you run the transaction '/SAPCND/GCM', for application 'CRM', your condition maintenance group name and context 'GCM', you will be initially taken to a screen where in you'll have an item area which would be blank and then condition fields would be displayed in a tree on the left.
    Here, select the field 'Condition type' and click on icon 'Select records'. You would get a dialog prompting you to enter condition type. Here you can specifiy the condition type for which you want to maintain/view condition records.
    If no condition records are available, item area would be left blank. Here, you can choose a condition type using the standard F4 help. Depending on condition types that are assigned to condition maintenance group, different condition types would be displayed in the F4-help using which you can maintain condition records.
    Hope this helps.
    Regards,
    Pavithra
    **PS: Please reward points if this helps.

  • Validation: How to maintain the entry in GB02C

    HI FI GURUS n EXPERTS,
    My requirement is that - We want to restrict Negative posting for some GL i.e. For some GL balance should not be Zero.
    When I have made the search on SDN, I found it can be done with the help of Validation: OB28 & GGB0.
    Currently we are not using any validation. When we use T-Code GGB0 --> Financial Accounting --> Line Item --> New Validation
    System shows a pop-up window to select Boolean Class & Message ID.
    I also found that this information is maintained in Table GB02C.
    When I use Se16 to see the detail of the table GB02C, I found there is only one entry Bool. Class: FP1 & Message ID 7F.
    But I don't know How to maintain the entry in table GB02C & What is the T-Code for it. which message ID I have to create.
    Please help.
    DSC

    Dear Alex,
    When I use: GGB0 --> Financial Accounting --> Line Item --> New Validation
    System shows a pop-up window to select Boolean Class & Message Class, I select the Message Class 9 and for Message Class Press F4 and select any message class. System gives an error message: Message ID must start with 'Z' Message no. GB116.
    Basically, My question is that: Which T-Code we have to use to maintain Boolean Class & Message Class.
    With thanks,
    DSC

  • How to organize the import statements in FXML Files?

    Hello,
    I'm a user of NetBeans IDE and it can organize the import statements in *.java files. Now, I'm using JavaFX and editing the *.fxml files as well. I want to know how to organize the import statements in *.fxml files?
    Thanks a lot.

    You should use Scene Builder, it will make all these import statements for you.
    Moreover, it will greatly simplify the writing of your FXML files, since you only have to Drag&Drop JavaFX objects on the scene. Then, it automatically generates FXML files.

  • How to get the previous state of my data after issuing coomit method

    How to get the previous state of some date after issuing commit method in entity bean (It should not use any offline storage )

    >
    Is there any way to get the state apart from using
    offline storage ?As I said the caller keeps a copy in memory.
    Naturally if it is no longer in memory then that is a problem.
    >
    and also what do you mean by auditlog?
    You keep track of every change to the database by keeping the old data. There are three ways:
    1. Each table has a version number/delete flag for each record. A record is never updated nor deleted. Instead a new record is created with a new version number and with the new data.
    2. Each table has a duplicate table which has all of the same columns. When the first table is modified the old data is moved to the duplicate table.
    3. A single table is used which has columns for 'table', 'field', 'data' and 'activity' (update, delete). When a change is made in any table then this table is updated. This is generally of limited useability due to the difficulty in recovering the data.
    All of the above can have a user id, timestamp, and/or additional information which is relevant to the data being changed.
    Note that ALL of this is persisted storage.
    I am not sure what this really has to do with "offline storage" unless you are using that term to refer to backed up data which is not readily available.

  • How to maintain the vendor details in sap pi ?

    HI All,
    Here i am working with B2B scenario , can you help me how to maintain the vendor details and client details in parties,'
    here i have 49 vendors.
    control records are changing according to the vendor s .
    Plz help me ......

    Can u help me how to maintain the link between the pi and ecc for identifiers
    Would like to know what your scenario is. Identifier would be required to be maintained in the Party (created in SAP PI) when the scenario is Inbound.
    It is actually the Partner Number for the Partner Profile created in we20 of the sAP ECC system. (you may have to store it as KU or LI) in SAP system.
    Regards,
    Abhishek.

  • How to consolidate the financial statements for 3 company codes, assigned t

    Hi Friends,
    How to consolidate the financial statements for 3 company codes, assigned to 3 different companies, 3 different fiscal years, 3 different controlling areas and all the 3 Company Codes assigned to same chart of accounts in the same client?
    Can we need any ABAP program for this (or) Is it possible using Report Painter?
    Please help me.
    Thanks

    Hi friend,
    Is it a real-time situation or something you are visualising ?
    For consolidation, you can use a group chart of accounts and select that in the operative chart of accounts for consolidation purposes.  This would work provided the company codes use the same operative chart of accounts and fiscal year.
    I hope the above would be helpful to you.
    Regards,

  • How to test the select statement.

    Hi All,
    How to test the select statement.
    Is there any Oracle sqlplus  or toad kind of tool to  test the query.
    thanks
    siva

    Use SQL Trace (ST05) and choose 'Explain one SQL Request'. Enter your SQL command as it should be executed in the underlying database. e.g. if the db is Oracle, the statement should be entered as:
    SELECT matnr,werks,lvorm,dispo
    FROM marc
    WHERE mandt = :a AND
                 matnr = :b AND
                 werks = :c
    In the above :a, :b and :c are place holders for the actual comparison values. You dont have to enter those values. When you choose 'Explain' button, you will find the 'Execution Plan'. The important parameter which denotes the efficiency of the SQL statement is the 'Cost'. The cost should be as low as possible. The table access should be through INDEX UNIQUE SCAN. If you get a FULL TABLE SCAN and higher cost, you need to fine-tune your statement by modifying the where clause.
    If you dont know Oracle SQL statements, execute the program in trace mode and go to the trace and you will find the underlying SQL statements issued to the database.
    Regards
    Suresh Radhakrishnan

  • How to maintain the contact person in Business Partner ?

    Hi Experts,
    Could you help to resolving the below Requirement.
    __  +Requirement:+__
    How to maintain the contact person in Business Partner ?
    How to get the Contact person in Is-Media Documents?
    Thanks& Regards
    Venkat

    Dear Venkat,
    In SD Customer Master data, we can maintain Contact Person in General Data tab page.
    For my knowledge, we can not find u201CContact Personu201D field in ISM Business Partner u2013 General Data. Correct me if I am wrong.
    Mostly user enters the contact person details in u201CSearch Term 1/ 2 fieldu201D in Address tab page in ISM Business Partner u2013 General Data tab page. While creating ISM Billing Document for this Business Partner, system prints this contact person details in ISM Invoices.
    (Or)
    While creating ISM Order, user can maintain Contact Person name in Header Details(Click on u201CGo to >Header>Details>Purchase Order Data>Cont.Person)
    If you maintain Contact Person name in Header Details also, system print this contact person details in ISM Invoices.
    Check from your end.
    Best Regards,
    Chandramohan

  • How to maintain the contact list in the phonebook when i change my sim card

    how to maintain the contact list in the phonebook when i change my sim card

    The SIM has not affect on the contacts in an iPhone. Unlike other devices, the contacts are not maintained on the SIM card.

  • How to maintain the data in the view cluster

    we are doing upgrade, we have one view cluster app_log in this object scwb
    and subobjects is swtlo1,02,03 like i have some subobjects in 4.6c we transported the view cluster to ecc6.0 in ecc 6.0 i have object scwb  but subobjects doesn't exist how to maintain the subobjects in view cluster.

    Definition
    A view cluster is a group of maintenance dialogs which are collected in one maintenance unit for business or technical reasons. They allow related data in more than one table/view to be maintained consistently.
    Use
    Whereas only 1:1 relationships can be processed in maintenance views (except for language-dependent texts), key extensions and relationships of cardinality N:M can also be handled in view clusters. Maintenance dialogs with no key, or partial key-dependence, can also be combined into view clusters.
    Grouping dialogs into one maintenance unit has the following advantages for data maintenance:
    Navigation: A view cluster contains convenient standard navigation between the individual maintenance dialogs. This simplifies the maintenance of the data in a view cluster.
    Consistency: The view cluster ensures data consistency when deleting, copying, saving, retrieving and manually transporting data. For example when an entry in a higher-level view is deleted, , it automatically ensures that all dependent entries in lower-level views are also deleted.
    You can first split tables with a lot of fields into various views and then collect them into a view cluster.
    Use tabs to format very wide tables with a lot of fields.
    Structure
    Navigation in a view cluster is usually based on the hierarchy of the tables/views on which the dialogs are based. A view cluster usually consists of one or more root dialogs and the at most 14 maintenance dialogs which depend on them. A view at a lower level has one or more additional fields in its key compared its higher-level view. Each data record at the higher level has several dependent data records below it.
    Each maintenance dialog is an independent unit consisting of an overview screen or an overview and a detail screen, depending on the dialog type. As well as the data to be maintained, the overview screen contains a navigation area, in which you can go to higher or lower level maintenance dialogs.
    One-level maintenance dialogs only contain one screen, the list screen, in which all existing data records are displayed in a table. In a two-level maintenance dialog, double-clicking on a data record in the list screen takes you to the detail screen, which displays all the fields in the selected data record.
    Generate a maintenance dialog for each view before you call the cluster maintenance (SM34). When you generate the maintenance dialog, flag the key fields which are identical in the view and its higher-level in the cluster, with the maintenance attribute S. The system fills the key fields when you go from the upper to the lower level, with the values of the data record selected in the upper level. Go to the transaction SE54 to define a view cluster.
    <b>Rewards point if useful.......</b>
    regards....
    Abhaysingh.

  • How to maintain the integrity of datbase??

    Hi,
    I wanted to know that waht are the things which must always be considerd when you maintain the integrity of database and also how to maintain the security that balance the user requirement? I am asking in general point of view.
    hope for your precious advise.

    Data integrity is normally ensured by ensuring that the schema design is properly normalized (i.e. there is 1 and only 1 place where a particular piece of information belongs) and by creating referential integrity constraints. It is also a good idea to create packages that operate on the tables and expose only these packaged procedures to app developers. When there are bugs, it is a lot easier to fix a single stored procedure than to modify every application out there. Stored procedure interfaces also simplify life for developers because they don't have to be concerned about remembering to insert all the appropriate relationships, just passing in the right parameters to the function.
    Your question on security, unfortunately, is incredibly broad. Generally, practice the principle of least privilege-- give users the absolute minimum of privileges they could need to do their job. Precisely what sort of security policies you need really depends on the application and the organization. Large US companies have things like Sarbanes-Oxley to worry about which drives a lot of requirements, systems with sensitive data (i.e. payroll) probably need more security than something like the product database.
    Justin

Maybe you are looking for