Setting width/height too early??

I noticed if I set width and/or height before adding it to
displayList, the displayObject simply won't show up. The following
code is a cut&paste from livedoc (SimpleButton), except that I
add a line of "button.width=20".
If, however, I move the line to after addChild(), things work
normally.
Why?:confused: :confused: :confused:
[CODE]
package {
import flash.display.*;
import flash.events.*;
public class SimpleButtonDemo extends Sprite {
public function SimpleButtonDemo( ) {
// Create a simple button and configure its location
var button:SimpleButton = new SimpleButton( );
button.x = 20;
button.y = 20;
//// ################# Added by me. Button won't show up any
more.
button.width = 80;
// Create the different states of the button, using the
// helper method to create different colors circles
button.upState = createCircle( 0x00FF00, 15 );
button.overState = createCircle( 0xFFFFFF, 16 );
button.downState = createCircle( 0xCCCCCC, 15 );
button.hitTestState = button.upState;
// Add an event listener for the click event to be notified
// when the user clicks the mouse on the button
button.addEventListener( MouseEvent.CLICK, handleClick );
// Finally, add the button to the display list
addChild( button );
//// ############### This works, if added here!!!!
// button.width = 20;
// Helper function to create a circle shape with a given
color
// and radius
private function createCircle( color:uint, radius:Number
):Shape {
var circle:Shape = new Shape( );
circle.graphics.lineStyle( 1, 0x000000 );
circle.graphics.beginFill( color );
circle.graphics.drawCircle( 0, 0, radius );
circle.graphics.endFill( );
return circle;
// Event handler invoked whenever the user presses the
button
private function handleClick( event:MouseEvent ):void {
trace( "Mouse clicked on the button" );
}[/CODE]

You're using the simple button class. Just because you
instantiate an object of this class doesn't mean you've added
anything to the button.
What I'm trying to tell you is that addChild has nothing to
do with it. Simple Button just happens to be dependent on what is
defined inside the button states themselves.
For instance, comment out your hitStates leaving your width
call after the addChild and you should notice the same behavior as
before. By defining the button states, you are actually adding
content to the container that will be drawn to the display when
addChild is called.
You can define your height and width anytime after you have
defined the states for the button. At this point, Flash will then
have content to manipulate. Until you have drawable content to push
to the display list, nothing will happen when width and height are
called.

Similar Messages

  • ImporterProcessServer.exe has stopped working - width/height too large

    I'm getting this error everytime I try importing a video that I got converted from a BetaCam tape.  I have the movie in Microsoft DV Codec and Quicktime DV Codec.
    The first thing that happens is this error pops up with the following details:
    Problem signature:
      Problem Event Name:    BEX
      Application Name:    ImporterProcessServer.exe
      Application Version:    0.0.0.0
      Application Timestamp:    491896d7
      Fault Module Name:    MSVCR80.dll
      Fault Module Version:    8.0.50727.3053
      Fault Module Timestamp:    4889d619
      Exception Offset:    00008aa0
      Exception Code:    c000000d
      Exception Data:    00000000
      OS Version:    6.0.6001.2.1.0.256.1
      Locale ID:    2057
      Additional Information 1:    a388
      Additional Information 2:    cb1346f285b14b60ce06bcb7640ef607
      Additional Information 3:    7188
      Additional Information 4:    c8538bb25c54d271cb1dde4a6dfbc4e0
    Then a dialogue box pops up that says
    File Import Failure
    File video dimensions ( width/height ) too large.
    I have no troubles importing files I've used previous to this project.
    I'm using CS4 4.0.1
    Vista Ultimate.
    Many thanks for any help and advice.
    Kind Regards,
    Clint

    Hi Hunt,
    Thanks for the reply.
    Initially I was using a simple PAL DV setting, but once I got the error I tried using larger project settings with no luck.
    The source video was provided in two formats, for any compatitbility issues so it's the same video.... One is the QT and one is the MS AVI.  The frame size of the video is 720 x 576 and 25 fps. Each file is around 27 GB and just over 2 hours long.
    It's wierd, Premiere won't import either files, After Effects crashes but Encore brings it right in.... if only I didn't need to do a bit of editing.  I'm not sure of the program that did the conversion, but we had it sent off to a studio because the source footage was on Digital BetaCam tape and I'm guessing it was originally captured in Avid, but who knows.
    Any suggestions?
    Thanks,
    Clint

  • How handle Add Media Failure Error: File Video Dimensions (Width/Height) Too Large?

    I am a brand new user of Premiere Elements.  I am using it for stop gap animation, bringing in digital still photos from my Nikon D3200.  I just attempted to bring in the first set of photos from the SD card.  I'm running Windows 7.   After loading the photos, an "Add Media Failure" box came up with the message "Error:  File Video Dimensions (width/height) too large".   Is something wrong with the width and height of the photos and if so what do I need to do to make it work?  There were 763 photos, but the message seems to refer to the height/width of each photo and not the total file size so to speak - right?  During the import process, the program prompted us to bring the photos in as images and not as videos -- so that is what we selected.  Thank you for any assistance.

    Photo Scaling for Video http://forums.adobe.com/thread/450798
    -Too Large May = Crash http://forums.adobe.com/thread/879967
    -And another crash report http://forums.adobe.com/thread/973935

  • "Error Message: File video dimensions (width/height) too large"

    Hello,
    I believe someone else had a similar problem and posted to this forum, but here it goes...
    I have a project in Premiere CS3 that uses MPG files. The files open just fine in CS3 at work. At home I have CS4, but those MPG files do not import. I've tried converting the files to a MOV file but I just get the same result:
    "Error Message: File video dimensions (width/height) too large"
    I'm using Premiere CS4 version 4.1.0 on a Mac. My work computer is a PC.
    I've tried running the file through MPEG Streamclip a couple times with different settings, but so far no luck. I realy have no idea what I'm doing there or what setting could work, but I've got another conversion cranking away now. We'll see how that goes.
    Thanks

    A handheld 4K camera with exchangeable lenses with 1" sensors, standard with a 20-600 mm equivalent zoom range, with extender, with a simple battery that lasts at least 12 hours, that records on $ 25 SD 128 GB cards, available at every streetcorner and does 4:4:4 color space uncompressed I-frame with a weight of less than 4 Lbs and with a dynamic range over 60 dB, all under $ 1 K?
    Take out the prices and you've fairly accurately described the forthcoming Scarlet.
    It also describes somewhat well AVC-I cameras.
    But overall, I would not argue with your description as a goal to be achieved in 5 years.  In the interim there would have to be compromises, of course.  But there are three things that should never be compromised in any video camera anywhere - the imaging devices should always be full resolution, the recording format should always record the full raster, and only using I-frame compression.
    This was the norm for standard definition.  Only with HD have camera makers mucked things up.  It's time they got back to basics and made proper cameras.

  • Why can't I import anything? "File video dimensions (width/height) too large"

    New to PP CS4 here (that will be obvious momentarily...).  I can't seem to import any footage into any project (well, at least none of the bits I've tried, and I don't think there's anything 'wrong' with them).  Every time I attempt to do so, I get the error:
    Dialog title: File Import Failure
    Error Message: File video dimensions (width/height) too large.
    This occurs with every files I've thrown at it - admittedly, they all have a lot in common, but they're not particularly exotic.
    The files are (mostly) AVI files (I know, I know...before I get jumped, I understand it's just a wrapper, etc.). The files come from two cameras:
    1. A Sony DCR-TRV20. Opening up the AVI in QuickTime Player, I see it's listed as "DV/DVCPRO - NTSC 640X480"
    2. Canon PowerShot A620. Opening up the AVI in QuickTime Player, I see it's listed as "MotionJPEG OpenDML 320x240"
    3. I somehow managed to get the AME to spit out a FLV file. That failed to import with the same error message, too.
    I tried running these files through AME, and got the same results (although never having used AME previously, I have a question on that, below).
    New project, settings are all (I think) the defaults: Preset DV-NTSC/Standard 32kHz
    New installation of PP CS4, with the 4.1 update, on a PC running Vista 32 with all the endless MS updates applied.
    Related question: I've skimmed other threads here, and noted the advice to "always convert any non-standard footage to DV-AVI Type II" before importing....however, I see no such option for that output format in AME....only generic things like "Microsoft AVI" and "Uncompressed Microsoft AVI".
    Codec issues?  I'm a little skeptical, since these AVI files play just fine in Windows if I double-click them. Does that not suggest that there's a codec there for them?  The files are from (what I believe to be) garden-variety consumer cameras (these devices are a bit old and certainly not high-end, but they're hardly exotic formats, I think). The files are small, short clips I'm attempting to use just to learn Premiere, but it gags on every one of them, every time.
    PP is so insistent that every file I throw at it has improper dimensions, but these files appear to be perfectly reasonably sized, and I assume it's operator error (I'm withholding judgement on the quality and accuracy of the error string it's presenting me).  But I'm not sure where to look for the right knob to twist.  Pretty frustrating to be stuck on Square 1 (actually, Square Zero).
    Can someone point me in the right direction?
    Please be gentle, it's my first time....

    Thanks, but....mmmm....maybe not.
    I've tried multiple settings for New Projects. Just created a new one using the preset for DV-NTSC/Widecsreen 48kHz (frame size 720 x 480, 48 kHz audio).  Exactly the same results.
    You say "To point you in a certain direction, DV from a TRV is 720x480, not 640x480."  However, according to QuickTime's Movie Inspector panel, the file is 640x480.  This clip was captured through Premiere - that wouldn't change its aspect ratio, would it?
    The files from the Canon still camera are AVI files, not still images (so I don't see how the reference to Photoshop applies, or perhaps I misunderstood your point). They are 320x240, according to QuickTime's Movie Inspector panel. If they're 320x240, wouldn't that be the same aspect ratio as 640x480?  Attempting to import them, I get the same error....
    While not exactly Hollywood quality, I just need files to play with as I attempt to learn the program, and it's not clear to me why these files should not work - other than the fact that NO files seem to work. Also, I'm not sure what your reference to "exporting" pertains to - I can't get anything imported, I'm not trying to export anything that (I'm aware of) - I'll worry about exporting once I've managed to get something, ANYTHING to import.
    I've got some PP training videos (from "you-probably-know-who.com"). Following along using their project files and their video assets (MOV files in this case), I still get the exact same error.
    So to summarize, so far, I've seen no evidence that this copy of PP can import ANY video file.
    While I'm sure I would benefit from spending more time with the fine manual, I think there's something wrong here that's not going to be addressed in the introductory documentation.  If I can't import any footage into any project, progress is going to be slow.
    How about this: is there some known-to-be-good test file I can grab and try importing that?  I've got very strong suspicions that I'll get the same error message.
    Thanks again.

  • File video dimensions (width/height) too large

    I cannot impoty any file of any type into my time line.  I was having some issues with crashing, ended up upgrading my OS to snow leopard, and then reinstalling all my adobe products. Now all of my media is showing up as off line, when i try to relink anything, jpg, psd, ai, and all video files, i get the error "File video dimensions (width/height) too large".  I really do not want to start over and re edit everything I have ever done, and i am not even sure i can do that at this point, as it also happens when i try to create a new file.
    does anyone have any other fixes?  Please Help, I am going insane. 
    I have CS4 Production Premium.
    OS Snow Leopard.
    Mac Pro, 8 core.

    Hi,
    What kind of video files are you working with ?
    I did a google search using ---- file video dimensions ( width/height 0 too large ---  and most of the info I looked at in the search results is about files ( still images mostly ) that are larger than 4000 x 4000 px.. which is a limit for the NLE....but some results were about using cineform codec and matrox graphic card and some stuff about nero and so on....so I would guess the more info you can give about what you have and have done the better...
    Rod

  • File video dimensions (width/height) too large, importing AVI

    I'm testing Windows 7RC and Adobe Production Premium CS4. Both CS4 and Windows are fully updated with all updates available through today. Premiere Pro CS4 is at 4.1.0.
    I have hundreds and hundreds of AVI files captured from tape and from memory cards created by the capture process in Adobe Premiere Pro 1.5.1.  if I create a new project, HDV 1080i (60i) and try to import my AVI files I get the error message about 'file video dimensions (width/height) too large'. These files were created with the Cineform HD codec that came with 1.5.1. I have the CFHD codec "CineForm 10-bit-visually Perfect HD" loaded on this computer, and G-spot verifies that and can render and play the avi files. Since these are from HDV their actual dimensions are 1440x1080. I've also tried to import standard def AVI files with the same result.
    I just picked a few random projects to attempt to open, and none of them will open. Not SD not HDV. I get the 'too large' message.
    Suggestions?
    Hawkeye

    Throwing out wild guess here, but I think things changed with the way Premiere handled HDV with 2.0, at which point it went 'native' - meaning it no longer uses the Cineform codec.  I wonder if it's possible the two versions just don't mix, despite the Cineform codec being installed.

  • "file video dimensions (width/height) too large" is the exact message, what is the solution please?

    Trying to make a slideshow in Prem Pro CS4 with full size D800 jpegs, but the message "file video dimensions (width/height) too large" appears
    I have checked the FAQ and found that the res of the D800 at 7000x5000ish is well below the 25,000x25,000 Prem quotes,
    Can anyone help please?
    Thanks

    4,096 X 4,096. See this:
    http://help.adobe.com/en_US/PremierePro/4.0/WS92DAB4F5-E46F-46fb-B2D8-71813E6A3AE4a.html
    The newer versions explained here:
    http://blogs.adobe.com/premierepro/2010/07/maximum_dimensions_in_premiere.html

  • How to set width/height of iPad app in ipa file

    Hello,
    I am developing an app for iPad in Flash Builder 4 and Packager for Iphone.
    I set the width and height node values in the descriptor XML and compile the application. When I run the same in iPad, I am not able to see any effect on the app's width and height.
    Also, in default load, app opens in dimensions as per the iphone view and not specifically for iPad.
    Any help?
    Tanu

    hi,
    How does your application descriptor file look like? I also had the same problem, when I realised that I had a few things missing in my app desc. file. My file looks like this
    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <application xmlns="http://ns.adobe.com/air/application/2.0">
        <id>IPadApp</id>
        <filename>IPadApp</filename>
        <name>IPadApp</name>
        <version>v1</version>
         <initialWindow>
            <content>IPadApp.swf</content>
            <fullScreen>true</fullScreen>
            <autoOrients>true</autoOrients>
            <title>IPadApp</title>
            <aspectRatio>portrait</aspectRatio>
            <systemChrome>none</systemChrome>
            <transparent>false</transparent>
            <visible>true</visible>
            <!-- Portrait -->       
            <width>768</width>
            <height>1024</height>       
            <!-- Landscape -->
            <!--
            <width>1024</width>
            <height>768</height>
            -->
            <!--<x>100</x>
            <y>100</y>-->
            </initialWindow>
        <supportedProfiles>desktop mobileDevice</supportedProfiles>
    <iPhone>
      <InfoAdditions>
      <![CDATA[
        <key>UIDeviceFamily</key>
        <array>
        <string>2</string>
        </array>
      ]]>
      </InfoAdditions>
      </iPhone>
    </application>
    Check your desc. file.
    -Vrushali

  • Setting width/height of a control with CSS

    Hi,
    I am styling a button a button in CSS and set a background-image for the button in my stylesheet.
    The problem is, that the button should scale to the width/height of the image.
    I added:
    -fx-width: 32px;
    -fx-height: 32px;
    but it has no effect.
    I also tried it with
    -fx-min-width: 32px;
    -fx-min-height: 32px;
    If I use setMinWidth(32); in Java, it works.
    But I rather want to set it in my stylesheets, because the image can change, if we use another skin.

    CSS documentation (http://docs.oracle.com/javafx/2.0/api/javafx/scene/doc-files/cssref.html) states:
    "JavaFX CSS does not support CSS layout properties such as float, position, overflow, and width. However, the CSS padding and margins properties are supported on some JavaFX scene graph objects. All other aspects of layout are handled programmatically in JavaFX code."
    I thought you might be able to do something using the -fx-shape property, but the shape does not affect the size of the button - so that didn't work.
    I had more luck with the -fx-graphic property - you could try to enhance the stylesheet below to get what you want.
    .root   { -fx-background-color: azure; -fx-padding: 20; }
    #smurf-button { -fx-graphic: url("http://bluebuddies.com/smurf_fun/smurf_race/jpg/Smurf_Race_100x100.jpg"); -fx-background-color: transparent; }
    #smurf-button:hover { -fx-effect: dropshadow( three-pass-box , rgba(184,134,11,0.6) , 20, 0.0 , 0 , 0 ); }
    #smurf-button:armed { -fx-effect: innershadow( three-pass-box , rgba(0,200,0,0.6) , 30, 0.0 , 0 , 0 ); }
    public class ButtonStyle extends Application {
      public static void main(String[] args) throws Exception { launch(args); }
      public void start(final Stage stage) throws Exception {
        final Button button = new Button();
        button.setId("smurf-button");
        final Scene scene = new Scene(StackPaneBuilder.create().children(button).build());
        scene.getStylesheets().add(this.getClass().getResource("style.css").toExternalForm());
        stage.setScene(scene);
        stage.show();
    }

  • StyleName for a Button - can I set width & height?

    Hi folks,
    I've declared a style in my app's css file like this:
    .styButtonSmall {
    width: 15;
    height: 35;
    And declared a button like this:
    <mx:Button id="bSave" click="doSave()" label="Save"
    styleName="styButtonSmall"/>
    The style seems to have no effect - I get standard size
    buttons. I've also tried specifying numbers like "15px" rather than
    15, and also tried setting maxHeight and maxWidth in the style
    specification. No luck. However, if I set height and width directly
    on the button, they size themselves correctly.
    So my question is: How do I use a style to specify button
    height and width?
    Thanks,
    ws

    Changing the width and height of components is not supported
    in styles in Flex:
    http://www.adobe.com/devnet/flex/quickstart/styling_components

  • Action performs % scale instead of setting width & height

    Hi
    I'm trying to create an action to scale an object to an width of 1024 pixel and then save if for web.
    But the actions saves the percents, making it useless when applied to another object.
    Can someone tell me what I'm doing wrong?
    Noties in pictures, that I set the width to 1024 pixel, but in the Action it performs an Scaling of 1233,73%

    Record setting the width or height in the Transform palette (or Control Panel) instead of in the Scale dialog.
    JET

  • File video dimensions (width/height) too large - How can I fix this? PE 11

    Took the photos with a Canon T2i DSLR, but get that error message when I try to put them in my Timeline, how can I change the settings or resize the pictures so I can use them?

    VDOSurfer,
    The max pixel x pixel dimensions WAS 4096 x 4096, though with PrE 11, that might have been bumped up.
    Now, and with that said, it only takes a very few max pixel x pixel Still Images to bring, even a powerful computer, to a crawl, or a crash.
    As an example, I have several very large Projects w/ many thousand Still Images, though all are Scaled to match the Project Frame Size. For a test of something else (Photo Walls), I did a Project with 4000 x 4000 Still Images, and my workstation could handle four of them. With the fifth, I got a hang, or a crash. In that case, I took the Project into Adobe After Effects, and was able to do the work with 25 4000 x 4000 Stills, and had no issues. AE handles such things better, and differently, than either PrE, or PrPro does.
    Even though PrPro, as of CS 5, can now handle larger Stills, and can also do a better job of Scaling, if one has the MPE hardware turned ON, with a proper CUDA-capable card, there is still the issue of computer resources, when handling many large Still Images. It is better, than it once was, but with too many, or too many, that are too large, the computer can grind to a halt.
    Hunt

  • File video dimensions (width/height) too large error?

    Trying to display documents (PDF converted to TIFF) as a PinP.
    First attempt worked okay but the image quality was poor.
    Re-scanned the documents at a higher resolution and now I can't even import them!
    Basically, we're talking about a static head-shot video which I moved over to the left and am putting the document the speaker is discussing in the right quarter of the screen.  I'm trying to get the resolution high enough to be able to read the text in the document.
    Any suggestions welcome.
    Thanks
    admadm

    The max still image size is approximately 4096 pixels, so the 4808 x 6380 files are just not going to Import.
    The trick with Scaling, is to first do that in PS/PSE, as the Scaling algorithms are better, plus, at least in PS, will offer you some choices, such as Bicubic Sharper, or Bicubic Smoothier. Experimentation with your images will likely tell you which works best.
    Now, with Video, one can only display the pixel x pixel area for the Frame Size, though one CAN animate to say Pan Down, creating a Roll. Though you mentioned doing a PiP, let's just keep things simple here (you can do the math with your exact PiP later), and say that you have the vertical (8.5 x 11) image, and want to place that into the horizongal area of the Video. You can Scale the vertical dimension to 720, and let the vertical dimension adjust, per the Aspect Ratio of the scanned page (making sure that that vertical dimension is LESS than 4096 pixels), and then use the fixed Effect>Motion>Position and Keyframes, to "Roll" the image up, allowing the audience to read it. The other option would be to Scale the vertical dimension of the image to the 480 pixels, and let the width than adjust. This is about what it seems that you wish to do with the PiP.
    There is another consideration, but you probably do not have control over those at this point - TEXT. Video is not kind to Text, like high-resolution printing is, and 720 x 480 is quite low resolution. A san-serif font should be used, as the serifs can flicker, and also go very soft. Text should be adequately large, and should be bold enough, that you do not have any thin lines in it. With scanned existing documents, you may just have to live with what you have.
    Good luck,
    Hunt

  • Begin&End-Dates being set 1 day too early for infotypes 208

    Hi Gurus,
    When an employee is withdrawn SAP is updating IT208 & IT209 with the wrong date.Could some one please help me in knowing the link between the employee withdrawn date and the infotypes dates?where do we link infotype 0000 with the tax infotypes

    Hello Gbkrreddy,
    Please, check the dynamic action in Table V_T588Z.
    Kind regards,
    Graziela

Maybe you are looking for