A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: dynamic stage re-sizing

  1. #1
    Member
    Join Date
    Aug 2000
    Posts
    73

    dynamic stage re-sizing

    I was wondering if anyone knew if it was possible to dynmically resize the flash stage WITHOUT reloading the swf in the browser.

    From what I understand the _height and _width property of the stage is read only, and the only way to change the stage size is by changing the height or width of the < object > and < embed > when the html page is rendered in the browser (which would require reloading).

    If I am wrong that would be awesome and solve a few issues that I am having right now (using iframes to reload swf).

    Any thoughts???

    Gracias
    Last edited by mikehd5; 05-23-2003 at 12:13 PM.

  2. #2
    Member
    Join Date
    May 2003
    Posts
    72

    hi,hope this will help

    i dont rememebr from where i grub it
    but this works for me fine.
    regurds
    piny
    ************************************************** ************
    // determin the movie width and height
    mcWidth = 400
    mcHeight = 400
    //making the listener object that the stage will listen to
    resizeListener = new Object()
    resizeListener.onResize = function(){
    Stage.align = "C"
    //script for detecting if the stage resized and re-arrange the stage
    if(Stage.height<mcHeight || Stage.width<mcWidth){
    Stage.align = "TL"
    _root._xscale =_root._yscale = Math.min(Stage.width,Stage.height)/400*100
    }
    }
    //make the stage listens to our listner
    Stage.addListener(resizeListener)
    ************************************************** *****************************************
    expect the unexpected.
    that's what mx is all
    about.

  3. #3
    Junior Member
    Join Date
    Apr 2002
    Location
    Chicago
    Posts
    13
    What if you simply want to edit the height of the run-time swf file?
    I have a container swf "main" that contains multiple sub-swf files. I want to dynamically alter the height of the container swf WITHOUT changing the width or height of any of the other files loaded into it.
    This reduction of height is white-space not currently used in the program and will subsequently be re-sized to full height when needed by using a button event to display sub-swf files loaded in the container that use this space. Any help is appreciated. Please email or post response. Thank you.
    Alex Dove
    A Web Development Company
    www.pivotalsolution.com
    alex.dove@pivotalsolution.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center