Create AFS GRID

Can anyone help me in creating AFS Grid through LSMW, we want to create Master GRIDS with two dimesnions.
What method to use ? and What Data structure ?
Thanks

Thanks Balu,
I've tried created my GRID using the IDOC method (Message type : J3AGRI and Basic Type : J3AGRI01) .
IThe dosucments get posted successfully but there is a problem, when I try to test it tthrough t-code J3AV, it show that this grid does not exist with the given valid from date that i eneterd at the sametime it shows up when I try to search it by the short teext I enetred.
Any Ideas why is this happening ?
Thanks, Ajay
the

Similar Messages

  • How can i create a grid with summary row

    Hello Professionals,
    I'm wondering how could i create a grid like the grid below, i want to create a grid with summary row,
    i have tried to create it using collapsing but it didn't work as required.
    Any suggestions?, i want to know just the starting point so i can make deep investigations.
    Thanks in Advance,

    Hi Karem,
    this can be achieved by just assigning a datatable containing the data plus some formatting of grid. Meaning there is no feature for that.
    The datatable can be filled manually or by sql query. Then you have to attach some events for updating the values ( validate after for gid item ).
    A small example for a sql query showing last month quotations and orders with summary :
    select 1 as Sort,cast(DocNum as varchar) as DocNum,DocTotal,convert(varchar, DocDate,104) from OQUT where DocDate between  DATEADD(month, -1, GETDATE()) AND GETDATE()
    UNION ALL
    Select 2 as Sort,'Summary ( Quotation ) : ',sum(DocTotal), convert(varchar,  DATEADD(month, -1, GETDATE()),104)+' - '+convert(varchar,   GETDATE(),104) from OQUT where DocDate between  DATEADD(month, -1, GETDATE()) AND GETDATE()
    UNION ALL
    select 3 as Sort,cast(DocNum as varchar) as DocNum,DocTotal,convert(varchar, DocDate,104) from ORDR where DocDate between  DATEADD(month, -1, GETDATE()) AND GETDATE()
    UNION ALL
    Select 4 as Sort,'Summary ( Order ) : ',sum(DocTotal), convert(varchar,  DATEADD(month, -1, GETDATE()),104)+' - '+convert(varchar,   GETDATE(),104) from ORDR where DocDate between  DATEADD(month, -1, GETDATE()) AND GETDATE()
    ORDER by Sort
    regards,
    Maik

  • How to create a grid

    Hi Friends,
    How to create a Grid, not a form or table.
    I want a grid to hold about 10 fields.
    so :-
    f1 v1 f2 v2
    f1 v1 f2 v2
    f--fields
    v--values
    I can get it using simple form ,but it doesnot look like a grid.
    I need the look and feel of a grid.
    Thanks!

    Hi Naveen,
    Check http://searchsap.techtarget.com/searchSAP/downloads/SAPPRESS.pdf Section "7.6 Layout managers"
    It will give you the most exhaustive description of how to build a grid in WD.
    Best tregards, Maksim Rashchynski.

  • How do you create THIS "grid" in Oracle Forms

    Hi,
    I am new to Forms. I have to develop a grid very similar to the one shown here.
    How can you create the grid in the bottom??
    I can't see using any of the standard Oracle toolbox items (like multi-record blocks) for this?
    Any help would be greatly appreciated.
    Thanks
    User 122...

    Hi Soofi,
    Appreciate your quick response.
    In the image, can you see a huge grid?
    Grid column headings are days of the week, Mon, Tue, Wed etc.
    Grid Rows also have names, like Room, Status and Rm. Type.
    Cells have various values in various colors (red, blue, green etc) and signs like ">>".
    Can you see that??
    My question is, how to create a grid like this in Oracle Forms??? We cannot do it using a multi record block.
    So, how have they done it??? The form in the image is an actual Oracle Form from a hotel reservation system.

  • Creating a grid-like layout

    Previously, I posted a problem with trying to wrap tables within tables, referencing this code.
    <!-- ... -->
    <tableLayout>
      <contents>
        <rowLayout>
          <contents>
            <bc4j:viewObjectScope name="CustomArrayDataGraphsView">
              <bc4j:rowStamp>
                <cellFormat>
                  <contents>
                    <tableLayout>
                      <contents>
                        <rowLayout>
                          <contents>
                            <link
                                  styleClass="OraHeaderSub"
                                  targetFrame="display">
                              <boundAttribute
                                              name="text">
                                <bc4j:attrValue name="AnalysisParam"/>
                              </boundAttribute>
                              <boundAttribute
                                              name="destination">
                                <bc4j:ordProperty name="url"/>
                              </boundAttribute>
                              <boundAttribute
                                              name="shortDesc">
                                <bc4j:attrValue name="Description"/>
                              </boundAttribute>
                            </link>
                          </contents>
                        </rowLayout>
                        <rowLayout>
                          <contents>
                            <bc4j:attrScope name="Graph">
                              <contents>
                                <html:object
                                             width="300"
                                             height="200">
                                  <boundAttribute
                                                  name="data">
                                    <bc4j:ordProperty name="url"/>
                                  </boundAttribute>
                                  <boundAttribute
                                                  name="type">
                                    <bc4j:ordProperty name="contentType"/>
                                  </boundAttribute>
                                  <rawText>
                                    <boundAttribute
                                                    name="text">
                                      <bc4j:attrValue name="Description"/>
                                    </boundAttribute>
                                  </rawText>
                                </html:object>
                              </contents>
                            </bc4j:attrScope>                                                                                                                                  
                          </contents>
                        </rowLayout>
                      </contents>
                    </tableLayout>
                  </contents>
                </cellFormat>
              </bc4j:rowStamp>
            </bc4j:viewObjectScope>
          </contents>
        </rowLayout>
      </contents>
    </tableLayout>
    <!-- ... -->The above code renders a single row of elements which are tables themselves. Using the <cellFormat> inside the <viewObjectScope> avoids the "new line" rendering of the internal tables of title/images. However, the internal tables do not wrap.
    This is an unfortunate side-effect of html tables. So, I need to basically make a sizeable grid (similarly to a GridLayout for all you AWT/Swing folks out there) layout that can render a specified number of columns per table, creating new rows as necessary. Something like...
    <gridLayout columns="5">
      <contents>
        <bc4j:viewObjectScope                                 name="CustomArrayDataGraphsView">
          <bc4j:rowStamp>
            <cellFormat>
              <contents>
                <!-- render something per row -->
              </contents>
            </cellFormat>
          </bc4j:rowStamp>
        </bc4j:viewObjectScope>
      </contents>
    </gridLayout>This custom layout will render a maximum of five columns of data per table row, where each column is actually a row of information from the view object.
    Is this possible using UIX components or should I start coding?
    Thanks,
    joe

    Also, displaying a bunch of "inline"ed tables would be really useful. I can't seem to do this from within a <header>, <hideShowHeader> tag, even with explicitly coding:
      <bc4j:viewObjectScope name="CustomArrayDataGraphsView">
        <bc4j:rowStamp>
          <bc4j:attrScope name="Graph">
            <contents>
                  <html:table style="display: inline">
                    <html:tr>
                      <html:td>
                        <styledText text="Title"/>
                      </html:td>
                    </html:tr>
                    <html:tr>
                      <html:td>
                        <styledText text="Image"/>
                      </html:td>
                    </html:tr>
                  </html:table>
    <!--
                  <tableLayout styleClass="display: inline" width="300">
                    <contents>
                      <rowLayout>
                        <contents>
                          <styledText text="Title"/>
                        </contents>
                      </rowLayout>
                      <rowLayout>
                        <contents>
                          <styledText text="Image"/>
                        </contents>
                      </rowLayout>
                    </contents>
                  </tableLayout>
            </contents>
          </bc4j:attrScope>
        </bc4j:rowStamp>
      <!-- render a "No Records Found" message -->
        <contents>
          <styledText
                      text="No Records Found"
                      styleClass="OraErrorText">
            <boundAttribute
                            name="rendered">
              <if>
                <comparison
                            type="lessThan">
                  <bc4j:viewObjectProperty name="estimatedRowCount"/>
                  <fixed
                         javaType="int">1</fixed>
                </comparison>
                <fixed
                       javaType="boolean">true</fixed>
                <fixed
                       javaType="boolean">false</fixed>
              </if>
            </boundAttribute>
          </styledText>
        </contents>
      </bc4j:viewObjectScope>Apparently, the header tags do something which effects the display of "inline"ed elements, like the tables in the previous example. Any suggestions? I know taking out of the header works great, but, the <hideShowHeader> functionality is particularly necessary.
    I have a time constraint on this... gotta be done by today, so if you have any other later minute suggestions besides creating a grid-like layout, let me know!
    Thanks,
    Joe

  • How to create exchange grid in web entry form...

    Hi to all,
    I am new to HFM..my query is How to create exchange grid in web entry form...i try it a lot but it didn't get the solution...
    i did this exchange grid in web grid..any one can share the document or ppt or video clip related to this..which will be helpful for me...
    Thanks

    Hi...
    Its better to create the Exchange Rates in a Data Form than in an Data Grid, so that you can easily Import and Export the form and even can feed the values easily....
    Select the POV like in Scenario-Actual,Year-Your particular year,Period-In Period Dimension do not choose any option so that it can be selected in Columns and Rows,View--the same as Period Dimension,Entity-[None],Value-<Entity Currency>,Account-Do Not select ,ICP- [ICP None],Custom 1-[None], Custom 2-[None], Custom 3-[None], Custom 4-[None]...
    In Columns Select Scenario -Actual,Period-{[Fourth Generation]},Currency-#USD(Default Currency)
    In Rows Select-Account-A#AVGRATE,View-w#Periodic,Currency-C2#EUR
    A#AVGRATE.w#Periodic.C2#CFA and so on for rest of the currencies....
    and same in the below rows for the Closing Rates---- A#CLORATE.w#Periodic.C2#EUR
    A#CLORATE.w#Periodic.C2#CFA
    This might help you.....

  • Is it possbile to create ALV Grid using Class &  without using SE51

    Is it possible to create a alv grid using Class, with out using the screen painter(SE51).

    Hi Preethi,
    It is possible to creat ALV grid using class, provided u have to create a custom control in the screen dialog.
    Try with the foll code. This is an example for flight detail.
    DATA: container TYPE REF TO cl_gui_custom_container,
          alv_con TYPE REF TO cl_gui_alv_grid.
    data : it_sflight like table of wa with header line,
           g_fieldcat type lvc_t_fcat.
    /* Paste the code the PBO
        CREATE OBJECT container
          EXPORTING
            container_name              = 'C_SPFLI'. "Specify the container name which u created in the dialog screen.
        CREATE OBJECT alv_con
          EXPORTING
            i_parent          = container.
    /* Use the foll. to dislay the report
    CALL METHOD cl_grid->set_table_for_first_display
            EXPORTING
             I_STRUCTURE_NAME              = 'SFLIGHT'
            CHANGING
              it_outtab                     = it_sflight[]
              IT_FIELDCATALOG               = g_fieldcat.
    First create the container and then place the ALV in the container and for dislaying pass the necessary table.
    Hope this will useful for u.
    Get back if u r unable to do it.
    Regards
    Router

  • Create a grid or table layout report

    <p>Hi,</p><p> Anyone knows what&#39;s the simplest way to create a grid or table report using CR4E? my report is very simple, a list of POJO and want to display it in a table.</p><p>I guess you could add outside borders to each field, is there any simple way to do it?</p>

    Hi,
    The easiest way to create a report under the form of a simple table or grid, is to follow these 5 easy steps in CR4E, once your datasource is ready :
    1) Select your fileds
    In the Field Explorer, select all the fields you want to show in your report, using the Ctrl key to select them all at once
    2) Drag and drop fields on the report
    Drag and drop the selected fields all at once from the Field Explorer onto your report, on the Body section.
    The dropped fields will automatically be aranged in a row.
    3) Position the fields Â
    While all your fields are still all selected, make sure they are positionned at the very top of the Body section, so that there will be no space between your data on the final report.
    4) Set the Fields Property to make them look like a tableÂ
    While all your fields are still all selected, go to the Property panel, and set the Border Properties from None to Single. You will also probably want to set the LeftIdentation Property to a fraction of inch so that the text doesn't start right on the border of your grid.
    5) Set the Body section size
    Adjust the height of the Body section, so that it is exactly of the size of your fields, to ensure there will be no horizontal space between your grid rows on the final report.
    At this point, you can preview your report, and you already have a table.
    Of course, from there, you can adjust the fields size (columns width), font size, color of the text, etc ... with the available Properties in the Property panel, and make your table look the way you like.
    Cheers.
    Thierry Crespo (Business Objects)

  • Creating Editable Grid Data

    I have to create a grid like form which has editable fields including text box, selects and text areas, and plain text all in each row.
    e.g. of data
    ROW 1
    COL1     COL2          COL3          COL4          COL5
    text     select box     textbox          textbox          text
    ROW 2
    COL1
    textarea
    ROW 3
    COL1     COL2          COL3          COL4          COL5
    text     select box     textbox          textbox          text
    ROW 4
    COL1
    textarea
    I tried to use the netui-data:repeater tag(given below) on a two dimentional array but that works only when you have just text in each column.
    It does not work when you have editable fields in any row or column.
    <netui-data:repeater dataSource="{pageFlow.multiArray}">
    <tr>
    <netui-data:repeater dataSource="{container.item}">
         <td><netui:label value="{container.item}" /></td>
    </netui-data:repeater>
    </tr>
    </netui-data:repeater>
    Example data to be displayed is given below
    recordSetArray[0][0] =      text     - ROW 1
    recordSetArray[0][1] =      text     - ROW 1
    recordSetArray[0][2] =     text     - ROW 1
    recordSetArray[0][3] =     text     - ROW 1
    recordSetArray[0][4] =     selectbox - ROW 1
    recordSetArray[0][5] =     textbox     - ROW 1
    recordSetArray[0][6] =     textbox     - ROW 1
    recordSetArray[0][7] = textbox     - ROW 1
    recordSetArray[0][8] =     selectbox - ROW 1
    recordSetArray[0][9] = selectbox - ROW 1
    recordSetArray[0][10] = textarea - ROW 2
    recordSetArray[1][0] = text     - ROW 3     
    recordSetArray[1][1] = text     - ROW 3
    recordSetArray[1][2] = text     - ROW 3     
    recordSetArray[1][3] = text - ROW 3
    recordSetArray[1][4] = selectbox- ROW 3
    recordSetArray[1][5] = textbox     - ROW 3
    recordSetArray[1][6] = textbox     - ROW 3
    recordSetArray[1][7] = textbox     - ROW 3
    recordSetArray[1][8] = selectbox- ROW 3
    recordSetArray[1][9] = selectbox- ROW 3
    recordSetArray[1][10] =textarea - ROW 4
    recordSetArray[2][0] = text     - ROW 5     
    recordSetArray[2][1] = text - ROW 5
    recordSetArray[2][2] = text - ROW 5
    recordSetArray[2][3] = text - ROW 5
    recordSetArray[2][4] = selectbox- ROW 5
    recordSetArray[2][5] = textbox     - ROW 5
    recordSetArray[2][6] = textbox - ROW 5
    recordSetArray[2][7] = textbox - ROW 5
    recordSetArray[2][8] =     selectbox- ROW 5
    recordSetArray[2][9] = selectbox- ROW 5
    recordSetArray[2][10] =textarea - ROW 6
    How can this be accomplished?
    Thanks
    Mich.

    Chief,
    Yup that data grid is most buggy. I think most people expect
    it to work as well an Excel spreadsheet, and it's not quite there
    in Flex 2. I'm not sure if it is any better in 3.
    I think I am giving up trying to make mine work until they
    fix it.
    I have some of the same issues as you with focus and tab
    order.
    Mathias

  • SAP AFS Grids in BOM

    Hello Everyone,
    I had a peculiar problem here when I am using AFS Grids. I have not defined certain characteristics values for a specific grid. But the same appears when I am maintaining the deviation quantities in the Bill of material. Is there any reason why this is happening? Is there any way to prevent this? Any help on this is greatly appreciated.
    Sincerely,
    Aji Kurian Mani

    Hello,
    Could you please provide more details about the issue ? Also, providing the grid values of the finished products and components would be helpful. I've been working on many AFS releases and don't see any big issues as of AFS 5.0.
    Regards,
    Mehdi

  • Steps to create ALV grid

    Hi All
    I tried created ALV grid control,but facing error in the declaration of the data variables.
    Please help ..where do we declare data for internal table and reference variables for
    container and grid in the program.Acc. to its in the TOP include part.But its giving error
    that data not accessible.
    Thanks in advance..
    Abhinandan Kumar

    Hi,
    Find the code below.
    REPORT ZTESTQ.
    TABLES: t001.
    *INTERNAL TABLE
    DATA: gt_001 TYPE STANDARD TABLE OF t001.
    *NAME OF CUSTOM CONTAINER ADDED ON SCREEN
    DATA : gd_container_alv TYPE scrfname VALUE 'ALV_CON'.
    *ALV GRID CONTAINER INSTANCE
    DATA : go_cus_alv_container TYPE REF TO cl_gui_custom_container.
    DATA : go_grid TYPE REF TO cl_gui_alv_grid.
    *FIELD CATALOG
    DATA : gt_fieldcat TYPE lvc_t_fcat,
           gs_fieldcat TYPE lvc_s_fcat.
    *LAYOUT
    DATA : gs_layout TYPE lvc_s_layo.
    *Class Definition
    CLASS gcl_alv DEFINITION.
      PUBLIC SECTION.
        METHODS populate_tab.
        METHODS create_field_catalog.
        METHODS create_layout.
        METHODS display_alv.
        METHODS refresh_alv.
      PRIVATE SECTION.
       DATA : bukrs TYPE t001-bukrs.
    ENDCLASS.
    *Class implementation
    CLASS gcl_alv IMPLEMENTATION.
      METHOD populate_tab.
        SELECT * FROM t001
                        INTO TABLE gt_001.
      ENDMETHOD.
      METHOD create_field_catalog.
        gs_fieldcat-col_pos = '1'.
        gs_fieldcat-fieldname = 'BUKRS'.
        gs_fieldcat-tabname = 'gt_001'.
        gs_fieldcat-coltext = 'Company Code'.
        APPEND gs_fieldcat TO gt_fieldcat.
        gs_fieldcat-col_pos = '2'.
        gs_fieldcat-fieldname = 'BUTXT'.
        gs_fieldcat-tabname = 'gt_001'.
        gs_fieldcat-coltext = 'CC Text'.
        APPEND gs_fieldcat TO gt_fieldcat.
      ENDMETHOD.
      METHOD create_layout.
        gs_layout-grid_title = 'Company Code Report'.
        gs_layout-zebra = 'X'.
      ENDMETHOD.
      METHOD display_alv.
       CALL METHOD GO_GRID->SET_TABLE_FOR_FIRST_DISPLAY
         EXPORTING
            I_DEFAULT                     = 'X'
            IS_LAYOUT                     = gs_layout
         CHANGING
            IT_OUTTAB                     = gt_001
            IT_FIELDCATALOG               = gt_fieldcat
         EXCEPTIONS
            INVALID_PARAMETER_COMBINATION = 1
            PROGRAM_ERROR                 = 2
            others                        = 3.
      ENDMETHOD.
      METHOD refresh_alv.
        REFRESH gt_001.
        SELECT * FROM t001
                 INTO TABLE gt_001.
        CALL METHOD GO_GRID->REFRESH_TABLE_DISPLAY.
      ENDMETHOD.
    ENDCLASS.
    DATA : go_alv TYPE REF TO gcl_alv.
    START-OF-SELECTION.
      CREATE OBJECT go_alv.
      CALL METHOD go_alv->populate_tab.
      CALL SCREEN 0100.
    *&      Module  PBO_100  OUTPUT
          text
    MODULE PBO_100 OUTPUT.
    *Set the GUI status
      SET PF-STATUS '0100'.
    *Create the container to be placed in the screen
      CREATE OBJECT GO_CUS_ALV_CONTAINER
        EXPORTING
          CONTAINER_NAME              = gd_container_alv.
    *Create the ALV Grid Container within the parent container
    CREATE OBJECT GO_GRID
       EXPORTING
          I_PARENT          = go_cus_alv_container.
      CALL METHOD go_alv->create_field_catalog.
      CALL METHOD go_alv->create_layout.
      CALL METHOD go_alv->display_alv.
    ENDMODULE.                 " PBO_100  OUTPUT
    *&      Module  PAI_100  INPUT
          text
    MODULE PAI_100 INPUT.
      CASE sy-ucomm.
        WHEN 'REFRESH'.
          CALL METHOD go_alv->refresh_alv.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " PAI_100  INPUT

  • Create multiple grid in a worksheet

    my smartivew version is 11.1.2.2, this relase should support to create multiple grid in a worksheet.
    but when i try to add the second grid, i only see the 3 options:
    "clear sheet contents and POV"
    "Reuse sheet contents only"
    "Reuse sheet contents and POV"
    not able to see the fourth option.
    i do have selected multiple cells.
    where am i wrong?

    my smartivew version is 11.1.2.2, this relase should support to create multiple grid in a worksheet.
    but when i try to add the second grid, i only see the 3 options:
    "clear sheet contents and POV"
    "Reuse sheet contents only"
    "Reuse sheet contents and POV"
    not able to see the fourth option.
    i do have selected multiple cells.
    where am i wrong?

  • Creating a grid layout

    Hi All,
    I am completely new to ADF UI part. I am looking for creating a grid layout of static/dynamic image content. just like the one that is there in suppose 'ebay search'.
    can somebody please tell me about how to go about this.
    Regards,
    ND

    For this you can use an af:table and put an af:image in a column.
    Check out this blog http://jobinesh.blogspot.com/2010/06/decorate-ui-with-view-row-attributes.html for a start.
    Timo

  • Its possible to create a grid like this?!?!?

    hello to all, im new in Mii and i have a sql statement to populate the table but i want to know if it is possible to create a grid like the image in this link :
    http://img17.imageshack.us/img17/3021/gridx.jpg
    and then put the information that comes from the sql in the blank spaces
    regards and thanks for the help in advance
    Mário

    hello, correct me if i say something wrong of yours steps:
                1) Create a Doc action block with three columns like: Shift,Quantity,Scrap......
                       and then i put another field Total....correct?!?! or not?
                2) Add SQLQuery Action block and configure it with already created SQL Query.
                       the result of my SQLQuery comes like this...
                       Yield                 Scrap
                       5000                 1100
                        this is the result of this query:
                       select sum(max(yieldqty)), sum(max(scrapqty))
                       from z_event
                       where linenumber= '[Param.1]' and shiftnumber = '[Param.2]'
                        and (eventtimestamp >= to_date('[Param.3] 00:00:00', 'dd.mm.YYYY hh24:mi:ss'))
                        and (eventtimestamp <= to_date('[Param.4]', 'dd.mm.YYYY hh24:mi:ss'))
                        group by ordernumber
                       its better that the shiftnumber comes to???if yes the result comes like this:
                         Yield         Scrap     ShiftNumber
                          3720          35                  1
                         30878         117                  1 
                3) Put a repeater action block below that and configre with XPATH.
                4)Add a Row action block,configure with Doc.output and map the each column from the repeater.
                5) Also add other row with the total and take the sum of the quantity and scrap.
                how to make the SUM?!?! There isnt SUM Function...
                 like this Total = Total + Repeater_0.Output{/Row/MAX_YIELDQTY_}    ???
    regards and sorry for all this questions
    matinha

  • How to create an grid of buttons.

    Im trying to create a grid of buttons but for some reason i can see only 2 of them at the same time, but i know they are 9 on stage cause i trace numChildren
    Currently i have this:
    public class Main extends MovieClip
                        private var myBtn:SimpleButton = new SimpleButton();
                        private var img1:Bitmap=new Bitmap(new active_MouseOut());
                        private var img2:Bitmap=new Bitmap(new active_MouseOver());
                        private var img3:Bitmap=new Bitmap(new notActive_MouseOut());
                        private var img4:Bitmap=new Bitmap(new notActive_MouseOver());
                        private var myArrayContainer:Array = new Array();
                        public function Main()
                                  for (var i :int = 0; i < 3; i++)
                                            for (var j:int = 0; j < 3; j++)
                                                      myArrayContainer[j] = new MyButton(img1, img2, img3, img4)
                                                      myArrayContainer[j].x = 0 + i * (myArrayContainer[j].width + 10)
                                                      myArrayContainer[j].y = 0 + j * (myArrayContainer[j].height + 10)
                                                      this.addChild(myArrayContainer[j])
                                  trace(numChildren)
    active_MouseOut, active_MouseOver, notActive_MouseOut and notActive_MouseOver are simple bitmap Images that have AS linkage
    And MyButton class is this
    package
              import flash.display.Bitmap;
              import flash.display.MovieClip;
              import flash.display.SimpleButton;
              import flash.events.MouseEvent;
              import flash.utils.getDefinitionByName;
              public class MyButton extends MovieClip
                        private var myBtn:SimpleButton = new SimpleButton();
                        private var image1:Bitmap
                        private var image2:Bitmap
                        private var image3:Bitmap
                        private var image4:Bitmap
                        public function MyButton(active_OutState:Bitmap, active_OverState:Bitmap, notActive_OutState:Bitmap, notActive_OverState:Bitmap)
                                  image1 = active_OutState;
                                  image2 = active_OverState;
                                  image3 = notActive_OutState;
                                  image4 = notActive_OverState
                                  myBtn.upState = image1;
                                  myBtn.overState = image2;
                                  myBtn.downState = myBtn.upState;
                                  myBtn.hitTestState = myBtn.overState;
                                  addChild( myBtn );
                                  myBtn.addEventListener(MouseEvent.CLICK, onClick);
                        private function onClick( ev:MouseEvent ):void
                                  myBtn.upState = image3;
                                  myBtn.overState = image4;
    I also want to ask : Can I get the bitmapData to load in the MyButton class with this
    private var image1:Bitmap
    public function MyButton(mouseState:String)
                                   image1_Data = Class(getDefinitionByName( mouseState ));
                                  image1 = new Bitmap( image1_Data() )
    and in the Main Class to send the name of the image in the library
    myArrayContainer[j] = new MyButton( "notActive_MouseOver" )
    or I can do this only in/from the Document Class
    cause Im trying and it is giving me this
    Error #1065: Variable notActive_MouseOver() is not defined.

    well Im doing the button-making in the MyButton class cause im trying to create 9 buttons(and every button has a different image and that image has 4 states(clickable-Up, clickable-Over, notClickable-Up, notClickable-Over  )).
    And this is the only way i figured out how to do it without writing alot of code ()

Maybe you are looking for

  • Three Point Edit not working correctly :(

    Hi there, first of all I'd like to say thank you Adobe for listening to your users. And I hope this one gets noticed right away....: It appears that 3 point editing ist not working correctly. Right now I'm editing a video and I heavily rely on 3 poin

  • Coloring a Pattern

    Hi, I just used a Basic Graphic_Dots pattern in a piece I'm working on. I can't for the life of me figure out how to color the polka dots? I would really like the dots to NOT be black.

  • Photoshop Elements 8 Organiser crashes on startup

    Hi, I have had a stable installation of PE8 for over a year but today when I came to run the organiser it crashed immediately on startup and has resolutely continued to do so whatever I've tried.  I de-installed it (and Premiere Elements 8) and have

  • Smart Forms Page Problem

    Hi, I am having a small problem in smartforms .My form consist of two pages and i created two pages but it is showing only one page i.e, first page only but it is not showing second page y? I maintained page attributes like next page is page 2 and in

  • Where can I download oracle terminal?

    Hi, Where can I download oracle terminal? Please help Amy