Please solve the code

class Horseradish
//insert code here
protected HorseRadish(int x)
System.out.println("bok choy");
class Washabi extends HorseRadish{
public static void main(String[] args)
Wasabi w=new Wasabi();
which two,inserted independently at line 2,will allow the code to compile and produce the output "bok choy"?(choose two)
1. //just a comment
2. protected HorseRadish(){}
3.protected HorseRadish()
{this(42);}
4.protected HorseRadish() { new horseRadish(42);}
which two are the right options and why??
please answer

because we want people to think for themselves rather
than spoonfeed them everything.
When you start spoonfeeding them, they'll never learn
to think on their feet and will forever come here
with every tiniest problem.Original:
public class Spoon {
    public static Answer feed(Person me) {
        /* Implementation */
}New:
protected class Spoon {
    private static Answer feed(Person me) {
        /* Implementation */
}Problem solved.

Similar Messages

  • Please solve the code inpsector error: Sequential read access possible

    Hi,
      i am getting code inspector warning message . could u please try to provide the solution for that warning message.
    code inspector warning message is :   Sequential read access possible for a hashed table
    My statment :  read table <lt_product_mbr> with table key (ujr0_c_member_id) = <l_product> assigning <ls_product_mbr>.
    i declared  <LT_PRODUCT_MBR>  TYPE ANY TABLE.
    Eventough i delared  it as a type hashed or sorted . it is giving same warning message.
    Regards
    Koti

    Hi Koti,
    you specified the key field dynamically (variable in brackets). That means
    it can not be checked statically whether the table key of the hashed table
    is used or not since this is only clear at run time.
    If you use the dynamic key specification
    read table <lt_product_mbr> with table key (ujr0_c_member_id) = <l_product> assigning <ls_product_mbr>.
    and not the direct key:
    read table <lt_product_mbr> with table key field = <l_product> assigning <ls_product_mbr>.
    the CI will  warn you that you may end up with a sequential red (if not the table key of the hashed table
    is used in the variable at run time.
    Kind regards,
    Hermann

  • Please check the code

    I AM TRYING TO REPLICATE THE ADDRESS OF EQUIPMENT FROM ECC TO CRM.
    I AM ABLE TO REPLICATE THE IDENTIFICATION NUMBER.
    WHILE USING THE SAME FUNCTION MODULE FOR ADDRESS, THE ADDRESS IS NOT GETTING REPLICATED.
    PLEASE CHECK THE CODE AND TELL ME WHAT PRE-REQUISITES MUST BE TAKEN INTO CONSIDERATION AND IS THERE ANY MISTAKE FROM ME.
    FULL POINTS WILL BE REWARDED.
    ITS VERY VERY URGENT.
    METHOD IF_EX_CRM_EQUI_LOAD~ENLARGE_COMPONENT_DATA.
    **Data declarations
    DATA:
        ls_equi          type crmt_equi_mess,
        ls_comp          type ibap_dat1,
        ls_comp_det1     TYPE IBAP_COMP3,
        ls_address_data  type ADDR1_DATA,
        ls_object      type comt_product_maintain_api,
        ls_object1     type comt_product,
        lv_object_id   type IB_DEVICEID,
        lv_object_guid type IB_OBJNR_GUID16.
    **Map Sort field from ECC to CRM
    Read table it_equi_dmbdoc-equi into ls_equi index 1.
    lv_object_id  = ls_equi-equnr.
    move is_object to ls_object.
    move ls_object-com_product to ls_object1.
    lv_object_guid = ls_object1-product_guid.
    move is_component to ls_comp.
    ls_comp_det1-deviceid    = lv_object_id.
    ls_comp_det1-object_guid = lv_object_guid.
    ls_comp_det1-EXTOBJTYP   = 'CRM_OBJECT'.
    ls_comp_det1-ibase       = ls_comp-ibase.
    ls_address_data-roomnumber = '1000'.
    ls_address_data-floor = '10'.
    ls_address_data-country = 'US'.
    CALL FUNCTION 'CRM_IBASE_COMP_CHANGE'
      EXPORTING
       i_comp                       = ls_comp
       I_COMP_DET             = ls_comp_det1
       I_ADDRESS_DATA     = ls_address_data
      I_ADDRESS_ADMIN           =
      I_PARTNER                 =
      I_DATE                    =
      I_TIME                    =
    EXCEPTIONS
      DATA_NOT_CONSISTENT       = 1
      IBASE_LOCKED              = 2
      NOT_SUCCESFUL             = 3
      OTHERS                    = 4
    *IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    ENDMETHOD.

    Hi S B,
    May I the procedure for the replication of serialnumber into device ID that is Identification field In Ibase.
    And one more thing need this to be codded in the standard badi or needed an copy of the implementation .
    plz help me as u already have done the requirement.
    u will be twice rewarded.
    Thanking u in advance for the reply.
    Sree.

  • I have a problem in the answers to the questions on my account I can not buy anything, please solve the problem, I have a problem in the answers to the questions on my account I can not buy anything, please solve the problem

    I have a problem in the answers to the questions on my account I can not buy anything, please solve the problem

    You are not addressing Apple here. And your post is a bit confusing. See Klaus's answer in this thread:
    https://discussions.apple.com/thread/5228474?tstart=0

  • Please check the Code snippet and detail the difference

    Please go through the two code snippets given below...
    Can some one please let me know if using generics is a better way to denote the signature and if yes, why is it so?
    Thank you
    Two classes:
    class SimpleStr {
         String name = "SimpleStr";
         public SimpleStr(String name) {
              this.name = name;
         public String getName() {
              return this.name;
         public String toString() {
              return getName();
    class MySimpleStr extends SimpleStr {
         String name = "MySimpleStr";
         public MySimpleStr(String name) {
              super(name);
              this.name = name;
         public String getName() {
              return this.name;
         public String toString() {
              return getName();
    Code Snippet 1:
    class AnotherSimpleStr {
         public <S extends SimpleStr>S getInfo() {
              return (S)new MySimpleStr("val3");
    Code Snippet 2:
    class AnotherSimpleStr {
         public SimpleStr getInfo() {
              return new MySimpleStr("val3");
    }

    Also, please see the code below, the getInfo() method is not taking care of Type safety right??!!!!
    class AnotherSimpleStr {
         public <S extends SimpleStr>S getInfo() {
              return (S)new Object();
         public <S extends SimpleStr>S getInfoAgain(Class<S> cls) {
              return (S)new MySimpleStr("Val");
    }

  • I bought iphone 4 in US and i and other person not able to listen properly because on the time of conversation voice cracking and difficult to understand each others.so i would like to request you that please solve the above problem.i love my iphone.

    Sir,
    I bought iphone 4 in US.last 6 month me and other person not able to listen properly the voice because the voice is cracking.i have called earlier about the above problem and they said to upload the new verson 6.1.3 and it will be done but after loading this version still i am facing the same problem.so ,i would like to request you that please solve the above problem as soon as you can.I will be thankful to you.i love my apple Iphone.
    waiting for your earliest reply.
    thanks
    Rajeev Gupta

    Hello sir
    As you know about my iPhone 4 which has a problem of voice cracking so I would like to replace to other phone like IPhone 5s.I will pay the replacement charges immediately.i am reaching miami on 19th of janvary 2014 so I would like to request you please arrange my appointment on the Apple store,dadeland mall ,miami at 15.00pm as I will reach miami at 13.00pm and my flight to India at 19.00pm.
    Last time you told to replace at miami on 26th of September but without oppoimtment they have not entertained me.so I would like to request you that please arrange my appointment this time
    I will be thankful to you
    Rajeev Gupta

  • My AppStore can not download app. He said need to fill in credit card. But I got no credit card. And how I fill in? Please solve the problem. Thank you.

    My AppStore can not download app. He said need to fill in credit card. But I got no credit card. And how I fill in? Please solve the problem. Thank you.
    <Email Edited by Host>

    Hi Steve,
    If you don't have a credit card for the billing information you may be able to use a gift card or another form of payment.
    Please check out this article for details.
    Why can’t I select None when I edit my Apple ID payment information? - Apple Support
    Best,
    Nubz

  • Can we get Arraylist from String.Please check the code

    Hi all,
    I have just pasted my code over here.Can anyone of you find the solution for obtaining the Array list from the String.
    For Example :
    ArrayList al = new ArrayList();
    al.add(new byte[2]);
    al.add("2");
    String stringVar = "" + (ArrayList) al;
    Here I can convert the arraylist into string.But can we do he vice versa like obtaining the above arraylist from the string?If please advice me.
    URGENT!!!!

    cudIf you run the code you posted you will observe that the string form of the list does not contain all the information of the list: in particular the array elements are missing. It follows that the "vice versa" conversion you seek is simply not possible.
    A variation on this theme is the following:import java.util.ArrayList;
    public class ListEg {
        public static void main(String[] args) {
            ArrayList al = new ArrayList();
            al.add("foo");
            al.add("bar, baz");
            String stringVar = "" + (ArrayList) al;     
            System.out.println(stringVar);
    }If you think about the output you should be able to conclude that lists with different contents can easily have the same string form.
    Just something to chew on.

  • Please check the code reg mail implementation and give guide lines to me

    Hi experts
    I written some code for implementing the mail in webdynpro using java mail API,i did not get the out put ,Is any configuration i have to do in webdynpro or WAS
    Can any body review my code and tell me where i mistaken in the implementation .Is there any thing i want to configure .Here with i am sending my code in the action of Send button
    public void onActionSendMail(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSendMail(ServerEvent)
        // get the values entered by the user  in the form
        try{
        String toAddress=wdContext.currentContextElement().getTo();
        String ccAddress=wdContext.currentContextElement().getCC();
        String bccAddress=wdContext.currentContextElement().getBCC();
        String subject=wdContext.currentContextElement().getSubject();
        String messageBody=wdContext.currentContextElement().getMessage();
        //set the properties of host and port no
        Properties p = new Properties();
        p.put("mail.transport.protocol","smtp");
        p.put("mail.smtp.host","12.38.145.108");
         p.put("mail.smtp.port","25");
         //get the session object or connection to the mail server or host
         Session sess=Session.getDefaultInstance(p,null);
         //create a MimeMessage and add recipients
         MimeMessage message = new MimeMessage(sess);
         if(toAddress !=null && toAddress.length()>0){
              message.addRecipient(Message.RecipientType.TO, new InternetAddress(toAddress));
         }else
              wdComponentAPI.getMessageManager().reportSuccess("Please Enter the To Address");
         if(bccAddress !=null && bccAddress.length()>0)
         message.addRecipient(Message.RecipientType.BCC, new InternetAddress(bccAddress));
         if(ccAddress !=null && ccAddress.length()>0)
         message.addRecipient(Message.RecipientType.CC, new InternetAddress(ccAddress));
        if(subject!=null && subject.length()>0)
         message.setSubject(subject);
         message.setFrom(new InternetAddress("[email protected]"));
         if((messageBody!=null) && (messageBody.length()>0))
              message.setContent(messageBody,"text/plain");
         }else
              message.setContent("","text/plain"); 
         Transport.send(message);
        catch(Exception e)
             e.printStackTrace();
    Please mail to :  [email protected]
    Thanks and regards
    kalyan

    Hi Venkat,
       The code seems ok to me. you don't need to configure WAS to use JavaMail APIs. However, if this code doesnot work then check with the code given below as this is working fine.
    Properties prop = new Properties();
              prop.put("mail.smtp.host", host);
              prop.put("mail.smtp.auth", "false");
              Session session = Session.getInstance(prop, null);
              session.setDebug(true);
              try {
                   MimeMessage msg = new MimeMessage(session);
                   msg.setFrom(new InternetAddress(from));
                   InternetAddress[] address =
                        { new InternetAddress(to1)};
                   msg.setRecipients(Message.RecipientType.TO, address);
                   msg.setSubject(subject);
                   msg.setSentDate(new Date());
                   MimeBodyPart msg1Body = new MimeBodyPart();
                   msg1Body.setText(msg1);
                   MimeBodyPart msg2Body = new MimeBodyPart();
                   msg2Body.setText(msg2);
                   Multipart mp = new MimeMultipart();
                   mp.addBodyPart(msg1Body);
                   mp.addBodyPart(msg2Body);
                   msg.setContent(mp);
                   Transport.send(msg);
              } catch (AddressException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   System.out.print("AddressException : " + e.getMessage());
              } catch (MessagingException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   System.out.print("MessagingException : " + e.getMessage());
              } catch (Exception e) {
                   System.out.print("Exception : " + e.getMessage());
    where host is 12.38.145.108 in your case. May be you chk if your mail server  is using another port. 25 is the default port for the smtp. This may be the case that your code is not working.
    Regards:
    Abhinav Sharma
    PS : Do reward points if it helps

  • Urgent-Please check the code

    Hi There,
    Could you please have a look at the code below and suggest whether I am using If else in good manner or not?
    User will enter Start date and end date at begbalance level and account value is also calculated at begbalance then we need to copy that value to months starting from the Start date month so I need to convert the integer value of month to string month.but it is giving error.
    var monthsdiff,endyear,startyear,startmonth,endmonth;
    fix("budget","begbalance",..........)
    Fix("hsp_inputvalue")
    "Account1"
    startmonth=@INT(@MOD("Date-start",10000)/100);
    Monthsidff=..........;
    if(startmonth=1)
    &startmon= "JAN";
    elseif(startmonth=2)
    &startmon= "FEB";
    elseif(startmonth=3)
    &startmon= "MAR";.........till dec
    endif
    if(endmonth=1)
    &endmon= "JAN";
    elseif(endmonth=2)
    &endmon= "FEB";
    elseif(endmonth=3)
    &endmon= "MAR"...till dec
    endif
    fix(&startmon)
    if(startyear==&CurrYear and endyear==&CurrYear)
    "Account1"=("Account1"/12) *monthsdiff;
    endfix
    else
    "Account1"->"may"=("Account1"/12) * monthsdiff;
    endfix
    endif
    endfix
    endfix
    here Curryear is 2011.
    Thanks
    Edited by: user10760185 on Sep 20, 2011 2:19 AM

    It looks like you are trying to assign a value to a substitution variable in your calc, you can't do that. ^^^Until quite recently, yes, but now if you read Robb Salzmann's blog and grab his CDF: http://codingwithhyperion.blogspot.com/2011/08/create-and-update-substitution.html
    Btw, beyond Robb's code being a cool hack, I'm not entirely sure I'd want to change sub var values on the fly but it at least appears to be possible.
    Regards,
    Cameron Lackpour

  • How to subtotal in alv? Please correct the code!!!!

    hi,
    I have an alv layout like following:
    ZZZ 300100089 1050
    ZZZ 300100089 1050
    subtoal 2100
    90256243 300100000 193410
    90256242 300100000 173250
    90256241 300100000 173250
    90256240 300100000 173250
    90256239 300100000 173250
    90256238 300100000 173250
    90256237 300100000 173250
    subtotal 1232910
    when the second numbers are the same,
    I need to sum up as
    300100089 2100
    300100000 1232910
    I write the coding as the following, but it did not work. I go dump in function module. Please
    help and correct it!!
    DATA I_SORT TYPE SLIS_T_SORTINFO_ALV.
    DATA WA_SORT TYPE slis_sortinfo_alv.
    WA_SORT-fieldname = 'H_BETRG'.     " speicfy field name..
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO I_SORT.
    CLEAR WA_SORT.
    IN FM.
    it_sort                = i_sort
    I do not know what is the file name I should put into the WA_SORT-fieldname, I tried "wrbtr" and some other name, but I got the same dump when I excute the program. Please help me to correct the code.
    Thank you.

    Hi,
    The dump is as following:
    What happened?
        The current application program detected a situation which really
        should not occur. Therefore, a termination with a short dump was
        triggered on purpose by the key word MESSAGE (type X).
    Error analysis
        Short text of error message:
        Technical information about the message:
        Message classe...... "0K"
        Number.............. 000
        Variable 1.......... " "
        Variable 2.......... " "
        Variable 3.......... " "
        Variable 4.......... " "
        Variable 3.......... " "
        Variable 4.......... " "
    Trigger Location of Runtime Error
        Program                                 SAPLSLVC
        Include                                 LSLVCU10
        Row                                     36
        Module type                             (FUNCTION)
        Module Name                             LVC_SORT_COMPLETE
      31   LOOP AT CT_SORT INTO LS_SORT.
      32
      33     READ TABLE IT_FIELDCAT ASSIGNING <LS_FIELDCAT>
      34          WITH KEY FIELDNAME = LS_SORT-FIELDNAME BINARY SEARCH.
      35     IF SY-SUBRC NE 0.
    >>>>       MESSAGE X000(0K).
      37     ENDIF.
      38
      39     LS_SORT-SELTEXT = <LS_FIELDCAT>-SELTEXT.
      40
      41 *     Zwischensummenstufen ermitteln
      42     IF NOT LS_SORT-SUBTOT IS INITIAL.
      43       L_COUNT = L_COUNT + 1.
    Please help, thank you!!

  • Please check the code why it is not working

    I am a new java servlets and jsp learner. I am running below example of session in Tomcat and "AccessCount" supposed to be increased by one value whenever servelet is refereshed. But I am always getting 0 value even after refereshing it.
    I will appreciate your help.
    =======================================================
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.net.*;
    import java.util.*;
    /** Simple example of session tracking. See the shopping
    * cart example for a more detailed one.
    public class ShowSession extends HttpServlet {
    public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Session Tracking Example";
    String heading;
    HttpSession session = request.getSession(true);
    // Use getAttribute instead of getValue in version 2.2.
    Integer accessCount = (Integer)session.getAttribute("accessCount");
    if (accessCount == null) {
    accessCount = new Integer(0);
    heading = "Welcome, Newcomer";
    } else {
    heading = "Welcome Back";
    accessCount = new Integer(accessCount.intValue() + 1);
    // Use setAttribute instead of putValue in version 2.2.
    session.setAttribute("accessCount", accessCount);
    out.println("<html><h1>" + title + "</h1>" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1 ALIGN=\"CENTER\">" + heading + "</H1>\n" +
    "<H2>Information on Your Session:</H2>\n" +
    "<TABLE BORDER=1 ALIGN=\"CENTER\">\n" +
    "<TR BGCOLOR=\"#FFAD00\">\n" +
    " <TH>Info Type<TH>Value\n" +
    "<TR>\n" +
    " <TD>ID\n" +
    " <TD>" + session.getId() + "\n" +
    "<TR>\n" +
    " <TD>Creation Time\n" +
    " <TD>" +
    new Date(session.getCreationTime()) + "\n" +
    "<TR>\n" +
    " <TD>Time of Last Access\n" +
    " <TD>" +
    new Date(session.getLastAccessedTime()) + "\n" +
    "<TR>\n" +
    " <TD>Number of Previous Accesses\n" +
    " <TD>" + accessCount + "\n" +
    "</TABLE>\n" +
    "</BODY></HTML>");
    /** Handle GET and POST requests identically. */
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    doGet(request, response);
    ========================================================

    Change the code
    HttpSession session =
    request.getSession(true);AS
    HttpSession session =
    request.getSession(false);If you pass "false", then the Session is not created.
    If you pass "true" the session is always created
    new.
    Thanks and regards,
    Pazhanikanthan. PI dont think that's correct -
    1. request.getSession(false) returns a Session object if one exists.
    2. request.getSession(true) creates a new Session object if it doesnt exist or returns the reference to the existing object if the request is part of an valid session.
    OP, check with default session-timeout values in web.xml
    Ram.

  • Please explain the code below

    What will be the output of the following code? Can I get some detail explanation?
    class A{
        void show(){
            System.out.println("A");
    interface my{
        public void show();
    class B extends A{
       B(my m){
           m.show();
        public void show(){
            System.out.println("B");
    public class test implements my{
        public void show(){
            System.out.println("test");
        public static void main(String args[]){
          test t=new test();
          B b=new B(t);
          b.show();
    }Thanks

    What will be the output of the following code? Can I
    get some detail explanation?Well, I guess you were not able to figure out HOW you got that output. Should have been a li'l more clear in your question. Never mind now... here is my understanding of the code.
    1) The program starts at main()
    2) creates an object for test called t (does nothing more than this since it does not have a constructor defined by you!!)
    3)creates an object for B whose constructor takes an object argument of type my. you send t becuase test implements my.
    4)calls the show method of m in the constructor.
    5)now, where is the definition of show() for m? Its in test. So now, that show() is executed and hence "test" is printed first.
    6)all done, it comes back to the main() to go to the next statement.
    7)calls the show() of b.
    8)this version of show asks to print "B" and hence the output.
    Was this detailed explanation enough? I hope so... ;-)

  • Please Solve The SQL Query

    Please Slove the Query as below:
              T1
    |     A1     |     A2     |
    |     TRUE     |     FALSE     |
    |     FALSE     |     TRUE     |
    |     TRUE     |     TRUE     |
    |     FALSE     |     TRUE     |
    Table Name is: T1 and it is having 2 columns A1 and A2.
    Question is:
    Using a simple SQL query try to get the total number of "TRUE" in the Table T1. Don't use any PL/SQL command,
    just use simple SQL command.
    Please write the full query.
    Manojit.

    select (Nvl(a.cnt_a1,0) + Nvl(b.cnt_a2,0)
    from (select count(1) CNT_A1 from t1 where a1 = 'TRUE') A
    (select count(1) CNT_A2 from t1 where as = 'TRUE') B
    Please Slove the Query as below:
              T1
    |     A1     |     A2     |
    |     TRUE     |     FALSE     |
    |     FALSE     |     TRUE     |
    |     TRUE     |     TRUE     |
    |     FALSE     |     TRUE     |
    Table Name is: T1 and it is having 2 columns A1 and A2.
    Question is:
    Using a simple SQL query try to get the total number of "TRUE" in the Table T1. Don't use any PL/SQL command,
    just use simple SQL command.
    Please write the full query.
    Manojit.

  • Help with Swipe+zoom. Please review the code.

    Hello there,
    I am trying to get the a page swipe and zoom work for a project for iPhone and iPad. I am not an expert in AS3 but have been able to put togather a piece of code with the helpful folks from this forum. My swipe works like a charm, but when I try to incorporate the code for zoom, the zoom/pinch part doesn't work. I know for people who know AS3 it might be a simple mistake on my part.
    Following is the code I have been playing with. Thanks for your suggestions in advance.
    regards,
    Umesh
    stop();
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.events.TransformGestureEvent;
    Multitouch.inputMode = MultitouchInputMode.GESTURE;
    var yourswipeobject:MovieClip;
    var swipeRange:uint = 100;
    yourswipeobject.initX = yourswipeobject.x;
    yourswipeobject.addEventListener(MouseEvent.MOUSE_DOWN,startDragF);
    yourswipeobject.addEventListener(MouseEvent.MOUSE_UP,stopDragF);
    yourswipeobject.addEventListener(TransformGestureEvent.GESTURE_ZOOM,onZoom);
    function onZoom (e:TransformGestureEvent):void{
    yourswipeobject.scaleX *= e.scaleX;
    yourswipeobject.scaleY = yourswipeobject.scaleX;
    function startDragF(e:Event):void{yourswipeobject.startDrag(false, new Rectangle(yourswipeobject.initX-swipeRange,yourswipeobject.y,swipeRange*2,0));
    function stopDragF(e:Event):void{
    yourswipeobject.stopDrag();
    if(yourswipeobject.x<yourswipeobject.initX-swipeRange/2){
        if (currentFrame == totalFrames) {
            gotoAndStop(1);
        } else {
            nextFrame();
    } else if(yourswipeobject.x>yourswipeobject.initX+swipeRange/2){
            if (currentFrame == 1) {
            gotoAndStop(totalFrames);
        } else {
            prevFrame();
    yourswipeobject.x = yourswipeobject.initX;

    Hello there,
    I am trying to get the a page swipe and zoom work for a project for iPhone and iPad. I am not an expert in AS3 but have been able to put togather a piece of code with the helpful folks from this forum. My swipe works like a charm, but when I try to incorporate the code for zoom, the zoom/pinch part doesn't work. I know for people who know AS3 it might be a simple mistake on my part.
    Following is the code I have been playing with. Thanks for your suggestions in advance.
    regards,
    Umesh
    stop();
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.events.TransformGestureEvent;
    Multitouch.inputMode = MultitouchInputMode.GESTURE;
    var yourswipeobject:MovieClip;
    var swipeRange:uint = 100;
    yourswipeobject.initX = yourswipeobject.x;
    yourswipeobject.addEventListener(MouseEvent.MOUSE_DOWN,startDragF);
    yourswipeobject.addEventListener(MouseEvent.MOUSE_UP,stopDragF);
    yourswipeobject.addEventListener(TransformGestureEvent.GESTURE_ZOOM,onZoom);
    function onZoom (e:TransformGestureEvent):void{
    yourswipeobject.scaleX *= e.scaleX;
    yourswipeobject.scaleY = yourswipeobject.scaleX;
    function startDragF(e:Event):void{yourswipeobject.startDrag(false, new Rectangle(yourswipeobject.initX-swipeRange,yourswipeobject.y,swipeRange*2,0));
    function stopDragF(e:Event):void{
    yourswipeobject.stopDrag();
    if(yourswipeobject.x<yourswipeobject.initX-swipeRange/2){
        if (currentFrame == totalFrames) {
            gotoAndStop(1);
        } else {
            nextFrame();
    } else if(yourswipeobject.x>yourswipeobject.initX+swipeRange/2){
            if (currentFrame == 1) {
            gotoAndStop(totalFrames);
        } else {
            prevFrame();
    yourswipeobject.x = yourswipeobject.initX;

Maybe you are looking for