How to use a class in Flash

I'm trying to use a class (LoadSwf.as) in Flash. The code is
listed at the bottom. Here's my code in Flash:
import LoadSwf
var myLoader:LoadSwf=new LoadSwf()
addChild(myLoader)
The file being imported (Login1.swf) contains a very simple
ComboBox. When it is loaded into Flash the ComboBox fails. Why is
this happening? Thanks!

I think you have to add the loader to the display list after
the loader completes:

Similar Messages

  • How to use check box in flash 8?

    How to use check box in flash 8?

    If you want it to happen when someone clicks the checkbox, then you need to add a listener for that event.
    var cbListener:Object = new Object();
    cbListener.click = function (evt:Object) {
        if (cb.selected) {
              gotoAndStop(2);
    cb.addEventListener("click", cbListener);
    (Note: "cb" and "cbListener" are names that were made up for this example.  They could be anything you want to name them)

  • How to use TableSorter class with DefaultTableModel

    Hi Friends
    Please tell me how to use TableSorter Class which is in the Java. Tutorials with DefaultTableModel.
    i saw in a thread there it was given that we have to pass the DefaultTableModel to the TableSorter Class.
    I tried to use like that. But i am getting Error Like Exception occurred during event dispatching:
    I am posting the part of Code where i use the DefaultTableModel
         private void displayavailablity(String selectedAuthor)
                   try
                        Vector columnNames = new Vector();
                        Vector data1 = new Vector();
                        String bname,bauthor,bcategory,bref1,bavail,bid;
                        int bref,mid,num;
                        rs = st.executeQuery("SELECT BId,BName,BAuthorName,BAuthorandPublisher,BCat FROM Books where BAuthorandPublisher='" +selectedAuthor+"'");     
                        ResultSetMetaData md= rs.getMetaData();
                        int columns =md.getColumnCount();
                        String booktblheading[]={"NUMBER","BOOK NAME","AUTHOR","CODE","CATEGORY"};
                        for(int i=1; i<= booktblheading.length;i++)
                             columnNames.addElement(booktblheading[i-1]);
                        while(rs.next())
                             Vector row = new Vector(columns);
                             for(int i=1;i<=columns;i++)
                                  row.addElement(rs.getObject(i));
                             data1.addElement(row);
                             //System.out.println("data is:"+data);
                        ((DefaultTableModel)table.getModel()).setDataVector(data1,columnNames);
                        TableSorter sorter = new TableSorter((DefaultTableModel)table.getModel());
                        rs.close();
                   catch(SQLException ex)
                        System.out.println("ERROR IS HERE");
                        ex.printStackTrace();
         }Please help me on this issue Otherwise Please give me some Sample coding to implement this sorting. with DefaultTableModel
    Thank you for your service
    Cheers
    Jofin

    I don't know about any TableSorter class, but I suppose you mean javax.swing.table.TableRowSorter.
    The TableRowSorter is to be attached to the JTable, not to the data model. Here's a cut'n'paste from the last time I used it:
    RowSorter<TableModel> sorter = new TableRowSorter<TableModel>(tableModel);
    myTable.setRowSorter(sorter);
    And heres from the JDK1.6 documentation:
    TableModel myModel = createMyTableModel();
    JTable table = new JTable(myModel);
    table.setRowSorter(new TableRowSorter(myModel));
    Check out http://java.sun.com/javase/6/docs/api/javax/swing/table/TableRowSorter.html. I find it to be good documentation.

  • How to use multiple classes for each form

    Hi,
    I have created two forms using screen painter and now i want to use different classes for these two forms .
    I have declared the Sbo Connection in main class i.e. Set Application ,Connection Context() but while connecting to other classes
    for executing the code for that form SAP is not connected to that class.How to use multiple classes functionality i don't able to
    do that.Please provide some sample codes for that as it will be more helpful for me to understand.
    Thanks & Regards,
    Amit

    Hi Amit,
    In fact, its more advisable to use separate classes for every form that you use.  Have one common class, say, for eg., clsMain.cs which has all the connection and connectivity to other classes, wherein, the menu event and item event of this main class, will just be calling the menu / item event of other classes.
    The individual functionality of the child classes will be called from the item / menu event of the respective classes.
    Item event in clsMain.cs will be as below.
    private void oApplication_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
                SAPbouiCOM.Form oForm;
                BubbleEvent = true;
                try
                    if ((pVal.FormTypeEx == "My_Form1Type") && (pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD))
                        oForm = oApplication.Forms.GetForm("My_FormType", pVal.FormTypeCount);
                        NameSpace.Repots.ClsForm1.ClsForm1_ItemEvent(oApplication, oCompany, oForm, ref pVal, ref BubbleEvent);
                    if ((pVal.FormTypeEx == "My_Form2Type") && (pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD))
                        oForm = oApplication.Forms.GetForm("My_FormType", pVal.FormTypeCount);
                        NameSpace.Repots.ClsForm1.ClsForm2_ItemEvent(oApplication, oCompany, oForm, ref pVal, ref BubbleEvent);
    Now, in the individual classes, you can have their respective item events, which will be called from the main class, and the respective functionalities will occur.
    Hope this helps.
    Regards,
    Satish.

  • How to use ArraySequence class???

    Hi ,
    I'm a beginner in programing with java.. I found some troubles with it
    the trouble is HOW TO USE ArraySequence class,
    I need to read a word from the user and broken it down and store each letter in a rank of the ArraySequence,,
    I found an example that breaks a string into words ,,But I never found
    examples that fill an ArraySequence with a built-in types like int or double or char
    Can anybody please help me??!!!!
    some functions of ArraySequence take as parameter OR return (position ) class can you please tell me what does this class do??
    SORRY FOR MY LANGUAGE ,,I'M NOT NATIVE SPEAKER

    There is no ArraySequence class in the API.

  • How to use the class CL_CTMENU with the method DISABLE_FUNCTIONS

    Hi Friends,
    How to de-activate some functions in the Menu bar?
    Eg: - Sales document
                 Create
                 Change
                 Display
    I want to de-activate "Change"
    In other words: - How to use the class CL_CTMENU with the method DISABLE_FUNCTIONS in my program.
    Regards,
    Hari
    Edited by: Bhatlapenumarthy Hari Krishna on Jun 9, 2008 5:22 PM

    Krishna,
    It is not possible to deactivate the CHANGE option in themenu bar using the method disable_functions of cass CL_CTMENU. This method allows you to deactivate only the function codes of the CONTEXT MENU, which is available only when u press the left mouse button.
    U can use the SET PF-STATUS 'XXX' EXCLUDING fcodes option to disable the CHANGE.
    *****Reward points if useful
    Regards,
    Kiran Bobbala

  • How to use StreamTokenizer class ?

    i want to use StreamTokenizer class in my program so that when i read from a file i want to make tokens of words present in the file, but i dont know how to use this class in my program, as i didnt find any example which shows how to use StreamTokenizer class. Can nebody knows how to use it in a program ?

    Hi,
    here's some sample code of how to use the StreamTokenizer.
    in = new StreamTokenizer(
    new BufferedReader(
    new FileReader(fname)));
    You can iterate through the file with:
    while(in.nextToken() != StreamTokenizer.TT_EOF)
    when you call nextToken() ttype is filled with the type of token, you can't test ttype for what kind of token,
    test for word:
    if (in.ttype == StreamTokenizer.TT_WORD)
    test for word:
    if (in.ttype == StreamTokenizer.TT_WORD)
    I think you can grasp the rest in javadoc

  • How to use assistance class in WD4A?

    Hi SDN,
    Can you please tell me How to use assistance class in WD4A?
    Regards,
    Rahul

    Create a class that inherits the class cl_wd_component_assistance. By default, it will have the method if_wd_component_assistance~get_text, which is used to retrieve text elements defined in the class. You can also add any other methods to it, like accessing your data etc.
    In your wd4a component, in the main component overview screen, there will be a tetxfield for assistance class. define your class name there. You do not have to instantiate it separately. You can access the class methods using the object wd_assist, which will be created globally in your component.
    Regards
    Nithya

  • Can u  tell me any of you how to use Date class

    Can u tell me any of you how to use Date class. Please send me the source code.

    People won't send you the source code.
    Ask specific questions. You are very vague.
    Tell me how to build.

  • How to use application class reference in the controller methods of BSP

    Hi,
    I have created a bsp application and also created an application class and assigned it to the application class. In the application class, I have created attribute TEXT type string(public and instance parameter).
    In the controller let's say main.do, I am trying to give a value to to the text by adding the following code.
    application->text = 'test'.
    I am getting syntax error saying field 'text' is unknown. It is not contained in one of the specified tables nor defined by DATA statement. 
    Please can someone let me know how to use the application class in the coding with an example. I couldn't find how exactly this has to be reference. Please help.
    Best regards
    Siva

    Hi,
    if you are having main controller and sub-controller then you may need to use below coding to use application class reference.
    *Data declaration
      DATA:  obj_cntrl        TYPE REF TO cl_bsp_controller2,
             obj_sub_cntrl   TYPE REF TO z_cl_sub_cntl,
             application TYPE REF TO z_cl_application.
    *Get the controller
      CALL METHOD obj_main_cntrl->get_controller   "obj_main_cntrl is the object of main controller
        EXPORTING
          controller_id       = 'SUB'   "Controller ID
        RECEIVING
          controller_instance = obj_cntrl  .
      obj_sub_cntrl ?= obj_cntrl  .
      application ?= obj_sub_cntrl ->application.
    or simply use below code in your controller method.
      application ?= me->application.
    Thnaks,
    Chandra

  • How to use outside Class in packed library plugins

    I have found the very useful article from Michael Lacasse (https://decibel.ni.com/content/docs/DOC-19176) on how to use packed library as plugins. This approach makes the most sense when you try to distribute additional code after your executable has already been installed.
    My problem is that when I try to use a class from the main code in a plugin, the plugins won't work anymore. Ideally, I would have liked the parent plugin-interface to inherit from a class used in the main code, or using the class as an input parameter of the plugin would be the next best thing.
    I got several errors, some at execution time (#1448) or at edit time ("This VI does not match other VIs in the method: connector pane terminal(s)"). I have settled to use clusters to pass data to the plugins.
    My question is: Is it possible to use a class defined in the main code in a packed-project-library, either inherited or as a parameter? If yes, do you have any example?
    Marc Dubois
    HaroTek LLC
    www.harotek.com
    Solved!
    Go to Solution.

    I should point out that it's important to use the copy THAT'S IN THE PPL, *-NOT-* the copy from your source.
    It will compile if you mix them together, but they aren't the same object, and won't share data.
    You should never refer to your source code for the class, except to build the PPL.
    (Consider using a separate project, to avoid temptation).
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • How to use Object Class:orclDbServer in OID

    Not sure if i have posted in the correct forum, I am quite new to OID
    I am planning to use orclDbServer Object Class, but not sure how to use, i have searched in Google, and Oracle Documentation, there are so little information about this, there are only:
    Object Class: orclDbServer
    Description: Defines the attributes for database service entries
    Attributes: orclNetDescName, orclVersion
    Below is the ldif file i created for add one entry with object class orclDBServer:
    dn: cn=orclDBServer_test, cn=OracleContext, dc=ldapcdc, dc=lcom
    changetype: add
    objectclass: top
    objectclass: orclDBServer
    cn: orclDBServer_test
    orclNetDescName: (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=10.182.114.121)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = oh112)))
    after i use below command to add this entry:
    ldapadd -h localhost -p 389 -D "cn=orcladmin" -w welcome1 -f test_add.ldif
    then use ldapsearch to search:
    ldapsearch -h localhost -p 389 -b "dc=lcom" "objectclass=orclDBServer"
    the result is like below:
    cn=orclDBServer_test, cn=OracleContext, dc=ldapcdc, dc=lcom
    cn=orclDBServer_test
    orclnetdescname=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=10.182.114.121)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = oh112)))
    objectclass=top
    objectclass=orclDBServer
    objectclass=orclService
    It seems it added a line for me:
    objectclass=orclService
    Is there anything wrong with my ldif file when i want to use orclDbServer?
    Edited by: ening on Jan 5, 2010 9:31 PM

    Hi,
    if you are having main controller and sub-controller then you may need to use below coding to use application class reference.
    *Data declaration
      DATA:  obj_cntrl        TYPE REF TO cl_bsp_controller2,
             obj_sub_cntrl   TYPE REF TO z_cl_sub_cntl,
             application TYPE REF TO z_cl_application.
    *Get the controller
      CALL METHOD obj_main_cntrl->get_controller   "obj_main_cntrl is the object of main controller
        EXPORTING
          controller_id       = 'SUB'   "Controller ID
        RECEIVING
          controller_instance = obj_cntrl  .
      obj_sub_cntrl ?= obj_cntrl  .
      application ?= obj_sub_cntrl ->application.
    or simply use below code in your controller method.
      application ?= me->application.
    Thnaks,
    Chandra

  • How to use URL class instead of Socket

    Hi all. I am developing a small inventory control system for a warehouse.
    I am suing a Java desktop application that connects to a servlet via Internet.
    I have been searching the net how to use JSSE for my application since i am new to secure sockets and JSSE.
    Since I havent implemented security In my current system yet, i am using URLConnection conn = url.openConnection(); to connect to a servlet.
    However, in a good tutorial that I found about JSSE, sockets are used directly for connection, insted of URLCOnnection. They use the code like this: SSLSocketFactory sf = sslContext.getSocketFactory();
    SSLSocket socket = (SSLSocket)sf.createSocket( host, port ); Since, using sockets is overly complex for me, I want to make use of the URLConnection class instead to keep it simple.
    Could anyone please tell me how to make use of the URLConnection class to establish secure http connection.
    by the way, the tutorial is here:
    http://www.panix.com/~mito/articles/articles/jsse/j-jsse-ltr.pdf
    thanks.

    Here you go. The following code snippet allows you post data to http URL. If you have to do the same to https URL , please let me know.
    OutputStream writeOut = null;
    HttpURLConnection appConnection = null;
    URL appUrlOpen = null;
    //data to be posted.
    String data = "This is the test message to post";
    byte[] bytesData = this.data.getBytes();
    appUrlOpen = new URL(""Your Servlet URL");
    appConnection = (HttpURLConnection) appUrlOpen.openConnection();
    appConnection.setDoOutput(true);
    appConnection.setDoInput(true);
    appConnection.setUseCaches(false);
    appConnection.setInstanceFollowRedirects(false);
    appConnection.setRequestMethod("post");
    appConnection.setRequestProperty("Content-Type","application/text");
    appConnection.setRequestProperty("Content-length", String.valueOf(bytesData.length));
    writeOut=appConnection.getOutputStream();
    writeOut.write(bytesData);
    writeOut.flush();
    writeOut.close();
    String inputLine;
    StringBuffer sb = new StringBuffer();
    reader = new BufferedReader(new InputStreamReader(appConnection.getInputStream()));
    char chars[] = new char[1024];
    int len = 0;
    //Write chunks of characters to the StringBuffer
    while ((len = reader.read(chars, 0, chars.length)) >= 0)
    sb.append(chars, 0, len);
    System.out.println("Response " + sb.toString());
    reader.close();
    sb=null;
    chars = null;
    responseBytes = null;
    ******************************************************************************************

  • How to use global classes and display returned data?

    Hello experts,
    I have the following code in a program which accesses a global class (found in the class library). It executes one it's static methods. What I would like to do is to get hold of some elements of the returned data. How do I do that please?
    Your help is greatly appreciated.
    ***Use global class CL_ISU_CUSTOMER_CONTACT
    DATA: o_ref TYPE REF TO CL_ISU_CUSTOMER_CONTACT.
    DATA: dref_tab LIKE TABLE OF O_ref.
    DATA: begin OF o_ref2,
    CONTACTID               TYPE CT_CONTACT,
    P_INSTANCES             TYPE string,
    P_CONTEXT               TYPE CT_BPCCONF,
    P_CONTROL               TYPE ISU_OBJECT_CONTROL_DATA,
    P_DATA                  TYPE BCONTD,         "<<<=== THIS IS A STRUCTURE CONTAINING OTHER DATA ELEMENTS
    P_NOTICE                TYPE EENOT_NOTICE_AUTO,
    P_OBJECTS               TYPE BAPIBCONTACT_OBJECT_TAB,
    P_OBJECTS_WITH_ROLES    TYPE BAPIBCONTACT_OBJROLE_TAB,
    end of o_ref2.
    TRY.
        CALL METHOD CL_ISU_CUSTOMER_CONTACT=>SELECT  "<<<=== STATIC METHODE & PUBLIC VISIBILITY
          EXPORTING
           X_CONTACTID = '000001114875'   "Whatever value here
          RECEIVING
            Y_CONTACTLOG = o_ref
    ENDTRY.
    WHAT I WOULD LIKE TO DO IS TO MOVE o_ref TO o_ref2 and then display:
    1) P_DATA-PARTNER
    2) P_DATA-ALTPARTNER
    How can I do this please?

    I now have the following code. But when I check for syntax I get different error. They are at the end of the list.
    Here is the code the way it stands now:
    ================================================
    ***Use global class CL_ISU_CUSTOMER_CONTACT
    DATA: oref TYPE REF TO CL_ISU_CUSTOMER_CONTACT.
    DATA: dref_tab LIKE TABLE OF oref.
    DATA: begin OF oref2,
    CONTACTID TYPE CT_CONTACT,
    P_INSTANCES TYPE string,
    P_CONTEXT TYPE CT_BPCCONF,
    P_CONTROL TYPE ISU_OBJECT_CONTROL_DATA,
    P_DATA TYPE BCONTD,      "THIS IS A STRUCTURE CONTAINING OTHER DATA ELEMENTS
    P_NOTICE TYPE EENOT_NOTICE_AUTO,
    P_OBJECTS TYPE BAPIBCONTACT_OBJECT_TAB,
    P_OBJECTS_WITH_ROLES TYPE BAPIBCONTACT_OBJROLE_TAB,
    end of oref2.
    TRY.
    CALL METHOD CL_ISU_CUSTOMER_CONTACT=>SELECT     " STATIC METHODE & PUBLIC VISIBILITY
    EXPORTING
    X_CONTACTID = '000001114875' "Whatever value here
    RECEIVING
    Y_CONTACTLOG = oref
    ENDTRY.
    field-symbols: <FS1>      type any table,
                   <wa_oref2> type any.
    create data dref_tab type handle oref.   " <<===ERROR LINE
    assign dref->* to <FS1>.
    Loop at <FS1> assigning  <wa_oref2>.
    *use <wa_orfe2> to transfer into oref2.
    endloop.
    write: / 'hello'.
    =========================================
    Here are the errors I get:
    The field "DREF" is unknown, but there is a field with the similar name "OREF" . . . .
    When I replace itr by OREF I get:
    "OREF" is not a data reference variable.
    I then try to change it to dref_tab. I get:
    "DREF_TAB" is not a data reference variable.
    Any idea? By the way, must there be a HANDLE event for this to work?
    Thanks for your help.

  • How to use java class in pl/sql

    Hai Guys,
    here is my java class:
    import java.io.*;
    public class ListFiles
    public static void main (String[] args)
    File file=new File("C:\\");
    File[] files=file.listFiles();
    for(int fileInList=0; fileInList<files.length; fileInList++ )
         System.out.println(files[fileInList].toString() );
    i want to use this class in pl/sql, i am new about this topic my concern are following
    how to load java class
    how to use in pl/sql
    Guys i'll be great-full to you if you could help me out or share link or document .

    First Read https://forums.oracle.com/forums/ann.jspa?annID=432
    Check this link...
    1. http://www.devshed.com/c/a/Oracle/Extending-PLSQL-with-Java-Libraries-concluded/
    2. calling java from pl/sql in oracle 10g?its very urgent.
    3. http://qamarsyed.blogspot.com/2010/07/calling-java-from-plsql-inside-oracle.html
    4. http://home.c2i.net/toreingolf/oracle/java_and_plsql.htm
    Hope this helps...
    If someone response is helpful or correct, please mark it accordingly.

Maybe you are looking for