How to keep scale for height when resizing width?

Hi i have a serious of images different sizes/ ratios, which need to display at a fixed width of 50. Great works... but how do I resize the height to keep it at its original ratio?
this.attachMovie(small_image, "number1_mcs" + loop , this.getNextHighestDepth(), {_x:50 + (loop*50),_y:300,_width:50,_yscale:?????????????});}
many thanks in advance
Dee

Thanks for your help, being new, "terms", practices etc which others may fully understand, can fly right over ones head... It doesn't mean its impossible to understand them just grasping the exact meaning and then the specifics of any technicality can cause one to pull out more hair, especially when tired...
I fixed the problem using the following... i hope its not too ugly..!
Dee
this.attachMovie(small_image, "number1_mcs" + loop_n1 , this.getNextHighestDepth(), {_x:75 + (loop_n1*40),_y:350});
var aspect_ratio_x = this["number1_mcs"+loop_n1]._width;
var aspect_ratio_y = this["number1_mcs"+loop_n1]._height;
var aspect_ratio = (aspect_ratio_x / aspect_ratio_y);
this["number1_mcs"+loop_n1]._width = 40;
this["number1_mcs"+loop_n1]._height = this["number1_mcs"+loop_n1]._width / aspect_ratio;

Similar Messages

  • Scenario : How to include scales for delivery schedule

    Hello,
    1.How to include scales for delivery schedule
    Example u2013 I have a total SA for 10000 EA for Rs 10 EA
                  i.     When SA line And GR  is for 0-100 system should take  Rs 10 EA
                 ii.     When SA line and GR is for 101-1000 System should Rs 9.50 EA
                 iii.     When SA line and GR is for 1001-5000 system should take Rs 9.00 EA.
    How to do ?
    Regards
    sapman man

    Hi,
    This you have to maintain in Scheduling agrement document itself.
    In scheduleing agreement (ME31L)--> Pricing Condition Icon.  if you select this there you can find the scales assignemnt in headel leavel icon. (F2).
    If assgin this will fllow in delivery schedule line.
    SAM

  • How to include scales for delivery schedule.

    Hello,
    How to include scales for delivery schedule.
    a.       Example u2013 I have a total SA for 10000 EA for Rs 10 EA
                                                                   i.      When SA line And GR  is for 0-100 system should take  Rs 10 EA
                                                                 ii.      When SA line and GR is for 101-1000 System should Rs 9.50 EA
                                                                iii.      When SA line and GR is for 1001-5000 system should take Rs 9.00 EA.
    Normaly SA will calculate Scales based on target qty, not delivery schedule qty?
    Regards
    sapman man

    Hello SAPman man ,
    Please read SAP Note 401941. This could be helpful depending on what Release you are running.
    SAP Note 401941 -  Incorrect price at time of GR
    I hope this information has been helpful for you.
    Best Regards,
    Frank

  • How to keep original aspect ratio when cropping in Camera Raw?

    How to keep original aspect ratio when cropping in Camera Raw? Cant figure it out! With shift, the aspect ratio is 1:1. But I didnt set it to 1:1 (I checked "normal").

    The Shift key works once you’ve set your crop ratio.  DSLRs would typically do 2:3 and others sometimes do 3:4.

  • I put in my gift card code and at the top of my home page it says that I have 15 dollars. When I go to purchase it still makes me put in the code and says that it invalid. How do I pay for something when I already put in the code? please help

    I put in my gift card code and at the top of my home page it says that I have 15 dollars. When I go to purchase it still makes me put in the code and says that it invalid. How do I pay for something when I already put in the code? please help

    See Here  >  http://support.apple.com/kb/TS1646
    If no joy...
    Contact iTunes Customer Service
    Apple  Support  iTunes Store  Contact Us

  • How to keep Ipod in iTunes when undocked

    I want to be able to see and manage my ipod music while it is undocked. I did this before, but for the life of me, can't figure out how to keep the iPod showing in iTunes when it's undocked. Any help would be appreciated. Thanks!
    Randy
    Dell   Windows XP  

    If it's not connected to the computer, you can't do anything with the iPod.
    You can Enable disk use in iTunes prefs -> iPod and it will not dismount.
    I want to be able to see and manage my ipod music while it is undocked.
    That is what iTunes is for.
    Make the changes in iTunes and then update the iPod.
    Any changes you make on the iPod will not be reflected in iTunes.
    When you have to Restore the iPod (you will), all changes will be lost.

  • How to keep original email open when replying?

    I bet this is somthing simple, but I just can't figure it out. When I click reply on an email, the original closes. It's no big deal, but I like to have the original open to refer back to. Is there a way to set my mail to keep the original open when replying. Thanks in advance
    MacBook   Mac OS X (10.4.7)   Got my new MacBook. It's a wonderful thing!!! Video iPod!! Lots of toys!!!

    You're welcome.
    I am not getting the other option about keeping
    the preview pane visible.
    It seems you're not aware that the part of the main window where messages are listed can be split in two parts: the messages list at the top and the preview pane at the bottom. You can do this by either (1) dragging upwards the thin horizontal separator bar that's at the bottom of the window, or (2) just double-clicking on that bar (it has a tiny hole in the middle).
    How come when I delete an email in my .mac account,
    I have to delete it twice from the trash?
    Well, the answer to that question is way more involved than you might think.
    The behavior you've observed happens in Mail to any IMAP-type account for which deleted messages are stored locally (i.e. Preferences > Accounts > Mailbox Behaviors > Store deleted messages on the server has been turned OFF). The "reason" is that storing deleted messages locally for IMAP-type accounts causes Mail to move deleted messages in that account to a Deleted Messages (AccountName).mbox folder located within ~/Library/Mail/Mailboxes/.
    Deleting a message already in a Trash mailbox should cause the message to be permanently erased, BUT deleting a message from a mailbox located within ~/Library/Mail/Mailboxes/ (i.e. an "On My Mac" mailbox) should cause the message to be moved to the "On My Mac" Trash. Thus, in the particular case of a Deleted Messages (a Trash) mailbox stored within ~/Library/Mail/Mailboxes/, there are two conflicting behaviors, and it seems that Mail takes the latter into consideration first, i.e. deleting a message from the account's Trash under those conditions causes it to be moved to the "On My Mac" Trash instead of being permanently erased as would happen if the Deleted Messages folder was located within the account folder.
    This could very well be an oversight (a bug) rather than intended behavior, but that's how it works in the current version of Mail. If you're curious, the following somewhat amusing (but also lengthy and confusing) threads would give you an idea of how long it took me to figure out this one:
    emails won't delete on first try
    IMAP messages need trash deleted twice

  • How to keep filename in textfield when filter is changed in a filechooser

    Hi, guys,
    I met a problem to keep filename in textfield when filter is changed in a filechooser
    for example, a JFileChooser has two filters
    *.jpg
    *.png
    Before I open JFileChooser, I used setSelectedFile(File) to set "aaa.jpg" as default name in textfield.
    when I change the filter to "*.png, ", I want to change the text in textfield to "aaa.png", Actually, I used setSelectedFile(File), If there is an existed file named "aaa.png", this file will be selected on fileView, but the name will not be shown on the textfield. Anybody has ideas?
    Thanks in advanced.

    I really thank you for your answer, but it seems you misunderstand what I said because of my poor english..
    what I said is:
    after you open the filechooser, the filechooser has a combobox to choose file filter and a field to show filename.
    what I want is:
    when you open the filechooser, initial name in field is "test. jpg"
    change filter, "test.jpg" will be change to "test.gif" in the field.
    I don't want to close the filechooser.
    That's why I used a listener to listen JFileChooser.FILE_FILTER_CHANGED_PROPERTY event.
    and I modified your codes
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import java.io.File;
    import javax.swing.JButton;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.filechooser.FileFilter;
    class Testing extends JFrame {
         String defaultFile = "";
         JFileChooser fc = new JFileChooser(".");
         ExtensionFileFilter eff;
         public Testing() {
              setLocation(200, 300);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JButton btnShow = new JButton("Show Chooser");
              JPanel p = new JPanel(new GridLayout(1, 2));
              p.add(btnShow);
              getContentPane().add(p, BorderLayout.SOUTH);
              pack();
              fc.addPropertyChangeListener(new Listener(fc));
              fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
              fc.setAcceptAllFileFilterUsed(false);
              fc.setFileFilter(new ExtensionFileFilter(".gif"));
              fc.addChoosableFileFilter(new ExtensionFileFilter(".jpg"));
              defaultFile = defaultFile.equals("") ? "Test.jpg" : "Test.gif";
              fc.setSelectedFile(new java.io.File(defaultFile));
              btnShow.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        fc.showOpenDialog(Testing.this);
         public static void main(String[] args) {
              new Testing().setVisible(true);
    class ExtensionFileFilter extends FileFilter {
         String fileTypes = "";
         java.util.List extensions = new java.util.ArrayList();
         public ExtensionFileFilter() {
         public ExtensionFileFilter(String ft) {
              fileTypes = ft;
         public String getDescription() {
              return fileTypes;
         public boolean accept(File f) {
              if(f.isDirectory()) return true;
              if (f.getName().endsWith(fileTypes)) {
                   return true;
              return false;
    class Listener implements PropertyChangeListener {
        JFileChooser fChooser = null;
        Listener(JFileChooser fChooser) {
            this.fChooser = fChooser;
        public void propertyChange(PropertyChangeEvent evt) {
            if (evt.getPropertyName().equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) {
                 FileFilter fileFilter = (FileFilter) evt.getNewValue();
                if (fileFilter != null) {
                    String fileName = null;
                    if (fileFilter.getDescription().equals(".jpg")) {
                        fileName = "Test.jpg";
                    } else if (fileFilter.getDescription().equals(".gif")){
                         fileName = "Test.gif";
                    String newFileName = "C:\\" + fileName;
                    fChooser.setSelectedFile(new File(newFileName));
    }Thanks again.
    Message was edited by:
    JadeSword

  • How to keep details grouped together when have more than 1 details section

    I want to create a report that has two different detail sections, and then have the report first print all of the results of the first detail section (DETAIL A), followed by the results of the second detail section (DETAIL B).
    But CR prints the first line of DETAIL A, followed by the first line of DETAIL B. It then goes on to the second line of DETAIL A, followed by the second line of DETAIL B, and so on.
    Can anyone tell me how to keep DETAIL A together, followed by DETAIL B?
    thx, jon

    Assuming the data for the two formats are not in the same record, add a new field to the data record (or calculate it based on the record's data) with a value of A or B, then group by it.
    If the data IS in the same record (i.e., one data record generating both formats), subreports are the only way that I can think of...
    HTH,
    Carl

  • How to create scales for conditions for rebate agreements?

    Does anybody know any function modules or bapis to create scales for rebate agreement conditions.I want to create entries in konm table where scales for conditions get stored.Also pls tell me how to link contributory volume by programaticaly?
    Thanks in advance

    Part of my question is answered .I could find parameter in BAPI_PRICES_CONDITIONS to create scales for conditions.But do anyone have any idea how to link contributory volume to conditions? i have conditions and also contributory volume? can anybosy send me some material which explains the contributory volume..atleast functionally?

  • Firefox keeps asking for password when I send emails

    Firefox version 35.0. When I open Firefox and get messages, no problems. When I write an email and send, Firefox asks me for password. I am able to send/receive emails while open. If I close Firefox and open, it asks for password when I send. Months ago, I changed my login password to Netzero.com (made it more secure). Since then, I've had this annoying password request. How to satisfy the login server password for receiving/sending emails?

    Is it Firefox asking for the password, or the web site? The only time that
    FF will ask for a password is if you have the '''Master Password''' active
    in the '''Password Manager.'''
    Open the '''Password Manager.''' There is a search bar at the top of the
    page. Enter the name of the site. Press the button '''Show Passwords.'''
    Is the information correct? '''Note:''' there may be more then one entry.
    '''Left''' click the icon in the address bar. A window for displaying site information should come up. Select '''More Information.''' At the top of the window, select '''Security.''' Now select '''View Saved Passwords.'''

  • How to keep LIN at hight when no data on it?

    Hi All,
    I have a question: how to keep LIN at hight level when no data on it?
    My card is PCI-8516
    Thanks a lot.

    I release LIN, so bus is low.

  • How to stop suggestions for words when texting

    How do I stop suggestions for words when texting?

    Settings>General>Keyboard>Auto-Correction>Off.

  • Possible to use coordinates for SCALEABOUT when resizing?

    when resizing and object, I'd like to be able to scale from a specified coordinate.  Is this possible?

    So where am I going wrong.  I figured this would be easy, but it's not scaling about the right point.
    tempOrigin = activeDocument.pageOrigin;
    pageOrigin = sText.position;
    sText.resize(scaleFactor, scaleFactor, true, true, true, true, scaleFactor, Transformation.DOCUMENTORIGIN);
    pageOrigin = tempOrigin;

  • Mail keeps asking for password when I enter and try to send messages

    When ever I enter 'mail' and then try to send messages it always ask for a password in both instances. I have changed the preferences and added the password and when I save the changes they don't appear as changed

    OK. When you say that Mail doesn’t save the password, are you basing this solely on the fact that Mail keeps asking for it? Or is there something else that makes you believe Mail doesn’t save the password?
    Open /Applications/Utilities/Keychain Access, choose Keychain First Aid from the application menu, and proceed to repair the keychain. If that doesn’t work, try removing the password entry from the keychain and let Mail create it again the next time it asks for it.

Maybe you are looking for

  • Itunes, Time machine and 4Gb  files. Getting a FAT32 error.

    Using Itunes to purchase a movie in 1080. Something I have done many times before... I have a remote itunes disk, it is a Apple 3Tb Time Capsule. Now I get a can't download the file to a FAT32 file system error that stops me dead... the error I get i

  • Entry In AP , AR , GL

    What is the Entry in Oracle Apps AP,AR,GL for following Transations 1.One Pipe purchase at Rs.100 2.One Pipe Sales At Rs.150 Which account Afected , What is the journal entry What is the entry at respective module how many modules are afected through

  • Query on Swing Concepts

    hello all, i am unclar about swing container concepts w.r.t content panes, root panes, layered panes and glass panes. could anyone throw light on the same in simple language. i have gone thru many tutorials and i am unclear including sun website. und

  • Some questions on Dual Booting a G505s

    So I did a little research and it seems this laptop does away with the old windows COA, and instead imbeds the COA key inside the bios.  Anyway, I need to dual boot wndows XP, and the Windows8 it came with.  I figured the way to do this was to reform

  • FlashBuilder 4.0.1 "Workspace in Use" after CF Data Wizard

    I have FB 4.0.1 installed on a Windows 7 Pro machine, along with WAMP Server/MySQL and CF 9 Developer Edition. I can start FB OK and I have the workspace set to C:\Users\MyLogin\Adobe Flash Builder (the default). If I try to create a project I have n