The struggle of creating a Custom ClassLoader for Native libraries

Hello Everyone,
I'm having a really hard time writing and using my own ClassLoader in a Java Applet.
Context :
As the this link shows - http://codethesis.com/tutorial.php?id=1 - loading and especially unloading native libraries through Java requires defining our own ClassLoader, and use it to instantiate a class loading a library. When the class using native libraries has finished execution, setting all references to the classloader and calling the garbage collector will cause the native library to be unloaded. The class to load within the custom classloader is thus read byte after byte from the jar and defined using the Classloader.defineClass(..) function. So that's what I did. But I've got two problems.
Problem 1 :
On one single machine over 15 tested, the magic number of a given class read from the Jar using Applet.class.getResourceAsStream(classname) takes a value different from CAFEBABE and the defineClass function then throws an "Incompatible magic value" exception (see below). The workaround I found is to force the first 4 bytes of the byte array read from the class with CAFEBABE. But I still would like to understand why it takes a different value on this machine.
Exception in thread "thread applet-MyApplet.class-1" java.lang.ClassFormatError: Incompatible magic value 409165630 in class file Reader
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at NativeClassLoader.findClass(Unknown Source)
Problem 2 :
On windows, the NativeClassLoader works perfectly, but on Linux, I'm getting a java.lang.VerifyError (see below).
Code is compiled with java 1.6.0_06 on windows XP. I tried to remove everything related to native code (remove .so load), the same error is raised.
java.lang.VerifyError: (class: Reader, method: <clinit> signature: ()V) Illegal instruction found at offset 1
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
Code :
NativeClassReader (custom) :
public class NativeClassLoader extends ClassLoader {
    //the unique instance of the NativeClassLoader
    private static NativeClassLoader instance;
    private NativeClassLoader () {
        super(NativeClassLoader.class.getClassLoader());
     * Get the Singleton instance of the class
    public static NativeClassLoader getInstance () {
        if (instance == null)
            instance = new NativeClassLoader();
        return instance;
    public static void dispose () {
        instance = null;
     * Load a class using its full java name (prefixed with package)
    public Class findClass (String theName) {
        byte[] b = null;
        try {
            b = loadClassDataFromJar(theName);
            Class clazz = defineClass(theName, b, 0, b.length);
            resolveClass(clazz);
            return clazz;
        } catch (Exception e) {
            return null;
     * Gets the bytes of a class file stored in the current jar using
     * its full class name
    public byte[] loadClassDataFromJar (String theName)
                                 throws Exception {
        String filename = "/" + theName.replace('.', '/') + ".class";
        InputStream is = SawsApplet.class.getResourceAsStream(filename);
        BufferedReader br = new BufferedReader(new InputStreamReader(is));
        //compute file size
        Vector vChars = new Vector();
        int c;
        while ((c = br.read()) != -1)
            vChars.add(new Byte((byte) c));
        //fill in byte array with chars read from the buffer
        byte[] buff = new byte[vChars.size()];
        //workaround for a bug on one (some) Vista machine(s)
        //force magic number to CAFEBABE instead of 18635F3E
        if (vChars.size() > 3) {
            buff[0] = (byte) 0xCA;
            buff[1] = (byte) 0xFE;
            buff[2] = (byte) 0xBA;
            buff[3] = (byte) 0xBE;
        for (int i = 4; i < vChars.size(); ++i)
            buff[i] = ((Byte) vChars.get(i)).byteValue();
        return buff;
}Reader (loading native libary) :
public class Reader {
   static {
     System.loadLibrary("myLib");
    public static native String getData();
}Main :
    NativeClassLoader cLoader = NativeClassLoader.getInstance();
    Class clazz = cLoader.findClass("Reader"); // ClassFormatError thrown here
    Object reader = clazz.newInstance(); // VerifyError thrown here
    Method m = clazz.getMethod("getData");
    String s = m.invoke(reader);
    print(s);
    s = null;
    m = null;
    reader = null;
    clazz = null;
    cLoader = null;
    NativeClassLoader.dispose();
    System.gcAny ideas would be really appreciated :-)
Guillaume

Are you using the executable exe file and the filename as a parameter in the custom task?
Andreas Baumgarten | H&D International Group

Similar Messages

  • I am getting ready to sell a Mac app and I want to know what the specs are to create a custom background for my Mac App?

    I am getting ready to sell a Mac app and I want to know what the specs are to create a custom background for my Mac App?
    Here is a good example of what I am talking about: https://docs.google.com/file/d/0B28kNqQ8gmifRjRHam9wVnlrWG8/edit?usp=sharing

    You need to post your question in the Apple Developer Forums

  • How to create a custom measure for each level of a dimension

    Hi all!
    Can Anyone please explain me with an example, how to create a custom measure for each level for a dimension? I dont mine if you use
    one or more measures.
    thanks in advance
    hope someone helps me.

    For example:I create a dimension for product_dim witch has 4 levels:total, class, family and item:
    d_aben18
    n1_aben18
    n2_aben18
    n3_aben18
    n4_aben18
    herarchy:h_aben18
    cube:cubo_aben18
    measure:med_aben18
    I create this code to fetch the data to the dimension:
    TRAP ON CLEANUP
    SQL DECLARE c1 CURSOR FOR SELECT-
    total_product_id,1,'N1_ABEN18',total_product_dsc,-
    class_id,1,'N2_ABEN18',total_product_id,class_dsc,-
    family_id,1,'N3_ABEN18', class_id, family_dsc,-
    item_id,1,'N4_ABEN18',family_id,item_dsc-
    FROM PRODUCT_DIM
    "OPEN THE CURSOR
    SQL OPEN c1
    "FETCH THE DATA
    SQL FETCH c1 LOOP INTO-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N1_aben18_LEVELDEF,:D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N2_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N3_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N4_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    "SAVE THE CHANGES
    UPDATE
    COMMIT
    CLEANUP:
    SQL CLOSE c1
    SHOW 'KK2'
    Then I create a cube with use compression off, and in rules sum for example.
    After, I create a measure and I select Override the aggregation specification for the cube, in rules I put nonadditive and I would like to create aprogram to assign distinct values to each level of the dimension. For example, I put 1, 2 3, and 4 values, but at the end I would like to put count(distinct(values)).
    for that I create another program:
    VRB D_RETURN DECIMAL
    if D_ABEN18_N1_ABEN18_LEVELDEF eq 'N1_ABEN18'
    then D_RETURN = 1
    if D_ABEN18_N2_ABEN18_LEVELDEF eq 'N2_ABEN18'
    then D_RETURN = 2
    if D_ABEN18_N3_ABEN18_LEVELDEF eq 'N3_ABEN18'
    then D_RETURN = 3
    if D_ABEN18_N4_ABEN18_LEVELDEF eq 'N4_ABEN18'
    then D_RETURN = 4
    else d_return=26
    return d_return
    "SHOW D_RETURN
    cubo_aben18_med_aben18_stored=d_return
    but it doesnt work.I dont know how to put to assign or to see what I want.
    I report the measure, or I report the program, but then how can I see the values of the measure?
    thanks in advance

  • How can I create a custom dock for all users?

    Hello,
    I would like to create a custom dock for everyone that uses a certain Mac. I have found a bunch of stuff, but it is outdated. Most of the tutorials are for 10.4 or 10.5. I am using 10.7.4 and I have found nothing regarding that. Can anyone point me in the right direction?
    Thanks in advance

    Hello,
    I am not sure how I wound-up in the server forum. I am using the desktop version of OS X 10.7.4.
    Thanks

  • How to create a "Custom Color" for highlighting? (Acrobat XI)

    March 10, 2014
    How to create a "Custom Color" for highlighting? (Acrobat XI)
    The numbers in the RGB and other fields change as various numbers are changed.
    I wanted to create a pale orange:
    Hue               13      Red      255
    Saturation   240      Green  177
    Luminosity    86       Blue     140
    I'd selected one of the orange squares in the color grid, to display the general orange area of the slider.
    I moved the slider to select a pale orange, which generated the above numbers.   Since this wasn't directly available to save to a Custom Color, I tried to  edit the numbers.  Unfortunately, the other numbers changed, making it impossible to actually create a color.
    Any suggestions would be appreciated.
    Note:  I used Techsmith's Snagit to show screen shots in a Word document.
    When I attempted to browse and upload the file, the error message said "[The content type of this image is not allowed.]"
    OK...what images *are* allowed?

    Hi Don,
    I saw Gilad answered your question in another forum post.
    Do you have everything you need at this point?
    Let me know if you need further assistance.
    Kind regards, Stacy

  • Creating a custom dictionary for Acrobat and Reader.

    I want to create a custom dictionary to be used by all of our users when they access a “forms document” through Adobe Reader/Acrobat.
    Here are some of the issues:
    The default dictionary name under Custom Dictionaries has a .clam extension.
    Is there a way to edit this?
    Does it contain the index settings for all the other added.txt and excluded.txt dictionary files?
    The Reader's default location is under a user’s LocalLow folder.
    C:\Users\PIN\ AppData\LocalLow\Adobe\Linguistics\Dictionaries\Adobe Custom Dictionary.
    The Acrobat default location is under the user's Roaming folder.
    C:\Users\PIN\ AppData\Roaming\Adobe\Linguistics\Dictionaries\Adobe Custom Dictionary\.
    This is buried under the users profile and we need to be able to update these files on all the user’s workstations prior to log on.
    This could be done by redirection of the new custom dictionary. What is the location of that setting in the registry?
    Is there is a way to append to the standard dictionary file so as not to replace any setting that a user may have made to the dictionary?
    Is this done to the .clam or .txt file outside of the Adobe Reader application?
    What is the “All” setting in the dictionary?
    Does that imply the program will look through all the dictionaries?
    Is there a way to create a new dictionary name that would appear under the preferences\spelling\dictionaries list. Is there an Index file that would point to a newly created Dictionary folder?

    Custom dictionaries must be created with a 3rd party program provided by Proximity (http://www.proximitytechnology.com/spell_correction.htm).
    The spelling support files are installed in this directory for all users (this is only the default)
    C:\Program Files\Adobe\<product>\Resource\Linguistics\Providers\Proximity
    File types include:
    ENV - eg: grmphon.env - the phonetic rule file for the spelling dictionary language. There is one of these “ENV” file for each language.
    CLX - eg: grm32.clx - a language related part of spelling dictionary. There is one of these “CLX” file for each language.
    LEX - eg: grm104.lex - an actual spelling dictionary. There may be several dictionaries for a given language, for example, grm104.lex, grm10401.lex.
    So the answer is:
    Create a custom dictionary with Proximity and use the Wizard or some other method to deploy the files in the correct location.
    Ben

  • Possible to create a custom renderer for rendering standard component ?

    This is in context for creating dynamic Data tables. Is it possible to create a custom Renderer for rendering component (standard) without creating a custom component?
    namanc

    Let's assume you want to create a custom renderer which will be used to render the error-messages (the h:messages tag). The component-family in this case is: javax.faces.Messages, the renderer-type javax.faces.Messages.
    Therefor in your application's faces-config.xml add this renderer-statement (inside a render-kit, obviuosly):
    <faces-config>
      <!-- other stuff like components, managed beans, navigation-rules,... -->
      <render-kit>
        <renderer>
          <component-family>javax.faces.Messages</component-family>
          <renderer-type>javax.faces.Messages</renderer-type>
          <renderer-class>my.very.special.MessagesRenderer</renderer-class>
        </renderer>
      </render-kit>
      <!-- other renderers... -->
    </faces-config>The code for MessagesRenderer is very dependent on your needs, therefor I will not post something here. Basically you need to extend javax.faces.render.Renderer. For help in that camp, surf to the online tutorials or get yourself a book (I learned a lot from Kito Mann's "JSF in Action"). Additionally grab the source for Sun's RI AND Myfaces and dig into that java-code. There is a huge learning potential looking at that source-material.
    hth
    Alexander

  • Create 1 customer master for some small customer

    Hi All,
    Our company have some small customer, sometime they buy our goods (may be they buy only one time). So we want create 1 customer master for them. Can we do it?

    Dear  ngocvt,
    Transaction Code: V-07 - Create a one-time customer. (Account Group - CPDA)
    One time customer / vendor accounts in SAP means they are account groups for customer/vendor and where in only the general data of the customer / vendor are stored instead of maintaining the bank data and other company code data that are relevant for other account groups which are useful for long run purposes.
    As you know everything that is entered in SAP is saved in some TABLE. Now the customer & vendor master is such a table which holds vast amount of data.
    The business secenario where the vendor or customer which are being in system only for 1 transaction, it is not advisable to have all the data maintained in main master.
    Therefore SAP has provided with the feature of One time vendor / customer wherein in the document entry stage only you have to enter the name, address and other details of the vendor/customer.
    The data, as far as I know' remains at doc level and does'nt go to the master tables.
    If you want to change the standard functionality then go to
    Transaction OBD2, u will find CPDA, that is standard one one time customer account group.
    Copy it  and make necessary changes.
    Hope this Helps.
    Thanks
    Murtuza

  • Using Apache Commons HTTPClient to create a custom socket for Java mail

    Does anyone know how to use Apache Commons HTTPClient to create a custom socket for Java mail. This is necessary for me to use NTLM authentication

    JavaMail doesn't use HTTP.
    If you want to add support for NTLM authentication to one of the standard protocols,
    your best bet is to create a SASL provider, although note that only JavaMail's IMAP
    provider uses SASL currently. The other protocols should add SASL support, but that
    hasn't been done yet.

  • Creating a custom scale for current

    Hi guys,
    I need some help with creating a custom scale. I am reading motor current (analog I/P) and would like to display that on a graph and write it to a file. I need to use a linear scaling for custom scale. The slope is 2 and the intercept is 0. I've attache the code to make it clear what I am trying to acomplish. The way I've set it up right now is no scaling. There are 2 tasks in the code. I would like to create a custom scaling for the first task as seen in the attached code. I have done custom scaling using DAQ Assistant Express VI. But I dont see such options when I try to do the same with the DAQmx task. Please let me know how this can be done. Any help is greatly appreciated.
    Thanks,
    Raj 
    Solved!
    Go to Solution.
    Attachments:
    Current_Voltage_RPM-_sub_VI-1.vi ‏18 KB

    You both had me going nuts trying to figure how to get to that property. Basically just right click the DAQmx property node and "Select filter..." . This brings up the "Configure Filter Settings" where I chose 'show all attributes'. I could then get to the AI Custom Scale Name property.
     Interestingly when you use the Property Browser and select the magnifying glass you can get to that property...but you just can't select it if you have the filter set incorrectly. Lesson Learned.
    I also found this community example and that one.  
    Using LabVIEW 2010SP1 and TestStand 4.5

  • How to create a custom variable for a Label?

    i need my label to store a string variable in it, do you know i can create a custom variable for it.
    i mean for example if it's name is "StoredString" i can access it in my code by "label1.StoredString" just like "Label1.text" or something like that.

    Thanks for pvdg42's help.
    Hi soorena12,
    Based on your issue, I suggest you can try the pvdg42's suggestion check your issue in your side.
    If it still could not help you solve this issue, I suggest you can tell me which kind of application you create the label in the VS IDE?
    What language you use to create for your application?
    If you have any update message about your issue, please tell us.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Creating a Custom Task for an external application

    Hi
    I want to create a custom task for our records management system, that just opens a particular file people use from within Incident Management every day. 
    The file is of extension .tr5 (which is our records management tool).  I can open the file on my desktop.  When I create the custom task, using the same file - I get a message ' The specified executable is not a valid Win32 application' 
    I can open the application fine using the custom task, but not the file. 
    Could it because there is no relationship from SCSM to the file type? 
    Any suggestions are appreciated. 

    Are you using the executable exe file and the filename as a parameter in the custom task?
    Andreas Baumgarten | H&D International Group

  • Creating a custom serializer for SOAP

    Hi guys, i'm wondering if someone could help me. I'm trying to create a custom serializer for a class with SOAP and I'm geeting the following SOAPException:
    Fault Code = SOAP-ENV:Server.Exception:
    Fault String = org/apache/soap/util/xml/Serializer
    I'm able to deploy the service with no problems.
    I'm using a very simple example in which I'm only trying to get a Person class from the service. here is the deployment descriptor:
    <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id="urn:PersonService">
      <isd:provider type="java"
                    scope="Application"
                    methods="getPerson">
        <isd:java class="app.PersonService" static="false"/>
      </isd:provider>
      <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
      <isd:mappings>
        <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                 xmlns:x="urn:person"
                 qname="x:person"
                 javaType="app.Person"
                 java2XMLClassName="app.PersonSerializer"
                 xml2JavaClassName="app.PersonSerializer"/>
      </isd:mappings> 
    </isd:service>here is the PersonService.java:
    package app;
    public class PersonService {
        /** Creates a new instance of GetPerson */
        public PersonService() {
        public Person getPerson() {
            return new Person("joe", "something");
    }here is the Person.java:
    package app;
    public class Person {
        public String firstName;
        public String lastName;
        /** Creates a new instance of Person */
        public Person() {   
        public Person(String firstName, String lastName) {
            this.firstName = firstName;
            this.lastName = lastName;
    }here is the PersonSerializer.java:
    package app;
    import java.io.IOException;
    import java.io.Writer;
    import org.apache.soap.encoding.soapenc.SoapEncUtils;
    import org.apache.soap.rpc.Parameter;
    import org.apache.soap.rpc.RPCConstants;
    import org.apache.soap.rpc.SOAPContext;
    import org.apache.soap.util.Bean;
    import org.apache.soap.util.StringUtils;
    import org.apache.soap.util.xml.DOMUtils;
    import org.apache.soap.util.xml.Deserializer;
    import org.apache.soap.util.xml.NSStack;
    import org.apache.soap.util.xml.QName;
    import org.apache.soap.util.xml.Serializer;
    import org.apache.soap.util.xml.XMLJavaMappingRegistry;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    public class PersonSerializer implements Serializer, Deserializer {
        /** Creates a new instance of PersonSerializer */
        public PersonSerializer() {
        public void marshall(String string, Class aClass, Object object, Object object0, Writer writer, NSStack nSStack, XMLJavaMappingRegistry xMLJavaMappingRegistry, SOAPContext sOAPContext) throws IllegalArgumentException, IOException {
            nSStack.pushScope();
            SoapEncUtils.generateStructureHeader(string, aClass, sOAPContext, writer, nSStack, xMLJavaMappingRegistry);
            writer.write(StringUtils.lineSeparator);
            Person person = (Person)object;
            String firstName = person.firstName;
            String lastName = person.lastName;
            xMLJavaMappingRegistry.marshall(string, String.class, firstName, "firstName", writer, nSStack, sOAPContext);
            writer.write(StringUtils.lineSeparator);
            xMLJavaMappingRegistry.marshall(string, Integer.class, lastName, "lastName", writer, nSStack, sOAPContext);
            writer.write(StringUtils.lineSeparator);
            writer.write("</" + sOAPContext + '>');   
            nSStack.popScope();
        public Bean unmarshall(String string, QName qName, Node node, XMLJavaMappingRegistry xMLJavaMappingRegistry, SOAPContext sOAPContext) throws IllegalArgumentException {
            Element root = (Element)node;
            Element childElement = DOMUtils.getFirstChildElement(root);
            Person target;
            try {
                target = (Person)Person.class.newInstance();
            } catch (Exception e) {
                throw new IllegalArgumentException("Problem instantiating bean: " + e.getMessage());
            while(childElement !=null) {
                Bean paramBean = xMLJavaMappingRegistry.unmarshall(string, RPCConstants.Q_ELEM_PARAMETER, childElement, sOAPContext);
                Parameter param = (Parameter)paramBean.value;
                String tagName = childElement.getTagName();
                if(tagName.equals("firstName")) {
                    target.firstName = (String)param.getValue();
                } else if(tagName.equals("lastName")) {
                    target.lastName = (String)param.getValue();
                childElement = DOMUtils.getNextSiblingElement(childElement);
            return new Bean(Person.class, target);
    }and finally here is the client app class that calls the service, the GetPersonClient.java:
    package app;
    import java.net.MalformedURLException;
    import java.net.URL;
    import org.apache.soap.Constants;
    import org.apache.soap.Fault;
    import org.apache.soap.SOAPException;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    import org.apache.soap.rpc.Call;
    import org.apache.soap.rpc.Parameter;
    import org.apache.soap.rpc.Response;
    import org.apache.soap.util.xml.QName;
    public class GetPersonClient {
        /** Creates a new instance of GetPersonClient */
        public GetPersonClient() {
        public static void main(String[] args) {
            SOAPMappingRegistry registry = new SOAPMappingRegistry();
            PersonSerializer personSerializer = new PersonSerializer();
            // Map the types.
            registry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("urn:person", "person"), Person.class, personSerializer, personSerializer);
    // Build the call.
            Call call = new Call();
            call.setSOAPMappingRegistry(registry);
            call.setTargetObjectURI("urn:PersonService");
            call.setMethodName("getPerson");
            call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
            Response response;
            try {
               response = call.invoke(new URL("http://localhost:8090/soap/servlet/rpcrouter"), "");
            } catch (SOAPException e) {
                System.err.println("Caught SOAPException: " + e.getMessage());
                e.printStackTrace();
                return;
            } catch (MalformedURLException ex) {
                ex.printStackTrace();
                return;
            if (!response.generatedFault()) {
                Parameter parameter = response.getReturnValue();
                Person person = (Person)parameter.getValue();
                if ( person != null ) {
                    System.out.println( person.firstName + " " + person.lastName );
            } else {
                Fault fault = response.getFault();
                System.err.println("Generated fault: ");
                System.out.println("  Fault Code   = " + fault.getFaultCode());
                System.out.println("  Fault String = " + fault.getFaultString());
    }if someone could help me i would be grateful.
    cheers
    nmc

    Is the problem in your 'marshall' method? You seem to be using Integer.class instead of String.class for the 'lastName' parameter...

  • I need create a custom control for visualization HTML

    Hi guys,
      I need create a custom control for HTML files visualization on SAPGUI JAVA. I created a sample program and perfectly run on SAPGUI Windows.
    Thanks.
    Regards.
    Jose Antonio Campos.

    Hi,
    Just as a quick start
    http://gumbo.flashhub.net/sizer/  (view source enabled).
    this uses a skin to make a titlewindow resizable, its not about the skin as much as giving you a starting point for resizing code.
    if you look into the skin you will see these functions
    protected function sizer_mouseDownHandler(event:MouseEvent):void
    OldX=event.stageX;
    OldY=event.stageY;
    systemManager.addEventListener(MouseEvent.MOUSE_MOVE,startResize);
    systemManager.addEventListener(MouseEvent.MOUSE_UP,endResize);
    protected function endResize(event:MouseEvent):void
    systemManager.removeEventListener(MouseEvent.MOUSE_MOVE,startResize);
    systemManager.removeEventListener(MouseEvent.MOUSE_UP,endResize);
    private function startResize(event:MouseEvent): void
    hostComponent.width -= OldX-event.stageX;
    hostComponent.height -= OldY-event.stageY;
    OldX=event.stageX;
    OldY=event.stageY;
    The idea is to have a hit area on your custom component (a corner, or all corners). You capture the mouseposition when you mousedown then in the mouse move eventlistener you update the object size with the difference between current X and Y from initial X and Y.
    Hope this gets you started.
    David

  • What are the tools to create a digital magazine for ipad version and how can be place it in newsstand?

    Hello..
    "what are the tools to create a digital magazine for ipad version and how can be place it in newsstand?"
    I am very tired after done a week of R&D on this issue..
    But i doesn't get any fair solution for this one..
    I hope this is best option to place my issue here to get quick solution..
    Thanks and Regards..

    We are all users here.
    There is no one here from Apple.
    In order for you to develop and distribute content for the iPad, you need to become an apps developer.
    Not sure where you sign up for this or who you have to call.
    There should be a place on Apple's site that refers to a section of the site if you want to be an Apple iOS content developer.
    It cost, I believe $99 U.S. to become an Apple apps developer. You'll agree to Apple's Non-disclosure rules.  You'll receive Apple's app/software developers kit,and access to Apple's app developer site.
    No one here is going to be able to help you.
    Good Luck.

Maybe you are looking for

  • Table maintenance view not saving changes

    Hi experts   I have created a Z table with corresponding maintenance view (with transaction). Also, there is a Z program to insert records into the table from xls file.   When accesing the maintenance view, I can add and remove entries, but the probl

  • My iPhone is sending text messages from my email account

    I just did the new iOs 6 update on my iphone and now when i send text messages they show up as coming from my email account rather than from my phone.  Is there a way to change this?

  • TS1702 I can't locate Netflix on my IPad

    I can't locate Netflix on my IPad - it's not there!! However when I go to download it from the App store it shows it's already installed.   Help please...

  • NFS just stopped working

    I have set it up numerous times in the past with no problems at all.  It's faster (in my experience) over ethernet and I prefer it over Samba.  I had it set to mount from my server to my client via fstab.  It was hit or miss whether it would mount (t

  • I always get a retry download error

    I have an ipad air. ever since I upgraded to IOS 8 I always get a retry download error. What's going on with this one?