Dynamically change stage size on runtime

Hi everyone,
I need to change the stage size dynamically.
When i try to do this............
size_mc.onRelease = function(){
    trace(Stage.height);
    Stage.height += 100;
    trace(Stage.height);
it comes always the current stage size.
Thanks in advance

You cannot change the width and height properties of the Stage using code--it must be done in the editor.  The width and height values can represent different things depending on the value you set for the scale mode, but you cannot reassign them to different values dynamically.
The solution just offered to you is under the same rules, the stageWidth and stageHeight values cannot be assigned using code, but that code is AS3 code so it will not fit in your AS2 design in any case.
The same goes for the followup offered in AS2.  You will notice the stage size is not being changed... it cannot be.  This is just a full screen design solution, but is not a soltuion to changing the stage size.  The stage size can only be changed manually in the authoring environment.  I don't know that the offering is answering what you are really trying to do, but it is not answering the titled task of dynamically changing the stage size

Similar Messages

  • Changing Stage size at runtime

    I have been poking around and not finding any info on this.
    What I want to do is change the height of the STAGE (not a
    MovieClip) based
    on which view I'm showing the customer at a particular time.
    For instance...
    I may have a thumbnail and a detail view for a product. I
    don't need a lot
    of screen real estate to show the thumbnail view, but I'd
    like to make the
    swf taller if the user switches to the detail view.
    I don't simply want to make the swf taller by default because
    I'll have a
    ton of unused whitespace in thumbnail view, which will look
    stupid.
    I shouldn't have a problem with the JavaScript to change the
    height
    properties in the HTML tags for the Flash object, but not
    really sure if/how
    to do the other part in Flash. Everything I've seen so far
    has been
    read-only properties.
    Thanks,
    Chris.

    did you change stage size?
    how can you do this without javascript?
    "Christopher Hayes" <[email protected]> escreveu
    na mensagem
    news:ee4csi$ent$[email protected]..
    >I have been poking around and not finding any info on
    this.
    >
    > What I want to do is change the height of the STAGE (not
    a MovieClip)
    > based on which view I'm showing the customer at a
    particular time.
    >
    > For instance...
    >
    > I may have a thumbnail and a detail view for a product.
    I don't need a lot
    > of screen real estate to show the thumbnail view, but
    I'd like to make the
    > swf taller if the user switches to the detail view.
    >
    > I don't simply want to make the swf taller by default
    because I'll have a
    > ton of unused whitespace in thumbnail view, which will
    look stupid.
    >
    > I shouldn't have a problem with the JavaScript to change
    the height
    > properties in the HTML tags for the Flash object, but
    not really sure
    > if/how to do the other part in Flash. Everything I've
    seen so far has
    > been read-only properties.
    >
    > Thanks,
    >
    > Chris.
    >
    >
    >

  • Dynamically change in size of the custom container using ALV GRID (OOPS)

    Hi Gurus!!!!
    I have an issue with the output of the report which is developed using ALV GRID (OOPS). I have used the custom container occupying full screen (Screen painter). When I execute the report using my PC the output displays report as expected in full screen. The problem is when we execute this report in 19 INCH monitor then there is always gap below the report.
    As per my understanding we should have a code to change the size of custom container dynamically.
    Please suggest some help on this.
    Thanks,
    Hemal Shah

    Hi,
    If you set the attributes, Resizing - Vertical and Horizontal for the customer container, than system will resize the size of the custome continer as per the resolution.
    Hope it helps,
    Sumana

  • Change Form Size during runtime

    Could someone tell me how to change the size of my VI form during runtime?
    I want the ability to click a button and have the height increase by 50 points or so, then go back to the original value after I click the button again.
    Thanks for the help!
    Angus Cattle from Pool Ranch and Steel Repairs via Joe's Welding.

    Ok, that got me on the right track.
    For some reason, though, my VI still does not change whenever I click the button.
    I have attached my VI, saved in 8.2 format.
    Does anyone see why my form doesn't grow by "98" whenever I click the "More >>" button?
    Angus Cattle from Pool Ranch and Steel Repairs via Joe's Welding.
    Attachments:
    Event Notifications.vi ‏44 KB

  • Dynamically change the size of a text field.

    Is it possible to change the size of a text field depending on the amount of text in the field?
    Thanks,
    Chad

    You can find the answer from this post.
    jimmypham, ""Shrink to Fit" - Text Field capability?" #1, 18 Jul 2005 10:36 pm

  • Dynamically changing windows size

    Hi Folks,
    Is it possible to dynamically change the dimensions of windows i.e. Main and Secondary windows.

    Hi,
    See the fallowing link
    Smart forms - Dynamic sizing of the windows.
    Regards,
    Vijay.

  • Change stage size in web browser without scaling

    I need to change the stage's size without auto scaling (i.e.
    cropping is ok) so that the user can scroll up/down the stage
    either with the browser's scrollbars or custom scroll bars I
    create. The height of the swf's contents change and so I need to
    change the stage's size or somehow crop it so that it would match
    the browser's size.

    At Adobe's web site at
    http://www.adobe.com/devnet/flash/samples/
    you'll find a link to the zipped sample files. In there, you'll
    find a folder titled "StageSize". Take a look at this example, it
    may explain how to achieve what you want to do.

  • Dynamically changing the size of a JPanel

    Hi All,
    I am loading multiple images in a JPanel. I want the size of the JPanel to increase dynamically as and when the images are loaded. I have also added a JScrollPane and added the JPanel to this JScrollPane.
    However, the images are cut as soon as it crosses 800 pixels (which is the preferred size of the JScrollPane and it starts to give me NullPointerExceptions where I try to access the image height and width. Here is the code that gives me the problem. The files are opened using the filechooser and put into a Vector, which is then retrieved in the paint() method and rendered to the panel.
    CurrentScreenSize is a Dimension that stores the value of the current screent size that the image pane should have.
    imagePane is the JPanel that contains all the images.
    //File | Open action performed
    void jMenuFileOpen_actionPerformed(ActionEvent e) {
    //Handle open action.
    if (e.getSource() == jMenuFileOpen) {
    fc = new JFileChooser();
    //Filter out only image files (uses Utils.java and ImageFilter.java)
    fc.addChoosableFileFilter(new ImageFilter());
    fc.setAcceptAllFileFilterUsed(false);
    fc.setMultiSelectionEnabled(true);
    int returnVal = fc.showOpenDialog(MainFrame.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File[] files = fc.getSelectedFiles();
    //This is where a real application would open the file.
    int x=10, y=50;
    for(int i=0;i<files.length;i++)
    try {
    Image tempImage = ImageIO.read(files);
    image.add(tempImage);
    if(tempImage.getHeight(this) > currentScreenSize.getHeight())
    currentScreenSize.setSize(currentScreenSize.getWidth()
    + tempImage.getWidth(this),
    tempImage.getHeight(this));
    else
    currentScreenSize.setSize(currentScreenSize.getWidth()
    + tempImage.getWidth(this),
    currentScreenSize.getHeight());
    if (imagePane.getSize().getWidth() <
    currentScreenSize.getSize().getWidth() ||
    imagePane.getSize().getHeight() <
    currentScreenSize.getSize().getHeight())
    imagePane.setSize(currentScreenSize);
    this.pack();
    //repaint();
    catch (IOException ex) {
    ex.printStackTrace();
    //When all images are loaded then paint it / display it
    repaint();
    public void paint(Graphics g){
    int x=10, y=50;
    super.paint(g);
    g = imagePane.getGraphics();
    for (int j=0; j<image.size() ; j++)
    Image img = (Image)image.elementAt(j);
    int imageWidth = img.getWidth(this);
    int imageHeight = img.getHeight(this);
    g.drawImage(img, x, y, imageWidth, imageHeight, this);
    x = x+imageWidth;

    got the Solution, using validate() method does the work under the hood.

  • Changing stage size midway through movie

    Hi
    I have downloaded a Flash movie from a library which I want
    to use as part of a larger movie. The downloaded Flash movie is 300
    pixels square, while the movie I want to use it in will be 765 x
    100 pixels. The downloaded movie has a number of layers and is
    around 100 frames in length.
    Is there a way of selecting all the elements on the stage and
    then a) reducing them all in size, which would be 33 percent of
    original size and b) moving them so they are centered on the stage?
    Or am I better working on a larger stage (would have to be
    2295 x 300 pixels) and then publishing at 33 per cent of actual
    size? Does one way have a benefit over the other in terms of
    finished file size? If I do it this way, I'm still going to have to
    move all the elements across the stage as a group (if this is
    possible).
    Many thanks for any help.

    Found the solution that worked (used ._xscale and ._yscale
    instead of ._width and ._height
    [code]
    function resize_movie_clip(clip_loader_name:MovieClip,
    max_width:Number, max_height:Number, center_offset:Number )
    if( (clip_loader_name._width > max_width) || (
    clip_loader_name._height > max_height ) ) // If either dimension
    is too big...
    if( clip_loader_name._width > max_width )
    _root.picsPage_mc.txt_test = "func if 1";
    clip_loader_name._width = max_width;
    clip_loader_name._yscale = clip_loader_name._xscale;
    if( clip_loader_name._height > max_height )
    _root.picsPage_mc.txt_test = "func if 2";
    clip_loader_name._height = max_height;
    clip_loader_name._xscale = clip_loader_name._yscale;
    else { new_width = orig_width; new_height = orig_height; }
    [/code]

  • Is it possible to change memory size while runtime?

    Hi!
    Is it possible to set the Xmx value while runtime?
    I try to do something like this java Myclass -Xmx128mBut only in a dynamically way while my application is running.
    I'm developing an image-rendering - extension for an existing app and there's no chance to edit thejava XYZ statement.
    I don't think that's possible, but If anyone has an idea....
    Thanks!

    Yes. Both RAM and the hard drive are easily accessible and replaceable. The warranty is not voided because both are considered DIY. However, if you damage the computer in the process then your warranty will not cover that damage. But it is not voided.

  • Change SubScreen sizes during runtime

    Hello all,
    Here is another question.
    Is there a possibility to change the height of a user subscreen during runtime?
    Thank you in advance.
    Andreas

    Yes,you can.Just assign the new source to the source property of swfloader.

  • Dynamically changing the size of KM document IView.

    Hi All,
    At present the framework page has 3 KM document Iview. All iviews are calling HTML files. Now if the content in HTML file increases, I get an scroll bar for that Iview. Also based on the resolution of the screen I get the scrollbar. e.g I have fixed the height of the iview to say X for a resolution 1024 * 768 where in no scroll bar appears, now if I choose 1280 * 1024 resolution, iview appears with both horizontal and vertical scroll bar.
    I tried to change the height type as automatic and the minimum height in pixels as 0 and maximum as 1000, then the iview it self disappears i.e it is taking the minimum height.
    Now in my scenario based on the requirement the HTML content will change but instead of automatically adjusting display height of the Iview, it is taking hte minimum height mentioned. 
    How can I display the IView without scroll bar appearing if the content of the HTML is changing or the screen resolution is changing.
    Thanks
    Namit

    Hi Namit,
    The KM doc iview is just like a container for storing and The horizantal scroll bar apperas as and when the content gets bigger than the container.
    One option would be to write a small iview with an imbedded iframe pointing to the KM doc, where the width, height comes from profile attributes. This would remove the option of horizontal bar. Coming to height , Set the height type of the iView to Automatic OR if that doesn't work because of domain issues then set it to fixed and in addition set the iview height to the height of the image + 10~20 px more..
    Hope this helps you.
    GoodLuck!
    Regards,
    Shaila

  • Dynamically change an image at runtime in Crystal Report

    Hello,
    I am using crystal report included in VS 2005 and want to display an image at runtime. I have tried using Picture control and OLE Object of crystal report, but did not get any success. I have googled for this and most of them are saying Right Click on Picture
    control->Format Object->Select Picture Tab->Click on X2 next to Graphic Location. But I do not found any Graphic location field in picture tab. Pl see the attached screen shot.
    Can anyone guide me how to load an image at runtime in crystal reports?
    I am using CrystalReport11 and VS2005. It's a VC++/MFC project.

    If you are using Crystal Report for Visual Studio, ask at http://forums.sdn.sap.com/forum.jspa?forumID=313
    Microsoft does not offer support for third party software. 
    Visual C++ MVP

  • Dynamically change CAN message payload length in XNET

    It took me a while to figure out that when I send 4 bytes into the nxWriteFrame routine when it's defined as an 8 byte message in the DBC, that the message never makes it onto the bus.  Is there a way to dynamically change the payload length of a CAN message at runtime without stopping and starting the session again?

    Hi KavehV,
    It is possible to dynamically change the payload lengthduring RunTime but not without starting and stopping the session. In fact, all changes to the payload length, when done dynamically, is done to the copy of the database in memory as opposed to the one on disk, so whenever your application stops running, the changes are discarded. If you need to change the payload length, you would need to essentially do so before you create a session by opening the database, and modifying the copy that's in memory.
    Raj
    National Instruments
    Applications Engineer

  • Smartforms-Dynamic Change of Font Size in main window

    Hi Friends,
       How shall I be able to change dynamically the font size in main window of smartform. If the records are more in main window then the layout comes in 2 pages but if less in 1 page. So I want to decrease the font if the records are more to assign it in 1 page.
    Eg : I can print only 10 lines in 1 page of main window, but if the records exceed 10 lines it is going to next page, so I want to shrink the font size to maintain the layout in 1 page.
    Thanks & Regards,
    Somen
    Edited by: Das_SAP on Jun 23, 2009 7:59 AM

    Hi,
    SmartForms does not offer the option to set some characteristics at runtime. You must work with conditions in your form.
    First find out how many records you have in your table
    DESCRIBE TABLE mytable RECORDS sy-tfill.
    You create 2 texts nodes with the text to be output and assign the font and font size to them. Obviouly, one node will have a big font size and the other one a normal font size but both contain the same information and same variables.
    You can now work with an alternative. If the condition (there are many records for a secondpage) is true, assign text node with normal font size to option TRUE and the other text node to FALSE.
    Optionally, every text node has folder CONDITIONS, where you can say
    SY-TFILL >   10 lines  <-- for text node with normal font size
    SY-TFILL <= 10 lines  <-- for text node with big font size

Maybe you are looking for

  • How can I see the data in the aggregates

    how can see the data available in the aggregates. Jay

  • PDF created in Excel cannot open is CS3- shows error

    I saved a 4 page PDF document in Excel 2007 and tried to open it CS3. It keeps coming up with an error. 0x 4 000 000 c. I was able to do a workaround by opening it up in Illustrator - then saving each page as single PDF's and then opening them in CS3

  • Why dosen't the system preferences work on my Mac?

    is there any way I can fix it it won't pop up no more

  • Application export issue

    Hi, I have exported my application from one server to my new apex installation on another server. Export works fine but i don't have any more my pics downloaded in images in shared components. Can someone tell how can i get them? Thx in advance. Celi

  • What does 'fcode' mean?

    Hi. Could anyone help me about 'fcode'  that is in userexit SD module. I review MV45AFZZ at SE38 and am curious about it. and  what are the 'LOES' , 'FLI1', 'FLIF' and .. Please help me ex) if sy-tcode+0(4)  =  'VA01'  and    fcode+0(4)     <> 'LOES'