Question about resizing a 'decorative' object

Hi all
Please bear with me this is tricky to describe.
I have on a form I have obtained from formcentral an attractive banner: its just a nice colour nothing else but it spans the entire width of the form and is about 2 inches high.
I wanted to copy & paste this and then shorten the height to 0.5 inches, but I have no height or width handles, just the four corner handles so the resizing maintains the aspect ration and I'm left with a copy which is the correct height but half or less of the width I need.... so I do multiple copies of these just to get coverage across the width of the form.
This seems daft but I cannot see how to do this slicker....
Anybody know please?
thanks
george

Hi all
Please bear with me this is tricky to describe.
I have on a form I have obtained from formcentral an attractive banner: its just a nice colour nothing else but it spans the entire width of the form and is about 2 inches high.
I wanted to copy & paste this and then shorten the height to 0.5 inches, but I have no height or width handles, just the four corner handles so the resizing maintains the aspect ration and I'm left with a copy which is the correct height but half or less of the width I need.... so I do multiple copies of these just to get coverage across the width of the form.
This seems daft but I cannot see how to do this slicker....
Anybody know please?
thanks
george

Similar Messages

  • My apologies  & question about resizing pic for wallpaper

    Guess what I wrote about resizing wallpaper was removed.  Didn't realize the way I wrote it was not allowed. I apologize to the list.
    What I Want to know is how to resize the wallpaper when trying to use a picture. It seems to blow it up making it unusable.  Can anyone offer a suggestion to get past this issue?
    Thanks

    Guess what I wrote about resizing wallpaper was removed.  Didn't realize the way I wrote it was not allowed. I apologize to the list.
    What I Want to know is how to resize the wallpaper when trying to use a picture. It seems to blow it up making it unusable.  Can anyone offer a suggestion to get past this issue?
    Thanks

  • Urgent question about resizing videos in Adobe Premiere

    Hello, forgive me for asking such a noob question but i have a presentation due in about 10 hrs and Adobe Premiere is giving me some headaches with the video i'm trying to make!
    I am trying to alter the dimensions of a movie in the 'monitor' window (the objective being to put 2 different movies side by side in the same timeline, but that's irrelevent). Screenshot is below
    http://s5.largeimagehost.com/display...sXUF&skey=nv28
    I've seen it being done before - their should be a border around the frame in the 'Sequence 01' tab that lets you resize it with your mouse. But It's not appearing for me... . is their some hot key or something..? It's probably something really obvious but i can't find it...

    You will also find links to many free tutorials in the
    Premiere Pro Wiki that will quickly
    show you how things are done in PPro, including picture-in-picture effects.
    Cheers
    Eddie
    Forum FAQ
    Premiere Pro Wiki
    - Over 250 frequently answered questions
    - Over 100 free tutorials
    - Maintained by editors like
    you

  • Question about SWING and ActionEvent Object.

    When using a graphical component like a JButton,
    one typically adds an ActionListener Object to that button using the
    addActionListener method,
    in order for a click/appropriate action to execute desired Java code.
    One's desired code is within one's own ActionListener Object,
    which implements an appropriate interface and the equivalent of
    that interface's actionPerformed method.
    -How does one program one's own ActionEvent Object,
    and register that object (myActionEvent) with the java virtual machine
    such that your OWN event object is fired, instead of the
    default action?
    -Does instantiating one's appropriate ActionEvent object
    "fire" it as an event?

    Zac1234 wrote:
    When using a graphical component like a JButton,
    one typically adds an ActionListener Object to that button using the
    addActionListener method,
    in order for a click/appropriate action to execute desired Java code.Only for components that accept ActionListeners of course. This won't work with a JLabel for instance or any random "graphical component".
    -How does one program one's own ActionEvent Object,
    and register that object (myActionEvent) with the java virtual machine
    such that your OWN event object is fired, instead of the
    default action?Please explain exactly what you're trying to do here. Perhaps it's just me, but I'm not sure I understand what you mean by programming your own ActionEvent Object. An ActionEvent object can be simply created like any other object and by using the appropriate constructor (the API can help), but I don't think that you're talking here about ActionEven objects -- the parameter of the actionPerformed method, are you? Please give details as they are important here.
    -Does instantiating one's appropriate ActionEvent object
    "fire" it as an event?No, but again I'm stumped as to exactly what you're trying to do here.
    Finally, let's keep this discussion here, but next time, you will probably want to ask your Swing questions in the Swing forum.
    Best of luck.

  • Newbie question about entity and view objects

    Hi everyone,
    My first ADF application in JDeveloper is off to a difficult start. Having come from a forms background, I know that it is necessary avoid using post-query type lookups in order to have full filtering using F11/Ctrl+F11. This means creating an CRUDable view and getting as much of the lookup data as possible into the view without losing the ability to modify the data. In JDeveloper, I do not know how to build my data model to support that. My thought was to start with a robust updateable view as my main CRUD EO and then create a VO on top of that with additional EOs or VOs. But, I have found that I cannot add VOs to another VO. However, if I link the VOs then I have a master-detail which will not work for me.
    For example, I have two joins to CSI_INST_EXTEND_ATTRIB_V shown in the queries below and need to have that show in the table displaying the CRUD VO’s data. It seemed that the best way to do this is to create a CSI_INST_EXTEND_ATTRIB_V entity object and view object. The view object would have two parameters, P_INSTANCE_ID and P_ATTRIBUTE name. Both the building and the unit are needed on the same record, and this is not a master-detail even though it might look that way. (A master-detail data control will not work for me because I need all this data to appear on the same line in the table.) So, I need help figuring out the best way to link these to the main (CRUD) view; I want as much of this data as possible to be filterable.
    select
    cieav.attribute_value
    from
    csi_inst_extend_attrib_v cieav
    where cieav.instance_id = p_instance_id
    and cieav.attribute_code = 'BUILDING NAME'
    select
    cieav.attribute_value
    from
    csi_inst_extend_attrib_v cieav
    where cieav.instance_id = p_instance_id
    and cieav.attribute_code = 'UNIT NAME'
    Ultimately, I need to display a ton of data in each record displayed in the UI table, so a ton of joins will be needed. And, I need to be able to add records using the UI table also.
    James

    Hi Alejandro,
    Sorry if I caused confusion with my first post. What I had in mind assumed that I could have a single CSI_INST_EXTEND_ATTRIB_V EO with a BuildingVO and UnitVO on top of it. So, I wrote the queries individually to show how I would invoke each view. When I realized that confused the issue, I rewrote the query to explain things better.
    Now having seen your 2 queries. You need to create 2 EO. One for each table. Then create an association between the 2 aeO (this will be the join you are talking about). Then, you need to create a VO based on one of the EO and after you can modify and add the second EO (in here you select the join type).
    After your done with this, youll have 1 VO that supports CRUD in both tables.
    There were three tables in the query: CIEAV_BUILDING, CIEAV_UNIT, and T -- the main CRUD table. When you say that I should create two EOs, do you mean that they are to be for CIEAV_BUILDING and CIEAV_UNIT? Or, CIEAV and T? Assuming CIEAV and T, that sounds like it would allow me to show my building or unit on the record but not both.
    By the way, everything is a reference except for the main CRUD table.
    Look forward to hearing from you. Thanks for your help (and patience).

  • Easy Question about resizing video

    I searched 'Resizing Video' and there was too many unrelated results to a really simple question.
    In my old program "Premiere', to resize and move a video around was very easy. You could adjust the scale and X-Y values numerically, or you could use a Free Transform like in Photoshop. Simply dragging bounding boxes for size and aspect and also dragging the clip to decide it's location.
    The only way I know how to do this in FCP is I double click a clip in the sequence, it loads into the viewer, I go to the Motion Tab and then I can adjust the Scale, which is cool. But then I'm left with the Distort section to adjust position (and aspect if need be). In the Distort section there are 8 numeric fields of info to figure out and fill out just to get one clip in a different position correctly.
    I'm thinking there must be another way to adjust the location (or aspect) of a video clip without spending a bit of time on exact coordinates, I want to eye-ball where I want the clip to go and simply move it there. Is the Distort feature the only way to do this? If not, which is the fastest way to move and change the dimension of a clip.
    Thanks for reading, I hope there is another way, I'm not use to these calculations and they're slowing me down.
    Monty

    I searched 'Resizing Video' and there was too many unrelated results to a really simple question.
    That's because it's not a simple question at all and yet every one of those threads was related to the OP's question. As you discovered, there are lots of ways to interpret "resize," during capture, editing, effects, output, viewing, encoding, printing. But the solution was even simpler than you thought. All you had to do was open the manual or the online help system. Start taking the manuals to the gym with you. FCP is not Premiere. You're going to hate FCP, you're going to love FCP but it will never behave like Premiere beyond the elements of the functional paradigm. Forget Premiere.
    bogiesan

  • Question about performance (entities & data object)

    Hello:
    I know that this can be, maybe, a silly question, but I've got the doubt
    I get a local reference to a entity ( myEntityLocal ) and I'm going to get many values from it.
    For example
    myEntityLocal.getId();
    myEntityLocal getName();
    myEntityLocal.getAddr();
    etc etc
    My question is
    Would be better, in performance terms, to fill all fields into a data object myEntityData ) and retrieve them from it ?
    I mean
    myEntityData = myEntityLocal.getData() // where getData() calls getter methods on myEntityLocal
    myEntityData.getId();
    myEntityData.getName();
    myEntityData.getAddr();
    I think the result is the same because is a local reference, but I've got that doubt
    Thanks and regards

    This will be san=me if you are considering the Local interfaces.
    For remote interface(like accessing EJB from Servlets resides in diffferent Apps Server) use the DTO(data Transfer Object) patterns.
    Regards
    Sushil

  • A question about a resizeable loaded object

    Guys...
    I was searching in the web on how to make an automatic resizeable screen, so it feets on many devices regardless of their size and I found a tutorial that adds the picture to the Flash library and resizes it depending on the screen size...
    Now, I have deleted the library object and changed the "bitmap" var from the tutorial for a "Loader" one, so the picture isnt in the library...
    My only problem is that when you try the swf, the picture is anywhere in the screen and only fits on it after you expand or decrease the its size...
    So how can the picture be on its right spot in the first time?
    (The tutorial had as an event trigger a Mouse Click... I have changed it for a timer event and while my pic was in the library it worked fine, but now I have to resize the windows to make it work)
    Here is the code:
    //Main Class
    package{
        import org.display.OffsetResize;
        import flash.display.Sprite;
        import flash.display.Bitmap;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.utils.Timer;
        import flash.events.TimerEvent;
        import flash.display.Loader;
        import flash.net.URLRequest;
        public class Main extends Sprite{
            private var _bg:OffsetResize;
            private var t:Timer = new Timer(0,0);
            public function Main():void{
                if(stage) init();
                else addEventListener(Event.ADDED_TO_STAGE,init);
            private function init(e:Event=null):void{
                stage.scaleMode=StageScaleMode.NO_SCALE;
                stage.align=StageAlign.TOP_LEFT;
                var picture:Loader = new Loader();
                picture.load(new URLRequest("FIN1.jpg"));
                _bg=new OffsetResize(picture,OffsetResize.MIN);
                stage.addChildAt(_bg,0);
                _bg.stage.align = StageAlign.TOP_LEFT;
                t.addEventListener(TimerEvent.TIMER, resizeada);
                t.start();
            private function resizeada(TimerEvent):void{
                _bg.offsetType=_bg.offsetType==OffsetResize.MAX?OffsetResize.MIN:OffsetResize.MAX;
                t.stop();
    //OffsetResize class
    package org.display{
        import flash.display.Sprite;
        import flash.display.DisplayObject;
        import flash.events.Event;
        public class OffsetResize extends Sprite{
            public static const MAX:String="max";
            public static const MIN:String="min";
            private var _offsetType:String;
            public function OffsetResize($child:DisplayObject,$offsetType:String="max"):void{
                _offsetType=$offsetType;
                addChild($child);
                if(stage) init();
                else addEventListener(Event.ADDED_TO_STAGE,init);
                addEventListener(Event.REMOVED_FROM_STAGE,end);
            private function init(e:Event=null):void{
                stage.addEventListener(Event.RESIZE,stageResize);
                stageResize();
            private function stageResize(e:Event=null):void{
                var px:Number=stage.stageWidth/width;
                var py:Number=stage.stageHeight/height;
                var div:Number=_offsetType=="max"?Math.max(px,py):Math.min(px,py);
                width*=div;
                height*=div;
                x=(stage.stageWidth/2)-(width/2);
                y=(stage.stageHeight/2)-(height/2);
            private function end(e:Event):void{
                stage.removeEventListener(Event.RESIZE,stageResize);
            public function set offsetType(type:String):void{
                _offsetType=type;
                if(stage) stageResize();
            public function get offsetType():String{ return _offsetType; }
    Thanks in advance!!!

    try:
    //Main Class
    package{
        import org.display.OffsetResize;
        import flash.display.Sprite;
        import flash.display.Bitmap;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.utils.Timer;
        import flash.events.TimerEvent;
        import flash.display.Loader;
        import flash.net.URLRequest;
        public class Main extends Sprite{
            private var _bg:OffsetResize;
            public function Main():void{
                if(stage) init();
                else addEventListener(Event.ADDED_TO_STAGE,init);
            private function init(e:Event=null):void{
                stage.scaleMode=StageScaleMode.NO_SCALE;
                stage.align=StageAlign.TOP_LEFT;
                var picture:Loader = new Loader();
    picture.contentLoaderInfo.addEventListener(Event.COMPLETE,resizeada);
                picture.load(new URLRequest("FIN1.jpg"));
            private function resizeada(e:Event):void{
              _bg=new OffsetResize(picture,OffsetResize.MIN);
                stage.addChildAt(_bg,0);
                _bg.stage.align = StageAlign.TOP_LEFT;
                _bg.offsetType=_bg.offsetType==OffsetResize.MAX?OffsetResize.MIN:Offs etResize.MAX;

  • Question about resizing a window

    hi,
    i have a null-layout window which is resizable. the origin size is e.g. 500x300. my question: how can i manage it that resizing is only possible up to specific values for height and width, e.g. 300x150? in other words: i want to define the smallest possible size to which my window could be minimized.
    thanks for every advice!
    kind regards,
    reinhold

    hi and thanks for your replies!
    sorry, i think that the desciption of my problem was not exact enough. here a second attemt: my frame is an input-mask with (for the time being) five buttons on the right side ("add", "edit", "clear", "update" and "close"). the first (upper) three buttons move their x-position dynamic when the frame is enlarged in width. they have a fixed y-pos. the lower two buttons move also dynamic: when the frame is enlarged in width they behave as the upper three buttons but when the frame is enlarged in height they change their y-pos dynamic to the frame's height. so they 'move away' in y-pos from the other three buttons. my first problem was, that when i reduce the frames height then the lower two buttons can be moved over the upper three buttons. i have solved this with the following componentListener:
    contentPane.addComponentListener(new ComponentAdapter() {
        public void componentResized(ComponentEvent event) {
             // position of the upper 3 buttons:  x-pos dynamic to frame.width, y-pos. fixed
             addButton.setBounds(event.getComponent().getWidth()-120,15,100,20);
             editButton.setBounds(event.getComponent().getWidth()-120,45,100,20);
             deleteButton.setBounds(event.getComponent().getWidth()-120,75,100,20);
             // position of the lower 2 buttons: x-pos dynamic to frame.width, y-pos dynamic to frame.height
             updateButton.setBounds(event.getComponent().getWidth()-120,event.getComponent().getHeight()-60,100,20);
             closeButton.setBounds(event.getComponent().getWidth()-120,event.getComponent().getHeight()-30,100,20);
             // check minimal frame.height (165). if reached, fix y-pos of the lower two buttons
             // so they cannot be moved over the upper three buttons     
             if (event.getComponent().getHeight() <=165) {
                 updateButton.setBounds(event.getComponent().getWidth()-120,105,100,20);
                 closeButton.setBounds(event.getComponent().getWidth()-120,135,100,20);
    });    that works fine, but my next (and main-) problem is, that i want to make it possible, that -if the height of 165 is reached- the BORDER of the frame could not be downsized anymore so that all 5 buttons remain allways visible. therefor i've found no solution in the forum's threads.
    thanks for all tips!
    reinhold

  • Question about handing classes in Objective-C

    Greetings -- I'm pretty new to Objective-C. I do have a few apps out in the app store, but they were simple one-form apps where I was able to dump everything into the main class and be happy with it.
    This new project I'm working on, is huge in comparison. Over 25 views, accessible through TableView driven menus.
    I was able to get all of the menus working, each launching a separate view NIB file (so far, just a label to show me that it's done, but I got that part working.)
    Now what I'm trying to do, is add a "click" sound when a row is selected. But I'm wanting to do this in a separate class, so each .m file can instantiate it's own version of the logic instead of having the same code 29 times.
    So, this is what I've done:
    Click.h
    #import <Foundation/Foundation.h>
    #import <AudioToolbox/AudioToolbox.h>
    @interface Click : NSObject
    SystemSoundID soundID;
    -(void) playClick;
    @end
    Click.m
    #import "Click.h"
    @implementation Click
    -(id) init
    self = [super init];
    NSString *path = [[NSBundle mainBundle] pathForResource:@"click" ofType:@"wav"];
    AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &soundID);
    return self;
    -(void) playClick
    AudioServicesPlaySystemSound (soundID);
    @end
    RootViewController.h
    #import <UIKit/UIKit.h>
    #import "Click.h"
    @interface RootViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource>
    NSArray *controllers;
    Click *clicker;
    @property (nonatomic, retain) NSArray *controllers;
    @property (nonatomic, retain) Click *clicker;
    @end
    RootViewController.m
    #import "RootViewController.h"
    @implementation RootViewController
    @synthesize controllers, clicker;
    - (void)viewDidLoad
    Click *newClicker = [[Click alloc] init];
    clicker = newClicker;
    [newClicker release];
    self.title = @"Main Menu";
    - (void)dealloc {
    [controllers release];
    [clicker release];
    [super dealloc];
    #pragma mark Table View Delegate Methods
    -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    [clicker playClick];
    I cut out the code pieces regarding the TableView that I know works, and tried showing only the parts that I've added to make the sound.
    What I've tried, is when the RootViewController is created, it has a SystemSoundID type variable defined with it named clicker. Then as part of "viewDidLoad", instantiate an instance of the class and have it automatically populate the variable "soundID". Then during "didSelectRowAtIndexPath", I want the "playClick" method of "clicker" to be run, but at this point the app seems to get caught in some sort of perma-loop, and I have to "STOP"/"Home" out of it.
    I'm hoping the problem is my rookie-status at using Objective-C objects, and the solution jumps out at you veterans, and then whatever problem I am having won't be duplicated when I create additional classes that I'd want to merge into my ViewController logic.
    Hope I've made everything clear. If anyone has questions, I'll be checking for replies
    Thanks.

    Dragon's Nest wrote:
    Is it preferred to init a copy and assign it like you did above?
    Yes, it's an accepted pattern which you'll see in most of the sample apps. Asnor's code works just as well in this case, and it might always work for you if you stick to that same pattern. However if you were working on a team and everyone else used the more common pattern it might cause a problem. For example, this code would cause a memory leak:
    @property (nonatomic, retain) Click *clicker; // interface
    self.clicker = [[Click alloc] init]; // implementation
    The above is the flip side of your original code. In this case, because we're not releasing the newly alloced object, its retain count is +2 after the setter retains it.
    There are other advantages to the accepted pattern. Suppose you weren't assigning the new object to an ivar but only using the object in that one block of code. Should you then release it? Yes. Will you remember? Well, if you're using the pattern, you'll always release it. If you always release the local pointer regardless of whether it gets retained elsewhere, you're much less likely to have a memory leak. How bout the case where you return the pointer (i.e. alloc an object and return it's address from that method)? In that case you just autorelease it. So whoever called the method needs to retain the returned object if it needs to be used after the current event cycle.
    Either way, immediate release or autorelease, you're always releasing an alloced object in the same block of code.
    Memory management can easily get out of control without following consistent patterns. Alloc->retainBySetter->release is the accepted pattern for Cocoa. Your original code meant to use the correct pattern, but you just forgot that clicker=object isn't the same as self.clicker=object because the latter retains the object. Once you've consistently used the correct pattern for awhile, you'll almost never make that mistake.
    Also, is there any difference in calling it in the following two ways:
    @property (nonatomic, retain) Click *clicker; // <-- must be considered to answer this question
    @synthesize clicker;
    [clicker playClick];
    [self.clicker playClick];
    In the above case there's no difference since the getter synthesized for that property declaration will simply return the value of the ivar (i.e. the address of the retained Clicker object). But in the general case, there certainly could be a difference. If the property was atomic, for example, the results could be different. Of course there will definitely be a difference if you wrote a custom getter that did something more than the default.
    Is there a rule or convention re when to use the getter and when to use the ivar directly? Not that I know of. I think you just need to be aware of what the getter does when deciding whether to use the dot notation. This is a point you might want to research a little more, though. Maybe someone here with more experience in Obj-C or Cocoa will comment.
    In fact a few of the experts in this forum advise against ever using dot notation. They feel it was invented to crash newbie programs. If you never use dot notation the difference between these two lines is much easier to see:
    clicker = newClicker;
    [self setClicker:newClicker];
    But once again, if you stick to the same pattern all the time, it's much harder to make a mistake.
    - Ray

  • A Question About Resizing Windows

    I'm a bit new to Mac so please excuse me if my question is a no-brainer. When I open a window in OS X, such as opening the applications folder, the window is always a little too narrow so I stretch it out a bit so that all my app icons are not cut off. However, upon opening it again I find that it has reverted back to its original size and I must resize it once again. This happens with Safari, Firefox, and a few other windows as well. Is there a way on the Mac to set the size and shape that a window will open up to and save it so I don't have to go around resizing everything? Thanks.

    Hi -
    Try minimizing the window (click the little '-' symbol in the upper left window corner) then when it drops into your dock, click on it again and it should open to where you initially minimized it from. Whenever you open a new window it should now open to this preferred size.
    Hope that works.

  • Questions about resizing and uploading pictures ...

    I have set up a desktop folder, and can store my resized pictures there through the export function in iPhoto.  When I export though, there doesn't seem to be any way to export directly to that folder.  Instead, I have to export to the desktop, then drag all those files into my desktop folder.  Is there any way to export my resized photos directly into that folder without having to first go to the desktop, then the folder?  It just seems like extra steps.
    Another nuisance I'm encountering is uploading to sites like eBay and PhotoBucket.  If I chose to browse files on my computer, all that opens is the iPhoto icon rather than individual image files.  I know I can drag and drop, but is there any way of directly accessing either the individual images in iPhoto or the desktop shortcut which contains my resized images?
    I am coming off years of working with Windows, and their system of simply opening My Pictures and selecting the images you want to upload seems much simpler than this.
    I am running OS X Mavericks with a MacBook Air 2013.
    Thanks for any help.

    The iPhoto export dialogue is the same as any other. I wonder if you're seeing this:
    When what you want is this:
    Which allows you to access the specific folders you want. You get this by clicking the button indicated.
    As for uploading photos:
    For help accessing your photos in iPhoto see this user tip:
    https://discussions.apple.com/docs/DOC-4491
    It's the first one you want...
    You can work your photos on your Mac just like you did on Windows, but you've chosen to use a database with lossless processing. So there is a learnign curve if you change not only your OS but you're entire system of managing your photos.

  • Hi, question about resize images shortest side

    Hi, I have PS ext CS6 64b on win 7 pc, I have more images files(psd), I want after finish to edit all, to automatic flatern psd files, change the size of each image to 1000px on shortest side(are landscape and portrait images), and save as jpg at 100% quality;I know how to use batch function in PS, I know to make this for folders with images with only width being shortest side or only for folders with height being the shortest side, but the problem it is that images are mixed ,even in the same folder, so , I must make a batch that open the file, ftattern the image, and run the script who will determine who it is the shortest side(width or height) then, resize to 1000px for shortest side, and save to jpg with 100% quality, and close the image.
    The script I think it is like this:
    if (width < height)
    resize width 1000
    else
    resize height 1000
    But I am not good at all on coding, so I ask here for help, how can I do it?

    apologies, I forgot to check if your settings are in pixels. Try this;
    var strtRulerUnits = app.preferences.rulerUnits;
    var strtTypeUnits = app.preferences.typeUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    app.preferences.typeUnits = TypeUnits.PIXELS;
    var docRef = activeDocument;
    var thewidth = docRef.width;
    var theheight = docRef.height;
    if (thewidth < theheight){
        docRef.resizeImage (1000, null,);
    else{
        docRef.resizeImage (null, 1000);

  • Question about an Array of objects

    I'm writing a program that is supposed to store a String and a double in an array of CustomerBill objects. I just want to know if I am doing it correctly. Heres my code:
    public static CustomerBill[] getCustomerData()
             //Local variables
             int numCust;     //The number of customers being processed
             double amt;
             String customer;        
          //Ask for the number of customers to be processed.
             System.out.print("How many customers are to be processed? ");
             numCust = Integer.parseInt(keyboard.nextLine());
             CustomerBill[] array = new CustomerBill[numCust];
             //Ask user to enter the data.
             System.out.println("\nPlease enter customer data when prompted.");
             System.out.println("Enter customer's last name, then first name.");
          //Get the customer data from user.
             for (int i = 0; i < array.length; i++)
               array[i] = new CustomerBill();
               System.out.print("\nCustomer name:  ");
               customer = keyboard.nextLine();       
               array.setName(customer);
    System.out.print("Total bill amount: ");
    amt = Double.parseDouble(keyboard.nextLine());
    array[i].setAmount(amt);
    System.out.println();
    return array;

    Write a test() method that:
    (1) Gets an array of CustomerBills using getCustomerData()
    (2) In a for-loop print out each of the CustomerBills. It will help if
    CustomerBill has a toString() method but, in any case you should be
    able to see that the aray contains the right number of nonnull elements.
    Then write a main() method that calls the test() method.
    [Edit] And then run it! You may need to do this a few times and check
    what happens with "crazy" data.

  • Question about controlling embed quicktime object with javascript

    Hello,
    I am using javascript to control an embedded quicktime object on my website a la http://www.protofunc.com/2008/02/01/controlling-embedded-video-with-javascript-p art-i-quicktime/ .
    The problem I am having is with the movie.Stop() command. When I hit the pause button on the generic controller, it freezes the current frame. When I call the Stop() command, the movie goes white until it is resumed. Does the pause button do anything more than call "Stop()"?
    Thanks,
    Nick

    any luck with this? i am thinking of trying protofunc.
    fyi:
    i switched from SWF files to QuickTime H264, and have been trying to use the QuickTime/File/Save For Web feature on my movie promo web site.. all the movies play choppy on computers (desktops and laptops), but the technique works well on iPhones and iPads.. it is a bit unfair, IMHO, that apple can make trailers work so smooth on trailers.apple.com, but using their technology does not seem to work for "the rest of us"..
    any web sites other than apple that can help?

Maybe you are looking for