How do i increase height of mc and keep its width?

i have a mc which seize is height = 150 and width = 2 (like a line).
i have a script which rotate this line and increases its length. this works, however i dont know how to keep the width so that it wil remain 2.
this is the scrip in as3 :
function rotateMoveClip_u(e:Event)
          var target=(center.x);
  e.target.rotation=((-target+45)/4)*1.25;
          mc.height = Math.sqrt((target-75)*(target-75) + 150*150);
  mc.width=2
//this line is  is wrong
maybe using "height" and "width" is wrong?
thank you

Even though you rotate your line (to say, horizontal), you still need to adjust the height (because it's original orientation was a vertical line). So when you rotate the line so it's horizontal you do not update width, you still update height. Just leave width alone.
Same goes if your line was originally horizontal and you wanted it to be vertical. If the original width was 150 and height was 2 (horizontal line) and you rotate it 90 degrees to be a vertical line, you would not adjust height to make it a longer vertical line. You'd adjust width.

Similar Messages

  • How will i activate my iphone?and keep on asking link to an apple id that was used to set up this iphone

    how will i activate my iphone?and keep on asking link to an apple id that was used to set up this iphone

    You need to enter the id, and the password, of the account that the phone is linked to.
    Did you buy the phone new or used ? If you bought the phone used and it's still linked to the previous owner's account then you will have to contact the previous owner and ask him/her to remove the phone from their account : Find My iPhone Activation Lock: Removing a device from a previous owner’s account - Apple Support.
    If you bought the phone new and it's your account then enter the id and password that you were using in Settings > iCloud on it

  • How to increase height of IFRAME without refreshing its contents.

    Hi,
    I want to increase height of an IFRAME inserted in HTML,
    presently i am doing this by specifying
    var frameSrc = myFrame.src;
    myFrame.height = newHeight;
    myFrame.src = frameSrc;
    but as this refreshes the IFRAME i can see the time lag in the loading of page specified as src of IFRAME.
    Is there any better way to resize the IFRAME without reloading its contents.
    Thanks in advance.

    Why don't you add width and height where you had IFRAME tag?
    <iframe id="hiddenFrame" name="hiddenFrame" src="/myWeb/blank.html" style="width: 100; height: 300; visibility: hidden"></iframe>

  • How do I increase the point size and change the font for the windows and boxes on Maverick such as the tiny print on the email inbox list of messages.  Can increase size on the actual message but not on the list of messages.

    How do I increase the point size in the dialog boxes and especially on the list of messages on email?  I can increase the point size and font of actual messages content but not the LIST of emails in my inbox.  They are too small for me to read.

    This discussion is for computer built before 2006.
    You could use a different mail app.  Consider thunderbird.
    It can be hard to find with community ( forum ) to post to. Here is an easy and complete list:
    https://discussions.apple.com/community
    I'll ask the host to move this post to M.
    Robert

  • How can I increase velocity setpoint precision, and obtain average motor current using NI 9505

    Hello,
    I have an application that is roughly based off of the example found
    in ...\examples\CompactRIO\Module Specific\NI 9505\Velocity Control
    (closed loop)\Velocity Control (closed loop) - NI 9505.lvproj
    The "niFPGA Discrete PID.vi" that that this example uses takes an
    INT16 in for the velocity set point.  The issue that I am having is that
    in our mechanical setup, the difference between setpoint increments
    equates to a large changes in mechanical velocity i.e. a setpoint of
    1 equates to about 4mm/min of movement to the piece attached to the
    screw, and a setpoint of 2 equates to about 11 mm/min.
    I would like to have finer control over the motor velocity such that I
    can obtain speeds in between integer setpoints.  Any suggestions?
    Also, does anyone have any suggestions on how the motor current sense
    output of the 9505 can be used to calculate an average current value
    (the amount you'd expect to see if you put an ammeter in series with the
    motor) and not the current during the "on" phase of the PWM cycle?
    Thanks

    Burt S,
    Thanks for the tip about putting inductors in series with the motors, I ordered some 100uH, 330uH, 470uH and 680uH power inductors (220's were out of stock) and have been doing some experimentation. 
    Do you have any suggestions as to how much inductance I should look to add?  Should it be the minimum that gets the inductance to meet the 9505 spec, or are there any ratios that should be adhered to?
    I'm seeing some promising results with regards to the 9505 current measurement on the motor that is 0.119mH when I put a 470uH in series with it, however I'm now having some issues with this motor occasionally getting "disabled by drive" when I'm switching velocity between 0 and say 50% of max, and getting its velocity to go all the way to 0 when I command that.
    There is another motor in this system that is also undersized at 265uH, and even when I put as little as 100uH in series with this one, I begin having issues with it being "disabled by drive" particularly when changing velocities.
    Any ideas what may be causing this behavior?  Could it be the velocity loop PID gains? - if so any general advice on how the to adjust those for the new inductance.
    BTW - these are the same motors for that drill project (that you also commented on), figured I'd keep the electrical stuff in this thread.
    It's still early on in my experimentation with these inductors, but I also made another observation that when I add the inductors to both of those motors, the signal coming from my load cell gets quieter when both of the motors are on, thou the load cell exhibits a larger offset.  I'm guessing this is an EMI issue, does anyone have any ideas what may be going on?
    Thank you for your assistance.
    -MKHokie

  • How can I create Folders in iPod and keep all bands & artists separate?

    Hi guys,
    How can I create folders for different artists and keep them separate? Is it somthing that I need to do in iTunes in my Mac or import them a certain way?
    Anyone please,
    Thanks in advance,
    Zia

    If you have the artist information entered in iTunes, then they should already be organized like that on iPod.
    Go to music-->artists
    btabz

  • How to run the Oracle SOA Suite and all its prerequisites on different mach

    Greetings,
    Due to the difficulty to run the SOA Suite and all its prerequisites, including JDeveloper, on a single machine, I would like to deploy the admin server, the soa server and the bam server on separate machines. Is it possible and, if yes, how ?
    Kind regards,
    Nicolas

    yes.
    You can just install db + rcu + wlst + soa on 1 machine. After that you middleware should be up and running.
    Now you can install jdeveloper + soa extensions on your client and connect to the remote location of the soa server
    or did i misunderstood you ?

  • How to import 2 separate audio tracks and keep them separate?

    I need advice about importing two separate simultaneous audio tracks and keeping them separate. I am importing footage from my Sony PDX-10 DV Cam.
    In the field I had wireless microphones on two people, a man and woman. I interviewed them separately. The man was on channel 1 and the woman was on channel 2.
    While shooting the man, for example, I could also hear the open mic of the woman who was maybe a block away talking to some friends. But her distracting sound was on CH 2 and in playback on the camera, if I dial down the volume of CH 2, I no longer hear the woman and I have a clean audio track, Ch 1, of the man who is being filmed.
    I'm trying to import the interviews into iMovies with only the relevant track turned up and the distracting track turned down. When I listen to the audio from the camera on my headsets, I can get clean sound of just the person who is on camera. But the FIREWIRE seems to grab both tracks, even though in playback i'm listening only to the clean track.
    Does anyone know how I can send just one audio track to IMovie? Any way to prevent the Firewire from importing both Ch 1 and Ch 2 at the same time?
    I only want the sound that's relevant to the person who is on camera. And I know that in the camera, it's possible to listen to just the track from one channel. I'm hearing just one track through the headsets, because I can sucessfully dial down the other track. That's the way I want to import the footage to iMovie. But the FIrewire seems to grab all the sound it can find and carry over both CH 1 and CH 2, which means I'm left with a jumble of sound that is not useful.
    And finally, if the firewire needs to grab both tracks, is there a way to assign them to two separate tracks in iMovie, so I can then simply turn one of the tracks off?
    iMacG5   Mac OS X (10.3.9)  
    iMacG5   Mac OS X (10.3.9)  
    iMacG5   Mac OS X (10.3.9)  

    welcome finecut to the  boards of discssions ...
    nope.
    iM handles the two stereo-channels as "one track", and offers 3 tracks of stereo.. (the one inside the video, 2 additional tracks...)
    I would... :
    * export clip(s) share/Quicktime/Expert Settings/aiff..
    * in a designated audio processor (Garageband, Audacity, ...) seperate the two channels, creating two "new" ones, stereo, where one channel is located in the stereo middle..
    * import these two "stereo" files into iM, into Track2 and Track 3 ...
    .. boom!done

  • HOW DO I RENDER A STILL IMAGE AND KEEP QUALITY

    I'm still in search of help with why High Res. still pictures lose quality when I render.   The images are at 300dpi, roughly 1900x1200 (they vary in size).   I input them fine.  Then, when I go to put them on the timeline - I get a pop-up window asking me to "AutoFix" this clip?  When I say "yes" it drops down the quality and it becomes grainy.  If I say "no" the clip remains looking the same - great.
    But - then when I go to "render" that clip, in the timeline - it drops down in quality and becomes grainy - AFTER I render it.
    HOW DO I USE STILL IMAGES - AND KEEP THEM HIGH QUALITY WHEN I RENDER?
    My Project Settings are; 1920/1080  ---  30fps DROP frame  (should it be Non-Drop?)  --  Capture is HDV and Video Rendering is only marked at "Optimize Stills"
    I'm using Adobe Premiere Elements 11 on a Windows 8 PC
    Any help would be greatly appreciated
    thanks

    joeyMPI
    OK. Let us give this a try. If I go off course anywhere along the line, please let me know.
    1. Open Premiere Elements 11 on Windows 8 64 bit to the Expert workspace.
    A. Under Edit Menu/Preferences/General
    Remove the check mark next to "Show all do not show again messages."
    Set the "Timeline render quality (valid for HD projects)" = "High quality, Slow speed"
    Leave a check mark next to Default Scale to Frame Size.
    B. Right Click the Edit area monitor, select Magnification and make sure it is = "Fit".
    C. Right Click the Edit area monitor, select Playback Quality and make sure it is = "Highest".
    D. Setting the Project Preset Manually to Get the Sharpest End Product Photo Display
    Go to File Menu/New/Project and Change Settings
    In Change Settings, change the project preset to
    NTSC
    DSLR
    1080p
    DSLR [email protected]
    Close out of there.
    In the new project dialog that appears, make sure that you have a check mark next to
    "Force Select Project Setting on this Project". Close out of there.
    E. The project preset that has been selected has a 16:9 aspect ratio, and it will direct the program to set
    up a 16:9 space in the Edit area monitor for editing. So, best results are expected with photos with a 16:9 aspect ratio.
    If an imported photo does not fill the Edit area monitor space, you can try to scale it (zoom in) just to the point of
    getting rid of any black borders. A quick scale can be done by clicking on the monitor screen, and dragging on a handle
    of the photo's bounding box which has appeared.
    But, now for the moment of truth..
    a. You should not have seen any helpful Fix messages.
    b. If you render the Timeline content by clicking on the render button above the Timeline
    what you see should look the same or better before and after the render.
    Also keep in mind, that having to scale up too much can create pixelation.
    300ppi or dpi has no significance in video. Pixel dimensions are the focus. And here, video is 4:3 or 16:9 aspect ratio. In
    this specific case 16:9. It would be a good idea to plan ahead on the sizing of the photos beforehand. As far as I know the perk of enhanced
    sharpness in the end product is associated with just the one project preset that I pointed to in the workflow.
    But, right now, our target is on the maintaining the quality of the photos in the Edit area. And, I realize that you realize
    that no matter how great the resolution of the imports, the imports will be reduced to the sizing characteristic of the export
    preset.
    We will be watching for your results. Thank you for considering the suggestions.
    ATR

  • I HATE THE NEWEST ITUNES UPDATE. how can i uninstall this latest update and keep the older version??

    I HATE THE NEWEST ITUNES UPDATE. how can i uninstall this latest update and just use the previous version??

    I have same prob as Mizz Gibbs.
    itunes = 11.1.3.8
    OS = Win 7 Home Preimum Service Pack 1 (with latest updates applied)
    thx for any help you can offer ...

  • How can i rotate a PNG photo and keep the transparent background?

    current i use this method to rotate a photo, but the transparent background is lost.
    what can I do ?
    public CreateRotationPhoto(String photofile,String filetype,int rotation_value,String desfile){
                 File fileIn = new File(photofile);
               if (!fileIn.exists()) {
                   System.out.println(" file not exists!");
                   return;
               try {
                       InputStream input = new FileInputStream(fileIn);
                       JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(input);
                       BufferedImage imageSrc = decoder.decodeAsBufferedImage();
                       int width = imageSrc.getWidth();
                       int height = imageSrc.getHeight();
                       BufferedImage src = ImageIO.read(input);
                       int width = src.getWidth(); //????? 
                            int height = src.getHeight(); //????? 
                       Image img = src.getScaledInstance(width, height,
                               Image.SCALE_FAST);
                       BufferedImage bi;
                       int fill_width=0;
                       int fill_height=0;
                       if (rotation_value==1||rotation_value==3){
                            bi = new BufferedImage(height, width,BufferedImage.TYPE_INT_RGB);
                            fill_width=height;
                            fill_height=width;
                       else{
                            bi = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB);
                            fill_height=height;
                            fill_width=width;
                            //BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
                       input.close();
                       System.out.println(photofile);
                       File fileOut = new File(desfile);
                       //File fileOut = new File("c:/Host1.PNG");
                       OutputStream output = new FileOutputStream(fileOut);
                       JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(output);
                       JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
                       param.setQuality(0.90f, false);
                       encoder.setJPEGEncodeParam(param);
                       Graphics2D biContext =bi.createGraphics();
                      biContext.setColor(Color.white);
                       biContext.fillRect(0,0,fill_width,fill_height);
                       int frame_width,frame_height;
                     if (rotation_value==1||rotation_value==3){
                            frame_width=height;
                            frame_height=width;
                       }else{
                            frame_width=width;
                            frame_height=height;
                       int x=0,y=0;
                       if (rotation_value==2){
                            x=frame_width;
                            y=frame_height;
                       if (rotation_value==0){
                             x=frame_width;
                             y=frame_height;
                       if (rotation_value==1){
                                x=frame_height;
                                 y=frame_height;
                       if (rotation_value==3){
                                    x=frame_width;
                                 y=frame_width;
                       double rotate=0;
                       if (rotation_value==0){
                             rotate=Math.PI *2;
                       if (rotation_value==1){
                            rotate=Math.PI / 2;
                       if (rotation_value==2){
                            rotate=Math.PI;
                       if (rotation_value==3){
                            rotate=Math.PI*1.5;
                       int x=0,y=0;
                       if (rotation_value==2){
                            x=width;
                            y=height;
                       if (rotation_value==1){
                                x=height;
                                 y=height;
                       if (rotation_value==3){
                                    x=width;
                                 y=width;
                       double rotate=0;
                       if (rotation_value==1){
                            rotate=Math.PI / 2;
                       if (rotation_value==2){
                            rotate=Math.PI;
                       if (rotation_value==3){
                            rotate=Math.PI*1.5;
                       System.out.println(Integer.toString(x)+"|x|"+Integer.toString(y)+"|y|"+Double.toString(rotate));
                       biContext.rotate(rotate, x / 2, y / 2);
                       biContext.drawImage(src, 0, 0, null);
                       biContext.dispose();
                       System.out.println("123123123123");
                       try{
                               ImageIO.write(bi, filetype, output);
                               //ImageIO.write(bi, filetype, "c:/Host.PNG");
                               output.close();
                          }catch (IOException e) {
                              System.err.println(e);
                      // encoder.encode(bi);
                       //output.close();
                } catch (Exception e) {
                         e.printStackTrace();
          }

    Using this BufferedImage.TYPE_INT_RGB for the type will eliminate any transparency in
    your image. Try BufferedImage.TYPE_INT_ARGB.
    Image file: Bird.gif
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import javax.swing.event.*;
    public class Rotate implements ChangeListener
        BufferedImage image;
        JLabel label;
        JSlider slider;
        public Rotate(BufferedImage orig)
            // make transparent background
            Color toErase = new Color(248, 248, 248, 255);
            image = eraseColor(convertImage(orig), toErase);
        public void stateChanged(ChangeEvent e)
            int value = slider.getValue();
            double theta = Math.toRadians(value);
            BufferedImage rotated = getImage(theta);
            label.setIcon(new ImageIcon(rotated));
        private BufferedImage getImage(double theta)
            double cos = Math.cos(theta);
            double sin = Math.sin(theta);
            int w = image.getWidth();
            int h = image.getHeight();
            int width  = (int)(Math.abs(w * cos) + Math.abs(h * sin));
            int height = (int)(Math.abs(w * sin) + Math.abs(h * cos));
            BufferedImage bi = new BufferedImage(width, height, image.getType());
            Graphics2D g2 = bi.createGraphics();
            g2.setPaint(new Color(0,0,0,0));
            g2.fillRect(0,0,width,height);
            AffineTransform at = AffineTransform.getRotateInstance(theta, width/2, height/2);
            double x = (width - w)/2;
            double y = (height - h)/2;
            at.translate(x, y);
            g2.drawRenderedImage(image, at);
            g2.dispose();
            return bi;
        private BufferedImage convertImage(BufferedImage in)
            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            GraphicsDevice gd = ge.getDefaultScreenDevice();
            GraphicsConfiguration gc = gd.getDefaultConfiguration();
            BufferedImage out = gc.createCompatibleImage(in.getWidth(), in.getHeight(),
                                                         Transparency.TRANSLUCENT);
            Graphics2D g2 = out.createGraphics();
            g2.drawImage(in, 0, 0, null);
            g2.dispose();
            return out;
        private BufferedImage eraseColor(BufferedImage source, Color color)
            int w = source.getWidth();
            int h = source.getHeight();
            int type = BufferedImage.TYPE_INT_ARGB;
            BufferedImage out = new BufferedImage(w, h, type);
            Graphics2D g2 = out.createGraphics();
            g2.setPaint(new Color(0,0,0,0));
            g2.fillRect(0,0,w,h);
            int target = color.getRGB();
            for(int j = 0; j < w*h; j++)
                int x = j % w;
                int y = j / w;
                if(source.getRGB(x, y) == target)
                    source.setRGB(x, y, 0);
            g2.drawImage(source, 0, 0, null);
            g2.dispose();
            return out;
        private JLabel getLabel()
            label = new JLabel(new ImageIcon(image));
            return label;
        private JSlider getSlider()
            slider = new JSlider(JSlider.HORIZONTAL, 0, 360, 0);
            slider.addChangeListener(this);
            return slider;
        public static void main(String[] args) throws IOException
            String path = "images/Bird.gif";
            ClassLoader cl = Rotate.class.getClassLoader();
            InputStream is = cl.getResourceAsStream(path);
            Rotate rotate = new Rotate(ImageIO.read(is));
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().setBackground(Color.pink);
            f.getContentPane().add(rotate.getLabel());
            f.getContentPane().add(rotate.getSlider(), "South");
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • How do I cut out the vocals and keep the instrumentals

    I recorded a track and I just want to keep the instumentals and discard the vocals. Is there a way to break it down and just discard the vocals and keep the instrumentals?

    From a professionally recorded stereo recording (that's not what you originally said) you can possibly reduce the vocals
    http://www.thehangtime.com/gb/gbfaq2.html#removevocals
    A better option would be to find a MIDI file of the song you want.

  • How do I convert .txt to .pdf and keep the formatting

    I have a large .txt file that I would like to convert to .pdf.  I have tried to print the file and choose Adobe PDF but the output is just a mess.  I loose all the formatting and get blank pages every so often.  Does anyone know if is possible to convert .txt to .pdf and keep the formatting.  I would try a virtual printer application but I am not able to just install any application on my office computer.  Any help would be greatly appreciated.

    It may be a bit late for you now but in future (and for anyone else interested) I would recommend copying the text into a word document and changing the text font to Consolas. Adjust the size to fit the page again and it should match the original notepad formatting.

  • I ordered the new ipad, I already have an ipad and an ipod, can I use my same itunes for all of them? I want to turn my original ipad over to my partner and keep its contents separate from mine. Thx

    What do I have to do to set up the new ipad and keep the old one as it is?
    Thx,
    JOey

    (I think the daughter got he better end of the deal!)   I believe if you change the password and user id one of the devices it will stop that from occurring. But I'm not the one to tell you how to do it; someone like "Illaass" (Illaass seems to know how to correct / fix almost anything!) will know how if you don't. Just look for the "cat" icon.

  • Is it possible to format my iphone 4 and keep its old ios of 4.3.5

    Hello,
    I want to fully restore my iphone, but I want to keep its original version of 4.3.5  Is there anyway to do this?  I want an authentic way.  I want the original 4.3.5 is this legal?

    Apple only supports restoring to the current available version of iOS for the device.  For the 3GS, 4 and 4S this is version 5.1.1.
    There is no legitimate reason to restore to any other version.  The only reason you might want to stick with an old version is for illegal unlocks or hacking/jailbreaking which cannot be discussed here.

Maybe you are looking for