Rotate symbol based on cursor angle

Hey There,
I am trying to get a symbol to rotate and follow based on the cursor angle and I am running into an issue I can't track down. I am using sym. to decalre my variables so that I can reference them globally whithin my composition. But it looks like its something wrong with the diffAngle function.
Any thoughts?
Here is the code on get composition ready:
    sym.x = e.pageX;
    sym.y = e.pageY;
    sym.centerItem = sym.getSymbol("mySymbol");
    sym.centerLoc = centerItem.offset();
    console.log( 'Center Item =' + sym.centerItem);
    console.log( 'Center Loc =' + sym.centerLoc);
function diffAngle(){
    sym.dx = sym.x - (sym.centerLoc.left + (sym.centerItem.width() / 2));
    sym.dy = sym.y - (sym.centerLoc.position().top + (sym.centerItem.height() / 2));
    sym.newAngle = Math.atan2(sym.dy, sym.dx) * (180 / Math.PI);
    return sym.newAngle;
    console.log( 'New Angle =' + sym.newAngle);
$('#Stage').mousemove(function(e){
    sym.myAngle = sym.newAngle;
    sym.rotationValue = 'rotate(' + sym.myAngle + 'deg)';
    sym.$("mySymbol").css({
        '-moz-transform': sym.rotationValue,
        '-webkit-transform': sym.rotationValue,
        '-o-transform': sym.rotationValue,
        '-ms-transform': sym.rotationValue,
        'transform': sym.rotationValue
    console.log('Mouse Moving');

Hey there, your code has a few issues.
1st: to use props like "offset" and "width", you can't use Edge symbols, you have to use the raw object- I use jQery for this.
2nd: you need to set the mouse position vars (sym.x, sym.y), in the mousemove function.
example:
www.timjaramillo.com/code/edge/rotateSymbolToMouse
source:
www.timjaramillo.com/code/edge/_source/rotateSymbolToMouse.zip
And code (pasted in Stage.compositionReady):
sym.x;
sym.y;
sym.myAngle;
sym.newAngle;
sym.centerItem = sym.$("mySymbol");
sym.centerLoc = sym.$("mySymbol").offset();
function diffAngle(){
    sym.dx = sym.x - (sym.centerLoc.left + (sym.centerItem.width() / 2));
    sym.dy = sym.y - (sym.centerLoc.top + (sym.centerItem.height() / 2));
    sym.newAngle = Math.atan2(sym.dy, sym.dx) * (180 / Math.PI);
    return sym.newAngle;
$('#Stage').mousemove(function(e){
    sym.x = e.pageX;
    sym.y = e.pageY;
    sym.myAngle = diffAngle();
    sym.rotationValue = 'rotate(' + sym.myAngle + 'deg)';
    sym.$("mySymbol").css({
        '-moz-transform': sym.rotationValue,
        '-webkit-transform': sym.rotationValue,
        '-o-transform': sym.rotationValue,
        '-ms-transform': sym.rotationValue,
        'transform': sym.rotationValue
    //console.log('Mouse Moving, sym.myAngle = '+sym.myAngle);

Similar Messages

  • I have snow leopard installed as an OS.  When trying to reboot a MacBook Pro I am getting stuck on grey screen with apple logo and rotating symbol.  What can I do?

    I have snow leopard installed as an OS.  When trying to reboot a MacBook Pro I am getting stuck on grey screen with apple logo and rotating symbol.  What can I do?

    Maybe this might help.
    http://support.apple.com/kb/TS2570

  • My ipad 2 turns black and shows the rotating symbol  for startup but nothing happens what can i do?

    my ipadscreen turned black and just shows a rotating symbol for startup but nothing happens. What can i do?

    iPad: Not responding or does not turn on
    If nothing there helped, time for a restore.
    iTunes: Backing up, updating, and restoring your iPhone, iPad, or iPod touch software

  • Possible to creat a group of 3d objects and rotate each based on group's axis?

    I need to create an extruded rectangle.  On the face of that rectangle needs to be another extruded rectangle.  I'd like to be able to rotate both seperate objects in 3d based upon the same axis.  Is this possible?  I've played around with the 3d effects and cant seem to get this to work.

    An alternative can be: Make one rectangle and apply the Extrude effect. Drag it in the Symbols panel so as to make it a Symbol. Now draw another rectangle and apply the Extrude effect. In the Extrude dialog, use Map Art to map the symbol (of extruded rectangle).
    If you want to rotate them both along the same axis, either open the Appearance panel and change the already applied Extrude effect to rotate , or,
    Edit the symbol and rotate as required (this will reflect in the the whole doc) and rotate the another rectangle separately using Rotate tool.
    I hope it helps.

  • I have the exclamation point symbol next to podcasts that don't meet the criteria for said symbol based on the FAQ

    When I'm looking through and trying to manage my Podcast library within iTunes, I see the exclamation point symbol next to several. My first issue is the fact that there are many that have this symbol that I only wanted a few episodes and not a subscription. How can I fix this problem?
    My second issue is that for many of the podcasts with the exclamation point symbol, they don't fit the criteria based on what's in the Symbol FAQ, which states that there are too many unplayed episodes so new episodes won't download. For the podcasts in question, this is not the case, as all episodes have been listened to. What can be done to fix this problem?
    My third issue is the fact that when I DO play a podcast on my iPod Touch (4th Gen), I don't use the app (can't stand it), then go to sync it with the computer, these episodes are shown as having already been played PRIOR to the actual syncing happening. So, when I go to do the ACTUAL sync, the play count is off. Right now, I have to manually reset the play count so that the episodes that I listened to on my iPod Touch only show one play in the library count, not two or in some cases, three. How can I fix this problem?
    I have the most current version of iTunes and use Windows 7 64-bit.
    Thanks for ANY help!

    Try this Support Article  >  http://support.apple.com/kb/HT1808

  • Rotate object based on the mouse movement

    Hi, how can I do to make the object rotate based on the direction and movement of the mouse?
    Similar to this: http://activeden.net/item/billboard-style-xml-photo-viewer/22111
    Thanks in advanced.

    Hi ,
    I created a simple sample for you. Hope that helps!
    Basically on the image elements' ($("image")) mouse move you could add this snippet -
    // insert code to be run when the mouse is moved over the object
    var img = sym.$('image');
    var offset = img.offset();
    var center_x = (offset.left) + (img.width()/2);
    var center_y = (offset.top) + (img.height()/2);
    var mouse_x = e.pageX;
    var mouse_y = e.pageY;
    var radians = Math.atan2(mouse_x - center_x, mouse_y - center_y);
    var degree = (radians * (180 / Math.PI) * -1) + 90;
    img.css('-moz-transform', 'rotate('+degree+'deg)');
    img.css('-webkit-transform', 'rotate('+degree+'deg)');
    img.css('-o-transform', 'rotate('+degree+'deg)');
    img.css('-ms-transform', 'rotate('+degree+'deg)');
    Thanks and Regards,
    Sudeshna Sarkar

  • How do you rotate an object to any angle

    I have Adobe Acrobat 9 Pro. I am adding an object eg. square to the PDF file. I now want to rotate it to any angle, which I cannot do. I tried the help menu (TouchUp Object Tool) step by step and i am unsuccessfull. Please help.

    Thank you George for helping
    From Tools Menu. I selected customize toolbar, then selected rectangle tool from Comment and Markup Toolbar, then OK. Then from toolbar I selected the Rectangle and inserted it. I now need to rotate it.
    I have not tried the flattenning method, but after reading the notes by flattenning it becomes part of the page and can no longer be edited which is not what I require. Note I only need to rotate the little square on the page to any angle and not in 90 degree increments.
    The notes in the help topic (In Acrobat) on touchup object tool mentions it can be rotated incrementally, but when i follow the steps it does not work out. There is no handle to rotate the object.
    Regards
    Richard

  • How to show Hand Symbol when the cursor move to particular field.?

    Hi all,
    in alv report ,i have to give first column as link to action,and whenever  mouse came to that column a hand symbol ie,hot spot has to be appear .
    How can i do for that?
    Regards,
    ravi

    Hi
    When you make the Column as LinkToAction, then Hot Spot appears automatically
    Code to Make
    LinkToAction Column in ALV.
      DATA: lr_alv_usage       TYPE REF TO   if_wd_component_usage,
            lr_config          TYPE REF TO   cl_salv_wd_config_table,
            lr_col_header      TYPE REF TO   cl_salv_wd_column_header,
            lr_function_wd     TYPE REF TO   cl_salv_wd_function,
            lr_uie_link        TYPE REF TO   cl_salv_wd_uie_link_to_action,
            lr_if_controller   TYPE REF TO   iwci_salv_wd_table,
            lr_function_set    TYPE REF TO   if_salv_wd_function_settings,
            lr_table_settings  TYPE REF TO   if_salv_wd_table_settings,
            lr_column_settings TYPE REF TO   if_salv_wd_column_settings.
    Instantiate ALV Component
      lr_alv_usage = wd_this->wd_cpuse_all_alv( ).
      IF lr_alv_usage->has_active_component( ) IS INITIAL.
        lr_alv_usage->create_component( ).
      ENDIF.
    get reference to model
      lr_if_controller = wd_this->wd_cpifc_all_alv( ).
      lr_config        = lr_if_controller->get_model( ).
      lr_column_settings ?= lr_config.
    lr_column = lr_column_settings->get_column( '<Column Name>' ).
            CREATE OBJECT lr_uie_link.
            lr_uie_link->set_text_fieldname( '<COlumn Name>' ).
            ls_column-r_column->set_cell_editor( lr_uie_link ).
    Abhi
    Edited by: Abhimanyu Lagishetti on Jun 13, 2008 10:12 AM
    Edited by: Abhimanyu Lagishetti on Jun 13, 2008 10:13 AM
    Edited by: Abhimanyu Lagishetti on Jun 13, 2008 10:13 AM
    Edited by: Abhimanyu Lagishetti on Jun 13, 2008 10:14 AM

  • How can I dynamically create symbols based on data in a database? For example: as a user selects an option, we want to create color swatch buttons in a certain area on the screen.

    We have all of our data in a Microsoft SQL server database and would like to load fabric options, and then color choices, based on this data. As fabrics are added, and/or color choices are updated, we would like Edge Animate to update automatically, without having to open the project and add/change options. Ultimately we would like to build an interactive designer that would then send all of the user's selections to us in an order. Is this possible?

    There is no like, but contains
    contains(LAST_NAME,'A')

  • Please enhance my code so that it can rotate text at the given angle

    public class ShapeDrawD extends JApplet
    Image img,imgback;
    static Image someimg2;
    ShapeCanvas canvas;
    ShapeCanvas backcanvas;
    public static int txtimgflag = -1,size,angle;
    public static String stringToDraw = "";
    public static int fontSize;
    public static String fontName;
    public static String fontStyle;
    public static String imgName;
    public static ImageObserver io;
    public static Shape shapeBeingDraggedtemp = null;
    public static Shape shapeBeingEdited = null;
    static Font fontmain;
    static Color colormain;
    static Color frocolor;
    public static String color;
    static Shape s = null;
    static JLabel l1 = new JLabel("");
    static String msg="";
    static JSObject js;
    public static URL url;
    public static URLConnection conn;
    public static String hostname;
    public static int port;
    static int addnew = 0;
    public static String str1;
    public static int str2;
    public static int zx, zy, oldy, zwidth,zheight;
    public static float scalingfactor;
    //Method which is called from Java Script taking parameters related to string and used for drawing strings
    public void printSomething(String str,String lname,String lstyle,String lsize,String lcolor,String lmsg,String frcol,String ang)
    try
    addnew = 1;
    colormain= new Color((Integer.decode("0X".concat(lcolor))).intValue());
    frocolor= new Color((Integer.decode("0X".concat(frcol))).intValue());
    fontmain = new Font(lname,Integer.parseInt(lstyle),Integer.parseInt(lsize));
    stringToDraw = str;
    size=Integer.parseInt(lsize);
    angle=Integer.parseInt(ang);
    msg=lmsg;
    str1=lname;
    str2=Integer.parseInt(lstyle);
    txtimgflag=0;
    drawIt();
    repaint();
    catch(NumberFormatException nfe)
    System.out.println("Please Enter Proper Numeric values");
    public void strdelete()
    if(canvas.isVisible() && shapeBeingEdited != null)
    //System.out.println("3inggggggggg "+ ((StringShape)shapeBeingEdited).Mystring);
    canvas.deleteit(shapeBeingEdited);
    addnew = 0;
    drawIt();
    repaint();
    else if(backcanvas.isVisible() && shapeBeingEdited != null)
    //System.out.println("Deletinggggggggg "+ ((StringShape)shapeBeingEdited).Mystring);
    backcanvas.deleteit(shapeBeingEdited);
    addnew = 0;
    drawIt();
    repaint();
    //Method which is called from Java Script taking parameters related to Editing string and used for drawing Edited strings
    public void editText(String str,String lname,String lstyle,String lsize,String lcolor,String lmsg,String frcol,String ang)
    addnew=0;
    //System.out.println("addnew "+ addnew);
    colormain= new Color((Integer.decode("0X".concat(lcolor))).intValue());
    frocolor= new Color((Integer.decode("0X".concat(frcol))).intValue());
    fontmain = new Font(lname,Integer.parseInt(lstyle),Integer.parseInt(lsize));
    stringToDraw = str;
    size=Integer.parseInt(lsize);
    msg=lmsg;
    angle=Integer.parseInt(ang);
    txtimgflag = 0;
    if(shapeBeingEdited != null && shapeBeingEdited instanceof StringShape)
    ((StringShape)shapeBeingEdited).Mystring=stringToDraw;
    ((StringShape)shapeBeingEdited).Mycolor=colormain;
    ((StringShape)shapeBeingEdited).Myfont=fontmain;
    ((StringShape)shapeBeingEdited).msg=msg;
    ((StringShape)shapeBeingEdited).frcolor=frocolor;
    ((StringShape)shapeBeingEdited).Siz=new Integer(size);
    ((StringShape)shapeBeingEdited).ang=new Integer(angle);
    drawIt();
    repaint();
    //Method Called from JavaScript used To Draw an Image takes Image name as param
    public void setImgName(String limgName)
    txtimgflag = 1;
    addnew = 1;
    imgName = limgName;
    someimg2 = getImage(getDocumentBase(),imgName);
    //System.out.println("Path -- >"+getDocumentBase() + imgName);
    MediaTracker mt = new MediaTracker(this);
    mt.addImage(someimg2,1);
    try
    mt.waitForAll();
    catch(Exception e)
    e.printStackTrace();
    drawIt();
    repaint();
    public void setImageWidthHeight(String lparamwidth,String lparamHeight)
    int width = Integer.parseInt(lparamwidth);
    int height = Integer.parseInt(lparamHeight);
    if(shapeBeingEdited != null && shapeBeingEdited instanceof ImageShape)
    addnew=0;
    ((ImageShape)shapeBeingEdited).htwtimg(width,height);
    drawIt();
    repaint();
    /*Method to save Image on the Server .
    this methos makes a call to servlet and passes ImageIcon to it which is then saved
    as a jpeg file on given path
    public void uploadImage(BufferedImage fimg,BufferedImage bimg)
    try
    String path = "http://"+hostname+":"+port+"/javatool/sampleServlet";
    url = new URL(path);
    //System.out.println("after url");
    //System.out.println("Path--->"+path);
    conn = url.openConnection();
    conn.setDoInput(true);
    conn.setDoOutput(true);
    conn.setUseCaches(false);
    conn.setRequestProperty("Content-type", "application/x-java-serialized-object");
    BufferedImage bi = fimg;
    Image imgg=(Image)bi;
    ImageIcon imgc = new ImageIcon(imgg);
    ObjectOutputStream out = new ObjectOutputStream(conn.getOutputStream());
    out.writeObject(imgc);
    bi = null;
    imgg= null;
    imgc= null;
    out.flush();
    bi = bimg;
    imgg=(Image)bi;
    imgc = new ImageIcon(imgg);
    out.writeObject(imgc);
    out.flush();
    out.close();
    //System.out.println("file saved...");
    InputStream ins = conn.getInputStream();
    ObjectInputStream objin = new ObjectInputStream(ins);
    String msg = (String)objin.readObject();
    //System.out.println(msg.toString());
    catch (java.io.IOException io)
    //System.out.println("IOException ----->" + io);
    catch (Exception e)
    //System.out.psrintln("Exception " + e);
    }//End of Upload
    //Applet Init()
    public void init()
    js = JSObject.getWindow(this);
    hostname = getCodeBase().getHost();
    port = getCodeBase().getPort();
    //System.out.println("HostName -->" + hostname );
    //System.out.println("port -->" + port);
    JButton buttcolor = new JButton("Choose Color");
    JButton front = new JButton("Front");
    JButton back = new JButton("Back");
    /*JButton save = new JButton("Save");*/
    img = getImage(getDocumentBase(),getParameter("img"));
    //System.out.println(getDocumentBase() +" \\ "+getParameter("img"));
    canvas = new ShapeCanvas(img);
    imgback = getImage(getDocumentBase(),getParameter("imgback"));
    backcanvas = new ShapeCanvas(imgback);
    scalingfactor = (float) 1.0;
    // txtimgflag = 2;
    getContentPane().setLayout(null);
    getContentPane().setSize(325,300);
    io = (ImageObserver)this;
    addMouseListener(canvas);
    addMouseListener(backcanvas);
    JPanel top = new JPanel();
    JPanel bottom = new JPanel();
    top.add(front);
    top.add(back);
    top.setSize(425,50);
    top.setLocation(0,0);
    final JColorChooser colorchooser = new JColorChooser();
    final JFrame internalfrm = new JFrame("Please Choose the Colors");
    internalfrm.setSize(450,320);
    internalfrm.setVisible(false);
    internalfrm.getContentPane().add(colorchooser);
    canvas.setSize(425,370);
    canvas.setLocation(0,50);
    backcanvas.setSize(425,370);
    backcanvas.setLocation(0,50);
    backcanvas.setVisible(false);
    bottom.setLayout(null);
    buttcolor.setLocation(175,10);
    buttcolor.setSize(120,30);
    /*save.setLocation(220,10);
    save.setSize(120,30);*/
    l1.setLocation(10,45);
    l1.setSize(300,30);
    bottom.add(l1);
    bottom.add(buttcolor);
    /*bottom.add(save);*/
    bottom.setSize(425,100);
    bottom.setLocation(0,420);
    bottom.setBackground(Color.lightGray);
    getContentPane().add(top);
    getContentPane().add(bottom);
    getContentPane().add(backcanvas);
    getContentPane().add(canvas);
    //sets Background of two panels i.e front and back
    colorchooser.getSelectionModel().addChangeListener(new ChangeListener()
    public void stateChanged(ChangeEvent e)
    canvas.setBackground(colorchooser.getColor());
    backcanvas.setBackground(colorchooser.getColor());
    //Shows Color Chooser
    buttcolor.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    internalfrm.setVisible(true);
    //Show back panel and hide front
    back.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    canvas.setVisible(false);
    backcanvas.setVisible(true);
    //backcanvas.repaint();
    //Show front panel and hide back
    front.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    backcanvas.setVisible(false);
    canvas.setVisible(true);
    *Save Image a call to UploadIamge
    save.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    uploadImage(canvas.bimg,backcanvas.bimg);
    drawIt();
    repaint();
    } //End of Applet Init();
    //Generates a Action Event calling ActionPerformed
    public void drawIt()
    ActionEvent evt=new ActionEvent(this,1,"HTML");
    if(canvas.isVisible())
    canvas.actionPerformed(evt);
    else
    backcanvas.actionPerformed(evt);
    //Paint of Applet
    public void paint(Graphics g)
    super.paint(g);
    //Update of Applet
    public void update(Graphics g)
    paint(g);
    //A panel Implemented to have Images Drawn on it
    static class ShapeCanvas extends JPanel implements ActionListener, MouseListener, MouseMotionListener,Runnable
    ArrayList shapes = new ArrayList();
    Color currentColor = Color.red;
    Image limg;
    BufferedImage bimg = new BufferedImage(430,400,BufferedImage.TYPE_INT_ARGB);
    Thread t = new Thread(this);
    ShapeCanvas(Image img)
    limg = img;
    addMouseListener(this);
    addMouseMotionListener(this);
    this.setBackground(Color.white);
    // t.start();
    zx = this.size().width / 2;
    zy = this.size().height / 2;
    zwidth = limg.getWidth(this);
    zheight =limg.getHeight(this);
    System.out.println("The parameter are"+zwidth+"and"+zheight);
    t.start();
    public void run()
    try
    for(int i=0;i<25;i++)
    repaint();
    t.sleep(250);
    repaint();
    catch(InterruptedException iee)
    public void updateComponent(Graphics g)
    paintComponent(g);
    public void deleteit(Shape shapetodelete)
    if(shapeBeingEdited != null)
    shapes.remove(shapeBeingEdited);
    repaint();
    public void paintComponent(Graphics go)
    //System.out.println("Called");
    super.paintComponent(go);
    go.drawImage(bimg,0,0,this);
    Graphics g = bimg.getGraphics();
    g.setColor(getBackground());
    g.drawRect(0,0,getSize().width,getSize().height);
    g.fillRect(0,0,getSize().width,getSize().height);
    g.drawImage(limg,0,0,this);
    /*zx = limg.size().width / 2;
    zy = this.size().height / 2;
    zwidth = limg.getWidth(this);
    zheight =limg.getHeight(this);*/
    zwidth *= scalingfactor;
    zheight *= scalingfactor;
    zx -= zwidth / 2;
    zy -= zheight /2;
    System.out.println("The values are"+zwidth);
    g.drawImage(limg, zx, zy, zwidth, zheight, this);
    int top = shapes.size();
    for (int i = 0; i < top; i++)
    s = (Shape)shapes.get(i);
    s.draw(g);
    g.dispose();
    go.dispose();
    public void actionPerformed(ActionEvent evt)
    //System.out.println(evt.getActionCommand());
    if(addnew == 1)
    //System.out.println("in new obj addnew "+ addnew);
    currentColor=Color.decode("1024");
    if(txtimgflag==0)
         System.out.println("string Function called");
    addShape(new StringShape(stringToDraw,fontmain,colormain,frocolor,msg,size,angle,str1,str2));
    else if(txtimgflag == 1)
    System.out.println("image function called");
    addShape(new ImageShape(someimg2));
    else if(txtimgflag==2)
    addShape(new ImageString(stringToDraw,fontmain,colormain,angle,size));
    System.out.println("txtimgflag in if else="+txtimgflag);
    else if(txtimgflag==3)
    addShape(new StyledString(stringToDraw,colormain,angle,size,str1,str2));
    System.out.println("txtimgflag in if else="+txtimgflag);
    repaint();
    void addShape(Shape shape)
    shape.setColor(currentColor);
    if(txtimgflag == 0)
    shape.reshape(150,80,100,20);
    shapes.add(shape);
    else if(txtimgflag == 1)
    shape.reshape(150,50,shape.width,shape.height);
    shapes.add(shape);
    else if(txtimgflag == 2)
    shape.reshape(150,50,100,100);
    shapes.add(shape);
    System.out.println("Image shape="+txtimgflag);
    else if(txtimgflag == 3)
    shape.reshape(150,60,100,100);
    shapes.add(shape);
    System.out.println("Image shape="+txtimgflag);
    repaint();
    Shape shapeBeingDragged = null;
    int prevDragX;
    int prevDragY;
    public boolean handleEvent (Event e)
    System.out.println("In zooming section");
    switch (e.id)
    case (Event.MOUSE_DOWN):
    oldy = e.y;
    return super.handleEvent(e);
    case (Event.MOUSE_UP):
    if (oldy > e.y)
    scalingfactor += (float) .1;
    else scalingfactor -= (float) .1;
    if (scalingfactor > (float) 5.0)
    scalingfactor = (float)5.0;
    if (scalingfactor < (float) .1)
    scalingfactor = (float).1;
    oldy = e.y;
    repaint();
    return super.handleEvent(e);
    default:
    return super.handleEvent(e);
    public void mousePressed(MouseEvent evt)
    int x = evt.getX();
    int y = evt.getY();
    for ( int i = shapes.size() - 1; i >= 0; i-- )
    Shape s = (Shape)shapes.get(i);
    if (s.containsPoint(x,y))
    shapeBeingDragged = s;
    shapeBeingDraggedtemp =s;
    shapeBeingEdited = s;
    prevDragX = x;
    prevDragY = y;
    // shapeBeingEdited = s;
    if(shapeBeingEdited instanceof ImageShape)
    try
    Object obj[] = new Object[2];
    obj[0]=new Integer(((ImageShape)shapeBeingEdited).width);
    obj[1]=new Integer(((ImageShape)shapeBeingEdited).height);
    js.call("setValuesimg",obj);
    System.out.println("found Image shape");
    catch (JSException ex)
    else if(shapeBeingEdited instanceof StringShape)
    try
    String foreColor=Integer.toHexString(((StringShape)shapeBeingEdited).Mycolor.getRGB() );
    foreColor=( foreColor.substring(2)).toUpperCase();
    String backColor=Integer.toHexString(((StringShape)shapeBeingEdited).frcolor.getRGB() );
    backColor=( backColor.substring(2)).toUpperCase();
    //System.out.println("found string shape");
    Object obj[] = new Object[7];
    obj[0] = ((StringShape)shapeBeingEdited).Mystring;
    obj[1] = ((StringShape)shapeBeingEdited).Myfont.getFontName();
    obj[2] = foreColor;
    obj[3] = ((StringShape)shapeBeingEdited).msg;
    obj[4] = backColor;
    obj[5] = ((StringShape)shapeBeingEdited).Siz;
    obj[6] = ((StringShape)shapeBeingEdited).ang;
    js.call("setValues",obj);
    catch (JSException ex)
    else if(shapeBeingEdited instanceof ImageString)
    System.out.println("bulls eye");
    if (evt.isShiftDown())
    shapes.remove(s);
    shapes.add(s);
    repaint();
    if(evt.isAltDown())
    shapes.remove(s);
    repaint();
    else
    l1.setText("");
    if(evt.isControlDown())
    if(s instanceof ImageShape)
    if(evt.getButton() == MouseEvent.BUTTON1)
    s.htwt((s.width+1),(s.height+1));
    repaint();
    else if(evt.getButton() == MouseEvent.BUTTON3)
    s.htwt((s.width-1),(s.height-1));
    repaint();
    return;
    }//end of if
    else
    //shapeBeingEdited = null;
    public void mouseDragged(MouseEvent evt)
    int x = evt.getX();
    int y = evt.getY();
    if (shapeBeingDragged != null)
    shapeBeingDragged.moveBy(x - prevDragX, y - prevDragY);
    prevDragX = x;
    prevDragY = y;
    repaint();
    /*if(globalGrahics == null)
    System.out.println("globalGrahics is null ");
    globalGrahics = this.getGraphics();
    else
    globalGrahics.setColor(Color.CYAN);
    globalGrahics.drawRect(shapeBeingEdited.left,shapeBeingEdited.top,shapeBeingEdited.width+10,shapeBeingEdited.height);
    public void mouseReleased(MouseEvent evt)
    int x = evt.getX();
    int y = evt.getY();
    if (shapeBeingDragged != null) {
    shapeBeingDragged.moveBy(x - prevDragX, y - prevDragY);
    if ( shapeBeingDragged.left >= getSize().width || shapeBeingDragged.top >= getSize().height ||
    shapeBeingDragged.left + shapeBeingDragged.width < 0 ||
    shapeBeingDragged.top + shapeBeingDragged.height < 0 )
    //shapes.remove(shapeBeingDragged);
    if(x <=20 || y <= 20 || x >340 || y >330)
    shapeBeingDragged.left = (150);
    shapeBeingDragged.top = (100);
    repaint();
    shapeBeingDragged = null;
    repaint();
    public void mouseEntered(MouseEvent evt){repaint();}
    public void mouseExited(MouseEvent evt){}
    public void mouseMoved(MouseEvent evt)
    if(evt.isControlDown())
    l1.setText("Left Click on Image to Zoom in , Right to Zoom out");
    else if(evt.isAltDown())
    l1.setText("Click on Image or Text to Delete");
    else if(evt.isShiftDown())
    l1.setText("Click on Image to bring it forward");
    else
    l1.setText("");
    public void mouseClicked(MouseEvent evt)
    int x = evt.getX();
    int y = evt.getY();
    if(evt.getClickCount()>=2)
    for ( int i = shapes.size() - 1; i >= 0; i-- )
    Shape s = (Shape)shapes.get(i);
    if (s.containsPoint(x,y))
    shapeBeingEdited = s;
    }//end of shapeCanvas
    static abstract class Shape
    int left, top;
    int width, height;
    Color color = Color.white;
    void reshape(int left, int top, int width, int height)
    this.left = left;
    this.top = top;
    this.width = width;
    this.height = height;
    void htwt(int width,int height)
    this.width = width;
    this.height = height;
    void moveBy(int dx, int dy)
    left += dx;
    top += dy;
    void setColor(Color color)
    this.color = color;
    boolean containsPoint(int x, int y)
    if (x >= left && x < left+width && y >= top && y < top+height)
    return true;
    else
    return false;
    abstract void draw(Graphics g);
    }//end of abstarct shape class
    static class StringShape extends Shape
    String Mystring;
    Font Myfont ;
    Color Mycolor;
    Color frcolor;
    String msg="",font;
    Integer Siz,ang;
    int font_size;
    int w,size,angle,w1,style;
    int speed= 12;
    StringShape(String lstr,Font lfont,Color lcolor,Color lfcolor,String lmsg,int lsiz,int lang,String lfon,int lsty)
    Mystring = lstr;
    Myfont = lfont;
    Mycolor = lcolor;
    frcolor = lfcolor;
    size=lsiz;
    msg = lmsg;
    angle=lang;
    Siz= new Integer(lsiz);
    style=lsty;
    font=lfon;
    System.out.println("In the String shape");
    int ShiftNorth(int p, int distance)
    return (p - distance);
    int ShiftSouth(int p, int distance)
    return (p + distance);
    int ShiftEast(int p, int distance)
    return (p + distance);
    int ShiftWest(int p, int distance)
    return (p - distance);
    BufferedImage bimg,temp,bimg1,bimg2,bimg3;
    void draw(Graphics g)
    g.setColor(Mycolor);
    g.setFont(this.Myfont);
    int wt=g.getFontMetrics().stringWidth(Mystring);
    int ht=g.getFontMetrics().getHeight();
    this.htwt(wt,ht);
    int h1=size ;
    temp = new BufferedImage(10,10,BufferedImage.TYPE_INT_ARGB);
    Graphics lgimg = temp.getGraphics();
    Graphics2D gimg = (Graphics2D)lgimg;
    gimg.setFont(Myfont);
    gimg.setColor(Mycolor);
    int w2=g.getFontMetrics().stringWidth(Mystring);
    int len=Mystring.length();
    int w1=(w2*len);
    this.htwt(w1,w2);
    System.out.println("The length"+len);
    bimg = new BufferedImage(w1,w1,BufferedImage.TYPE_INT_ARGB);
    temp=null;
    lgimg = bimg.getGraphics();
    gimg = (Graphics2D)lgimg;
    gimg.setFont(Myfont);
    gimg.setColor(Mycolor);
    if(msg.equals("outlined"))
    w2=g.getFontMetrics().stringWidth(Mystring);
    System.out.println("tWidth"+w2+"theight"+h1);
    len=Mystring.length();
    w1=(w2*len);
    bimg1 = new BufferedImage(w1,w1,BufferedImage.TYPE_INT_ARGB);
    lgimg = bimg1.getGraphics();
    gimg = (Graphics2D)lgimg;
    System.out.println("Message --> " + msg);
    gimg.setColor(Mycolor);
    gimg.drawString(this.Mystring, ShiftWest((left+5), 1), ShiftNorth((top+Myfont.getSize()), 1));
    gimg.drawString(this.Mystring, ShiftWest((left+5), 1), ShiftSouth((top+Myfont.getSize()), 1));
    gimg.drawString(this.Mystring, ShiftEast((left+5), 1), ShiftNorth((top+Myfont.getSize()), 1));
    gimg.drawString(this.Mystring, ShiftEast((left+5), 1), ShiftSouth((top+Myfont.getSize()), 1));
    g.drawImage(bimg1,left+5,top,null);
    gimg.setColor(frcolor);
    gimg.drawString(this.Mystring, ShiftEast((left+5), 1), ShiftSouth((top+Myfont.getSize()), 1));
    g.drawImage(bimg1,left+5,top,null);
    else if(msg.equals("segment"))
    System.out.println("Message --> " + msg);
    int w = (g.getFontMetrics()).stringWidth("Segment");
    int h = (g.getFontMetrics()).getHeight();
    int d = (g.getFontMetrics()).getDescent();
    g.setColor(Mycolor);
    g.drawString(this.Mystring, (left+5), (top+Myfont.getSize()));
    g.setColor(frcolor);
    for (int i = 0; i < h; i += 3)
    g.drawLine((left+5), (top+Myfont.getSize()) + d - i, (left+wt) + w, (top+Myfont.getSize()) + d - i);
    else if(msg.equals("3d"))
    w2=g.getFontMetrics().stringWidth(Mystring);
    System.out.println("tWidth"+w2+"theight"+h1);
    len=Mystring.length();
    w1=(w2*len);
    bimg2 = new BufferedImage(w1,w1,BufferedImage.TYPE_INT_ARGB);
    lgimg = bimg2.getGraphics();
    gimg = (Graphics2D)lgimg;
    Color top_color = new Color(200, 200, 0);
    System.out.println("Message --> " + msg);
    for (int i = 0; i < 5; i++)
    gimg.setColor(top_color);
    gimg.drawString(this.Mystring, ShiftEast((left+4), i), ShiftNorth(ShiftSouth((top+Myfont.getSize()), i), 1));
    gimg.setColor(frcolor);
    gimg.drawString(this.Mystring, ShiftWest(ShiftEast((left+4), i), 1), ShiftSouth((top+Myfont.getSize()), i));
    gimg.setColor(Mycolor);
    gimg.drawString(this.Mystring, ShiftEast((left+4), 5), ShiftSouth((top+Myfont.getSize()), 5));
    g.drawImage(bimg2,left+10,top,null);
    else if(msg.equals("flow"))
    System.out.println("Message"+msg);
    int len1=Mystring.length();
    int lsize=size;
    int lleft =25;
    int ltop = g.getFontMetrics().getHeight();
    w1=g.getFontMetrics().stringWidth(Mystring);
    System.out.println("The value of w1 is"+w1);
    for(int j=0;j<Mystring.length();j++)
         w1=w1+size;
         System.out.println("Size"+w1);
    bimg3 = new BufferedImage(w1,w1,BufferedImage.TYPE_INT_ARGB);
    lgimg = bimg3.getGraphics();
    gimg = (Graphics2D)lgimg;
    gimg.setFont(new Font(font,style,lsize));
    gimg.setColor(Mycolor);
    for (int i = 0; i<Mystring.length(); i++)
    gimg.setFont(new Font(font,style,lsize));
    ltop= ltop+5;
    gimg.drawString(""+Mystring.charAt(i),lleft,ltop);
    //gimg.drawRect(lleft,ltop-20,gimg.getFontMetrics().charWidth(Mystring.charAt(i)),gimg.getFontMetrics().getHeight());
    lleft=lleft+gimg.getFontMetrics().charWidth(Mystring.charAt(i));
    lsize = lsize + 5;
    g.setColor(Mycolor);
    // g.drawRect(left+5,top,bimg.getWidth(),bimg.getHeight());
    g.drawImage(bimg3,left+5,top,null);
    else
         // g.drawString(this.Mystring,(left+5),(top+Myfont.getSize()));
    gimg.drawString(Mystring,30,10);
    g.drawImage(bimg,left+10,top,null);
    }//end of Draw Function
    static class ImageShape extends Shape
    Image someimg;
    ImageShape(Image lsomeimg)
    someimg = lsomeimg;
    width = someimg.getWidth(null);
    height = someimg.getHeight(null);
    System.out.println("constr width "+width+ " height"+ height);
    this.htwtimg(width,height);
    void htwtimg(int width,int height)
    this.width = width;
    this.height = height;
    System.out.println("its from image");
    void draw(Graphics g)
    g.drawImage(this.someimg,left,top,width,height,io);
    }//END OF IMageShape Class
    static class ImageString extends Shape
    String bstring;
    int ang,siz;
    Font lfont;
    Color lcolor;
    ImageString(String istr,Font lfon,Color lclr,int lang,int lsiz)
         bstring=istr;
         ang=lang;
         siz=lsiz;
         lfont=lfon;
         lcolor=lclr;
    BufferedImage bimg,temp;
    public void draw(Graphics g)
    int h=siz;
    temp = new BufferedImage(10,10,BufferedImage.TYPE_INT_ARGB);
    Graphics lgimg = temp.getGraphics();
    Graphics2D gimg = (Graphics2D)lgimg;
    gimg.setFont(lfont);
    System.out.println("Font is"+lfont);
    gimg.setColor(lcolor);
    int w=g.getFontMetrics().stringWidth(bstring);
    System.out.println("tWidth"+w+"theight"+h);
    int len=bstring.length();
    int w1=(w*len);
    System.out.println("The length"+len);
    bimg = new BufferedImage(w1,w1,BufferedImage.TYPE_INT_ARGB);
    temp=null;
    lgimg = bimg.getGraphics();
    gimg = (Graphics2D)lgimg;
    gimg.setFont(lfont);

    can you tell in short what are you doing and what you wish to do.

  • Rotate a circle based on UITouch

    Ok.
    I'm racking my brain on this one.
    Onscreen I have an object (UIImageView) that I want to be able to rotate with my finger. Basically touch it and move my finger around and have it rotate on it's center to follow my finger.
    Rotating the image is no big deal, I give it the radial that I want it to rotate on(0-360) and it aligns itself nicely.
    CGAffineTransform imgObjectRot = CGAffineTransformMakeRotation(radians(90));
    [imgObject setTransform:imgObjectRot];
    static inline float radians (double degrees) {
    return degrees * M_PI/180;
    My problem is when I incorporate the touch. I can't figure out a way of finding the angle from the center of the image to the touch location.
    Should be a simple formula based on x1,y1 and x2,y2. In fact I found some examples but the math is pretty complicated - and the iPhone doesn't seem to have the built in math functions like ATAN.
    Anyhow, there must be some easier / built in way that I'm missing.
    I don't know if it makes sense to find the degrees between the two locations or if I can "attach" the touch location to the image object and follow it with some built in commands.
    Any ideas?

    I'm a n00b have a knob as well, and have no problem with a simple CGAffineTransformMakeRotation(RotationInRadians) being called after a swipe gesture.
    I image you are using the ATAN function and the distance between touch down and touch up hortizontally to "scale" the rotation of the knob. I haven't gotten there yet...
    My issue is this: I have a processRightSwipe rotation (CGAffineTransformMakeRotation) with positive radians, and a processLeftSwipe with negative radians.
    I animate the rotation, but when the animation is completed and I swipe the other direction, instead of returning to the original knob position, it treats the "zero angle" as the position and rotates to an undesired position in the opposite direction. Not sure how to get the knob (representing 'volume' levels in a game) to 'increase' or 'decrease' by the desired 36 degrees 'notches' with each swipe. (Later I will attempt to use the ATAN function to 'spin' the dial based off the distance the swipe covers. Right?)
    I guess what I need is a rotation property to "reset" after the animation (Rotate, then zero out the angle?).
    Or is there something my non-engineer self is missing?

  • Can I use an animated symbol acting like a mouse cursor?

    Hi,
    I'd like to use an EDGE animated symbol ( a blinking magic wand) as my mouse cursor (hiding the original cursor) that stays on the stage all the time at a certain point in the timeline and when clicked on a hotspot, goes to another point in timeline where the symbol no longer act as a mouse cursor. I used the following code suggested in the following thread by YOSHIOKA Ume
    Re: How to I have an animated symbol follow the coordinates of the cursor when clicked?
    1:create a symbol named "Symbol_1"
    2:add this code on Symbol_1-Timeline.complete.
    //delete this instance when timeline complete. sym.deleteSymbol();
    3:add this code on document.compositionReady.
    //on/off mousemove event handler method
    sym.$("Stage")  
    .mouseover(function(){    
    sym.$("Stage").on("mousemove",draw);  
    //create instance of Symbol_1 on stage.
    function draw(evt){  
    var instance = sym.createChildSymbol("Symbol_1", "Stage");  
    instance.getSymbolElement().css({    
    position:"absolute",    
    top:evt.clientY,    
    left:evt.clientX   });
    But the problem is, the symbol is being repeated/drawn one after another according to the above code, which I don't want. Changing the cursor using CSS requires a URL of a image file, not a symbol inside EDGE as it seems. How can I get back the normal mouse cursor in another point in the timeline (and go back to the animated symbol mode again if needed?). If I click on another hotspot element on the stage, do I actually click on the attached symbol as a cursor? Or the hotspot?
    Also, how can I put a constraint on the cursor so that it stays within a certain rectangular area smaller than the stage?
    A suggestion is much appreciated.

    Here is a example I had to move a symbol around as a mouse cursor and play different part of the symbol timeline based on user action.
    mouseCursor.zip - Google Drive
    To constraint the symbol to stage area,check for the x and y values in the event callback function before moving the symbol.
    To get back the normal cursor set the css back to default
    ex: sym.getSymbol('Stage').getSymbolElement().css({ 'cursor' : 'default'});

  • Need help with 3D carousel gallery rotation to a specific angle

    Hi,
    I am making a 3d gallery, that has a menu underneath it. When clicking to a menu link, the gallery will rotate itself to a certain angle (photo) connected with the menu link. I am using FlashAndMaths 3D cylindrical gallery scripts (XML Customizable 3D Cylindrical Photo Gallery in Flash) as the base (as I couldn't find any free or neither payed 3d galleries that would have a menu connected to the carousel!).
    The function to rotate a carousel of thumbnails is the following:
    public function doRotate(ang:Number):void {  
                if(isLoading || notReady){       
                        return;
                if(!this.contains(container)){
                    return;
                var i:int;
                 for(i=0;i<numCols;i++){
                   colsVec[i].rotationY+=ang;
                   colsVec[i].rotationY=colsVec[i].rotationY%360;
                   if((colsVec[i].rotationY>90+diffAng && colsVec[i].rotationY<270-diffAng) || (colsVec[i].rotationY<-(90+diffAng) && colsVec[i].rotationY>-(270-diffAng))){
                          if(container.contains(colsVec[i])){
                              container.removeChild(colsVec[i]);
                         } else {   
                                   if(!container.contains(colsVec[i])){
                                     container.addChild(colsVec[i]);
    This will rotate the carousel as an infinite loop. However - I need the function to stop at a certain angle e.g. 45% (and/or reset itself to 0%). Another option would be to stop the carousel at a certain thumbnail container.
    The function to create a carousel is here:
    thumbWidth=thumbsArray[0][0].width;
    thumbHeight=thumbsArray[0][0].height;
    colsVec=new Vector.<Column>();
    colHeight=thumbHeight*colLen+(colLen-1)*pxSpace;
    colWidth=thumbWidth;
    rad=galLoader.radius;
    angle=360/numCols;
    container=new Sprite();
    this.addChild(container);
    containerWidth=2*rad;
    vertAddOn=40;
    vertDrop=15;
    containerHeight=colHeight+vertAddOn;
    container.x=containerWidth/2;
    container.y=containerHeight/2+vertDrop;
    contMask=new Shape();
    this.addChild(contMask);
    contMask.x=container.x;
    contMask.y=container.y;
    prepContainer();
    diffAng=Math.round((Math.asin(rad/fL)*180/Math.PI)*1000)/1000; 
    for(i=0;i<numCols;i++){
    colsVec[i]= new Column(thumbsArray[i],pxSpace,rad);
    container.addChild(colsVec[i]);
    colsVec[i].y=0;
    colsVec[i].x=0; 
    colsVec[i].z=0;
    colsVec[i].rotationY=angle*i;
    if((colsVec[i].rotationY>90+diffAng && colsVec[i].rotationY<270-diffAng) || (colsVec[i].rotationY<-(90+diffAng) && colsVec[i].rotationY>-(270-diffAng))){
    if(container.contains(colsVec[i])){
    container.removeChild(colsVec[i]);
    } else {
    if(!container.contains(colsVec[i])){
    container.addChild(colsVec[i]);
    Could anyone help me as I'm out of ideas!

    Hi, well, unfortunately asking help from forums is my last option, there really isn't many people around anymore, who'd use Flash!
    Also, I couldn't find neither free or payed scripts or examples online, that could do this - so, it's just me and forums.
    I really do appreciate that you've tried to help me- I just need a bit clearer reference (as I'm just not really used to use AS), so that I could try to search and/or figure out how to solve that problem.
    By "call doRotate() and pass the difference between the current rotation and the desired rotation.", did you mean something like this:
    private function onEnter(e:Event):void {
    if (rotate){
    this.doRotate(1);
    if(    //so, here I should use something that would locate the desired position, so something like currentFrame or would you have any better ideas?
    // should I also add something like doRotate.stop(); here?
    this.removeEventlistener(Event.ENTER_FRAME,onEnter);
    Or am I going the wrong way?

  • Reg. cursor based delete! Little Urgent!

    Hi all,
    While accessing for a change now, i need to delete the values that came out of the cursor.
    For an Exting functionality: I am fetching few values by a cursor and i am starting a loop for executing few condtions based on the records available in the cursor. there after i am explicitly closing the cursor. The issue i have now is, since i am using the loop the pointer would be in some row x or y or z after executing the loop. Now, my question is, If i delete by using the where current of clause by giving the cursor will all the rows that came from the cursor be deleted? Before Planning the above way, i am moving the close cursor statement towards the end of my Function.
    The existing functional code is like below:
    CURSOR ship_unit_det_cur IS SELECT CNTNR_I
              FROM SHIP_UNIT_DET
              WHERE SHIP_UNIT_I = prm_cnt_i;
    Some set of statements
    BEGIN
    OPEN ship_unit_det_cur;
    FETCH ship_unit_det_cur INTO var_cnt_i;
    if ship_unit_det_cur%NOTFOUND then /* if empty */
    if(prm_log_err = 'Y') then
    err_ret_code2 := dsh_insert_drvt_evnt (prm_cnt_i, 'SHP', 'DVRT',
                   SYSDATE, USER, prm_hi_lvl_strg_i,
                             NULL, prm_load_grp_i, prm_dvrt_mthd_i, 8109);
    end if;
    commit;
    return 8109;
    end if;
    LOOP
    FETCH ship_unit_det_cur INTO var_cnt_i;
    EXIT WHEN ship_unit_det_cur%NOTFOUND;
    stproc_loc := 'dsh_load 2';
    err_ret_code := dsh_load_cntnrs_pkg.dsh_load (var_cnt_i,
                   var_prm_cnt_par_i,
                   prm_load_grp_i,
                   prm_hi_lvl_strg_i,
                   prm_dvrt_mthd_i,
                   prm_store_door_assn_i,
                   dummy,
                   prm_pgm_n,
                   'Y',
    NULL);
    if(err_ret_code = 8999) then /* on system error, always quit */
    stproc_loc := 'LoadDet 2';
    errdesc := prm_cnt_i || ' Failed fo load detail for ' || var_cnt_i;
    RAISE SYSTEM_ERROR;
    end if;
    END LOOP;
    CLOSE ship_unit_det_cur;
    END;
    Some set of statements
    Now delete the shipping unit information
    BEGIN
    stproc_loc := 'DletShipUnit';
    savepoint DELETE_SHIP_UNIT;
    delete from ship_unit_det where ship_unit_i = prm_cnt_i;
    if(prm_reusbl_f = 'N') then -- non-reusable master
    delete from shipping_unit where ship_unit_i = prm_cnt_i;
    end if;
    EXCEPTION
    WHEN OTHERS THEN
    rollback to DELETE_SHIP_UNIT;
    stproc_loc := 'DelShUn';
    errdesc := prm_cnt_i || ' Failed to delete shipping unit';
    RAISE SYSTEM_ERROR;
    END;
    In the above Begin and End Block, For the new proposed change functional code, i need to delete based on cursor. Hence forth i am planning to add the for update clause in my Cursor statement to lock the cursor values till i execute the delete.
    And in delete i am using the where current of clause. Now the question is where do i put the commit? As you can see in the above block, after i replace the delete by following,
    -- delete from ship_unit_det where ship_unit_i = prm_cnt_i;
    delete from ship_unit_det where current of ship_unit_det_cur;
    to unlock the cursor i need to place a commit. If some operation fail in the if condition below the proposed change, the rollback to the save point need to happen! so, can i place the commit in the place below Exception and end statement like:
    EXCEPTION
    WHEN OTHERS THEN
    rollback to DELETE_SHIP_UNIT;
    stproc_loc := 'DelShUn';
    errdesc := prm_cnt_i || ' Failed to delete shipping unit';
    RAISE SYSTEM_ERROR;
    COMMIT;
    CLOSE ship_unit_det_cur;
    END;
    Or Is there any other way to process the same?

    How about the Commit statement? Is that ok, if i give
    it between the Exception and the End?
    Like the below:
    EXCEPTION
    WHEN OTHERS THEN
    rollback to DELETE_SHIP_UNIT;
    stproc_loc := 'DelShUn';
    errdesc := prm_cnt_i || ' Failed to delete
    shipping unit';
    RAISE SYSTEM_ERROR;
    COMMIT;
    CLOSE ship_unit_det_cur;
    END;You do realise that the moment the RAISE system_error is encountered this block is left and the COMMIT and CLOSE ship_unit_det_cur will never be executed, right?

  • Rotating Image at Diff Angle

    I have one clock application.
    In my Application i have given some option for changing the background. It is working fine.
    Also I have used drawLine method for drawing Minute Hour and Second hand. All this hand are simply a line.
    Now i want to draw an Image for Hour, Minute and Second hand instead of a Line so that i can provide an option of changing this Image
    but the problem is that How can i rotate the Image .
    Can any one tell me how to rotate an Image at various angle?...........
    please please
    Thanks in Advance

    Is it Possible to rotate the Image ?..........................
    can any one give me some code or algorithm for it ?.......
    pleaseeeeeeeeeee

Maybe you are looking for

  • Query to get values based on a date range.

    11g. Hi there, I have a simple requirement(hopefully). I have a parameter which is basically a count range which when I pass the sql query should fetch the values from a column falling in that range. My table is item details Item                  cos

  • Read-only file issue in PQA

    We found an issue in the 1.0.0.4 version of PQA. When selecting a media reference file the 'Frames' indicator is not populated and the file path remains greyed-out if the file is marked as read-only. When it is not read-only everything is peachy keen

  • The sync of isn't completing for hours. help!

    when i sync my iphone 4, when the sync reaches step 7 it get stuck there for hours and doesnt proceed how do i get my phone to synce fully. HELP PLS!!

  • Pages to component to create Media Player Flip

    Hi Everyone... I'm creating my portfolio using Catalyst and have a question.  I have buttons (thumbnail of art work) that when rolled over, shows a larger image in a central location. In another project I created a media player to play each media typ

  • JAI TIFF

    I'm trying to convert a PDF to TIFF. This part works fine, but the size of the TIFF worries me however. The PDF's i'm converting have a size of 4 kb, and the TIFF outputs to almost 3 mb. How do i get around this problem? Can i compress the TIFF in an