Stage height

I am new at this so hopefully this won't be too complicated.
I have a home page that loads a .swf file when it opens. The
buttons on the home page load a new .swf file using LoadMovieNum.
My problem is that each of these files is a different height. If I
make the home page long enough to scroll the .html file then those
that are shorter have a lot of white space at the end. An example
is the height of the home page is 1200. The other .swf files being
loaded vary from 650 to 1200. The one that is 650 has a lot of
extra white space to scroll through. Thanks in advance for
helping.

you can use the browser's scroll bar. I thought thats what
has been happening, which is why you got those white spaces?
The solution I was referring to keeps the browser showing the
same ammount through out all of your pages, then you use flash to
scroll your content.
Alot like what the UIscrollBar does, which you used before.
Another method i guess would be for you NOT to load .swf
content into your Flash movie. But rather open a different Flash
page for every page in your site.
eg..
You have all your pages (swf files) separate, with a
dedicated html page to embed them.
Have the same Navigation menu in all your SWF files, with
buttons pointing to the corresponding html page.
(You could use html Frames, and have one navigation swf,
which opens all other html files)
This would use the Browser's scrollbar, according to the
Height of your flash movie. Since all your flash pages are
separate, the browser will scroll as much as needed for each swf
embeded into the html, that is currently opened.
Hope this is more helpful.

Similar Messages

  • Stage Height/Width Issue

    I am writing a piece of code that basically says if a certain MC reaches a ypos of -50 to perform a set of actions:
    EXAMPLE CODE
    if(balloon.clip.y <= topBounds)
                    //actions here
    But for some reason it wasn't recognizing when the MC would reach the specified ypos. I did a simple trace statement of the stage height and width because I suspected something was off with the script reading x and y positions. And sure enough the output of the trace did not correctly match what my actual stage size was set to in my fla.
    trace(stage.stageHeight); This traced 798
    trace(stage.stageWidth); This traced 1440
    While my actual stage is set to 550x400.
    Am I missing something here? I also traced the ypos of the moving MC and the trace output positions that were nowhere near the actual y positions of the MC as it moved. Ironically though, the external class file to this object recognizes the correct x and y positions when I call the function from the .as file. Only when I try to call the function from the fla file do I run into this issue of incorrect x and y positions.
    Any help? Thanks

    Below is my code for my as class file and the code being called from the stage within the fla file. The issue I am having is with the conditional statement in the fla code, I have highlighted it in bold and italics. The ypos of the MC is not registering at -50 when clearly the object has a y position of -50. Something seems messed up with the x and y positions of the clip on the stage because the y position traced to teh output panel is nowhere close to the actual y position of the clip on the stage as it moves.
    .as file code
    package
        import flash.display.Stage;
        import flash.display.*;
        import flash.display.DisplayObjectContainer;
         import flash.display.MovieClip;   
        import flash.utils.Timer;
        import flash.events.TimerEvent;
        import flash.events.Event;
            public class Balloon
                    public var clip: MovieClip;
                    public var xVel: Number = 0;
                    public var yVel: Number = 0;
                    public var upwardForce:    Number = 0; // applies to y value
                    public var shrink: Number = 1;
                    public var fade: Number = 0;
                    public var topBounds: Number = -50
                    public function Balloon(symbol:Class, target:DisplayObjectContainer, xpos:Number, ypos:Number, size:Number)
                            clip=new symbol();
                            target.addChild(clip);
                            clip.x = xpos;
                            clip.y = ypos;
                            clip.scaleX=clip.scaleY=size;
                        } // end Balloon constructor function
                    public function moveObject():void
                            clip.x += xVel;
                            clip.y += yVel;
                            yVel -= upwardForce;
                            clip.scaleX *= shrink;
                            clip.scaleY *= shrink;
                            clip.alpha -= fade;
                      }//end moveObject function
                    public function removeObject():void
                            clip.parent.removeChild(clip);
                        }// remove balloon from the stage
                } // end Balloon class
    }// end package
    code inside fla
    var balloonArray:Array = new Array();
    stage.addEventListener(Event.ENTER_FRAME, startBalloons)
    function startBalloons(evt:Event):void
            var balloon: Balloon; // referencing our Balloon Class
            for(var i:int=0; i<balloonArray.length; i++)
                    balloonArray[i].moveObject(); // calls moveObject function thats in the class file
            balloon = new Balloon(hotAirBalloon, this, randomRange(200, 400), randomRange(400, 550), randomRange(0.3, 1));
            balloon.xVel = -3; 
            balloon.yVel = -4;
            balloon.shrink = 0.9999;
            balloon.fade = 0.000011;
            balloon.upwardForce = .005
            balloonArray.push(balloon);
            if(balloonArray.length>randomRange(1, 5))//creates only 3 balloons and removes all others created from th array
                   balloon.removeObject();
        if(balloon.clip.y <= -50)
           trace("balloon has reached the top"
            var balloonTimer:Timer = new Timer(randomRange(25,45)*1000, 1);
            balloonTimer.addEventListener(TimerEvent.TIMER,timerFinished);
            balloonTimer.start();
            function timerFinished(event:TimerEvent):void
                        trace("time's up")
                        balloonTimer.stop();
                        balloon.clip.x = Math.random() * (400-200) + 200; // give random x pos to start from
                        balloon.clip.y = Math.random() * (1000-400) + 400; // give random y pos to start from
                        balloon.clip.scaleX = balloon.clip.scaleY = Math.random() * (1-0.3) + 0.3;
                        balloon.clip.alpha=1;
            } // end startBalloons function
        function randomRange(offset:Number, maxValue:Number) // generic function for randomizing object properties
                return Math.random() * (maxValue-offset) + offset

  • Stage height width problem

    Hi Everyone ,
    I am quite new to Flash ,
    I have made one flash swf in flash cs3 using action script 2
    My requirment is like this -
    if client's resolution is less than or equal to 1024*768 i
    have to show scroll pane of size 410 and when resoution is higher
    than this i have to show scroll pane of size 540 . _x and _y
    of scroll pane is 0,0 all other things on flash is relative to this
    scroll pane so they take their _x and _y accordingly .(By the way i
    have only more movie clip on stage that is of height 160)
    I have used System.capabilities.screenResolutionX and
    System.capabilities.screenResolutionY to detect resolutions
    and have made scroll pane and movie clip to render
    accordingly .
    Now my problem is that there is no way i can change the size
    of stage dynamically as height and width of stage is read only
    (correct me if m wrng ) , so if i take my stage size ,according to
    hight resolution ie scroll size(540) + moviecilp size(160) , 700
    and when it is displayed on low resolutions it has white space of
    around 130 pixels and html content which is just below where my SWF
    ends looks far below where it is required .
    and if i do viceversa ie i make stage 410+160 than it
    truncates my SWF on high reolution .
    Is there any workaround for settings stage height and width
    dynamically or something to do with PUBLISH settings .
    Kindly help , my project deadlines are very near .
    Please help
    Thanks in advance

    Hi Everyone ,
    I am quite new to Flash ,
    I have made one flash swf in flash cs3 using action script 2
    My requirment is like this -
    if client's resolution is less than or equal to 1024*768 i
    have to show scroll pane of size 410 and when resoution is higher
    than this i have to show scroll pane of size 540 . _x and _y
    of scroll pane is 0,0 all other things on flash is relative to this
    scroll pane so they take their _x and _y accordingly .(By the way i
    have only more movie clip on stage that is of height 160)
    I have used System.capabilities.screenResolutionX and
    System.capabilities.screenResolutionY to detect resolutions
    and have made scroll pane and movie clip to render
    accordingly .
    Now my problem is that there is no way i can change the size
    of stage dynamically as height and width of stage is read only
    (correct me if m wrng ) , so if i take my stage size ,according to
    hight resolution ie scroll size(540) + moviecilp size(160) , 700
    and when it is displayed on low resolutions it has white space of
    around 130 pixels and html content which is just below where my SWF
    ends looks far below where it is required .
    and if i do viceversa ie i make stage 410+160 than it
    truncates my SWF on high reolution .
    Is there any workaround for settings stage height and width
    dynamically or something to do with PUBLISH settings .
    Kindly help , my project deadlines are very near .
    Please help
    Thanks in advance

  • How can I make the stage height shorter by "cropping out" the bottom portion of the stage?

    Right now my stage dimensions are 980 X 800 px.  I need to cut or "crop out" the bottom portion of the footer because its height is too long.  So I changed the stage dimensions to 980 X 600 px (and changed the corresponding dimensions in the embed tag in the index.html file to match).  Doing this seems to cut out the bottom but at the same time adds space to the top and seems to distort the overall spacing.  Is there a simple way to crop out the bottom of the stage (just like cropping out a section of a photo)?

    Forgetting about the html file and embed tag for now, I can't seem to get the .swf proportioned properly in the first place.  I just want the bottom portion of the stage cropped out.  How do I do that without distorting the spacing?  When I tried to reduce the stage height, it doesn't simply crop out the bottom - it reduces the stage's height but it also seems to add space to the top and "squeezes" lines together, distorting the vertical spacing.
    Is there a way to simply crop out the bottom, just like cropping an image?

  • [svn:fx-trunk] 12007: When the Internet Explorer browser window is obscured Stage. width and Stage.height never return the proper sizes until/ unless the IE window is unobscured long enough for the player to feel it needs to render initially .

    Revision: 12007
    Revision: 12007
    Author:   [email protected]
    Date:     2009-11-19 12:45:27 -0800 (Thu, 19 Nov 2009)
    Log Message:
    When the Internet Explorer browser window is obscured Stage.width and Stage.height never return the proper sizes until/unless the IE window is unobscured long enough for the player to feel it needs to render initially.  This was preventing our preloader from completing, since we were waiting for a non-0 Stage size.  Took a slightly different approach to solving the bug for which the original logic was added to work around.
    QE notes: None
    Doc notes: None
    Bugs: SDK-24191
    Reviewer: Alex, Evtim
    Tests run: Checkin
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/non-0
        http://bugs.adobe.com/jira/browse/SDK-24191
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as

    Revision: 12007
    Revision: 12007
    Author:   [email protected]
    Date:     2009-11-19 12:45:27 -0800 (Thu, 19 Nov 2009)
    Log Message:
    When the Internet Explorer browser window is obscured Stage.width and Stage.height never return the proper sizes until/unless the IE window is unobscured long enough for the player to feel it needs to render initially.  This was preventing our preloader from completing, since we were waiting for a non-0 Stage size.  Took a slightly different approach to solving the bug for which the original logic was added to work around.
    QE notes: None
    Doc notes: None
    Bugs: SDK-24191
    Reviewer: Alex, Evtim
    Tests run: Checkin
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/non-0
        http://bugs.adobe.com/jira/browse/SDK-24191
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/preloaders/Preloader.as

  • CS5 Device Central Stage.width/Stage.height update problem when change the device profile.

    When creating FL 3.0/3.1 app   and testing it at the CS5 Device Central if you change the profile of the active device(select different phone with different screen size) Stage.width/Stage.height could't change. Always stays the same as the first device's Stage.width and height. Even if you add addListener with Delegate nothing happends. Also it effects to Screen Oriantation. It looks like a problem or is this a bug?

    Having the same problem, though I can't get it to connect even once. I just started researching the problem tonight - no solution yet...
    I'm on Windows 7 Pro 64-bit, Production Premium CS 5.5.
    I've got no other internet issues, Adobe update works fine.
    Please - Anybody have an idea how to troubleshoot this problem?
    Thank you.

  • How can i increase the stage height beyond 10000 px?

    Im trying to build a long scrolling page and i need more than a 10000 px stage but edge only allows me a 10000px max height. How can i create a longer page and are their performance issues with a stage that size?

    Here is the link to what i have so far. I was able to solve some problems along the road. I am dynamically placing individual pics next to each other in respond to windows resize. Main Div wraps all the images and its width is equal the sum of all widths. Stage width is 1024. My current problems are:
    1 - Although I was able to activate the scroll bar, Swiping is not available on touch devices. I thought scroll bars automatically respond to user swipes
    2 - I cant get rid of the vertical scroll bar. I tried to set the css value of  overflowY: "hidden". It throws a syntax error when I type it as overflow-Y. I am interested to calculate the scroll height and correct my div-height though.
    3 - In Firefox I get 2 vertical scroll bars
    Field Recordings

  • Stage height and width in private const or variable

    Hello, everyone I've got problem with this code.
    I need stage size in const or variable because of some resize reasons.
    ok so, code below works but it's static and I need dynamicaly get stage size.
    private const LIST_HEIGHT          :uint = 800;
    private const LIST_WIDTH            :uint = 1200;
    with(_mask)
    graphics.beginFill(0);
    graphics.drawrect(0, 0, LIST_WIDTH, LIST_HEIGHT);
    graphics.endFill();
    and if I change constants to this:
    private const LIST_HEIGHT          :uint = stage.stageHeight;
    private const LIST_WIDTH           :uint = stage.stageWidth;
    it's not work
    also this not work
    private var _listH          :uint = stage.stageHeight;
    private var _listW         :uint = stage.stageWidth;
    and this:
    private var _listH          :String = stage.stageHeight;
    private var _listW         :String = stage.stageWidth;
    not work means that I get this error
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at com.filebrowser::FilesList()[/Users/Peter/Desktop/projectfl/projectfl beta 0.6/as3/com/filebrowser/FilesList.as:14]
              at flash.display::Sprite/constructChildren()
              at flash.display::Sprite()
              at flash.display::MovieClip()
              at com.filebrowser::FileBrowser()[/Users/Peter/Desktop/projectfl/projectfl beta 0.6/as3/com/filebrowser/FileBrowser.as:51]
    Thanks in advance for all replies, all help is very appreciated.

    ps. I should add this information.
    this is code for external swf.
    if it's alone it works but if I load it to main swf it's not working.
    and my only problem is this:
    this is working
    private const STAGE_HEIGHT:uint = 800;
    and this not
    private const STAGE_HEIGHT:uint = stage.stageHeight;

  • Dynamically changing the height and width of Stage

    Hi,
              I would like to know how can I change the height and width of stage dynamically. I tried it with the following code:
                             Stage.height = 250;
                             Stage.width = 250;
    during the run time. Initially the Stage is at a height and width of 370 and 450 respectively. Also when I tried to trace the height and width of Stage after resizing the stage width and height, its showing the old value of width and height. That means the width and height not chnaging. Anybody have any idea about this.

    Hi Ross,
                I could understand something about the problem after making a research on this topic. We can't change the width and height of stage from actionscript itself, right? I will explain the way I am planning to do. I don't know whether its right or not. Anyway you just go through it. First the player need to be resized, according to the specified height and width. Then in the object tag, there are two fields named height and width. We should change these value according to the specified height and width of video controller, dynamically. Am I right? But I am confused with two properties of Stage such as: align and scaleMode. The code was actually developed my trainer. There, the scaleMode is set to "noScale" and no align property is used. My doubt is how should I set align and scaleMode properties of Stage. Hope you understood what I meant.
    Regards,
          Sreelash.S.

  • Add TWO Edge Animations/Stages to ONE web page (without using oam)

    Hi All,
    This is a bit of a follow on question for those who are adding scalable height/width edge compositions to web pages using the awesome piece of code created by Sarah (http://sarahjustine.com/) and other forum contributors... (attached code below).
    My question is: How do I add a second Edge Animate composition to the same page using this method?  So it's using "Stage" already... i'm guessing it's a matter of changing it to "Stage_02" etc in the following code?  I've tried changing the relevant code but so far I have been unsuccessful in getting it to recognise a second stage.
    Any help would be appreciated, many thanks in advance for your time.
    Jeff
    Index.html
    <!--Adobe Edge Runtime-->
        <script type="text/javascript" charset="utf-8" src="clouds_edgePreload.js"></script>
        <style>
            .edgeLoad-EDGE-78729757 { visibility:hidden; }
        </style>
    <!--Adobe Edge Runtime End-->
    <div class="stagewrap">
            <div id="Stage" class="EDGE-78729757">
            </div><!-- Close Edge Animate Stage -->
    </div><!-- Close stagewrap -->
    Adobe Edge Stage Script
    var stageHeight = sym.$('Stage').height(); // Set a variable for the height of the stage
    sym.$("#Stage").css({ // Set the transform origin so we always scale to the top left corner of the stage
    "transform-origin":"0 0",
    "-ms-transform-origin":"0 0",
    "-webkit-transform-origin":"0 0",
    "-moz-transform-origin":"0 0",
    "-o-transform-origin":"0 0"
    function scaleStage() {
        var stage = sym.$('Stage'); // Set a reusable variable to reference the stage
        var parent = sym.$('Stage').parent(); // Set a reusable variable to reference the parent container of the stage
        var parentWidth = stage.parent().width(); // Get the parent of the stage width
        var stageWidth = stage.width(); // Get the stage width
        var desiredWidth = Math.round(parentWidth * 1); // Set the new width of the stage as it scales
        var rescale = (desiredWidth / stageWidth); // Set a variable to calculate the new width of the stage as it scales
    // Rescale the stage!
         stage.css('transform', 'scale(' + rescale + ')');
        stage.css(  '-o-transform', 'scale(' + rescale + ')');
         stage.css('-ms-transform', 'scale(' + rescale + ')');
        stage.css('-webkit-transform', 'scale(' + rescale + ')');
         stage.css('-moz-transform', 'scale(' + rescale + ')');
        stage.css('-o-transform', 'scale(' + rescale + ')');
        parent.height(stageHeight * rescale); // Reset the height of the parent container so the objects below it will reflow as the height adjusts
    // Make it happen when the browser resizes
    $(window).on('resize', function(){
         scaleStage();
    // Make it happen when the page first loads
    $(document).ready(function(){
        scaleStage();

    I also met this question, have you solved this question?  Jeff

  • Stage resizing

    Hi everyone. I'm trying to create a photo gallery where an
    image gets loaded from an xml file and I want the stage to resize
    to the size of the image because the images are all going to be
    different sizes. I've looked into the Stage class, but I couldn't
    find anything that I could use to accomplish what I'm trying to do.
    The Stage.onResize function only triggers after the Stage has been
    resized. The Stage.width and Stage.height properties are read-only,
    so I can't use those to adjust the size of the Stage. Is there
    anyway to change the size of the Stage dynamically?

    Unfortunately I believe the answer is 'no'.
    (People with more info please correct me if this is wrong).
    Since flash is embedded in an html page with a fixed width
    and height, it's not possible to modify those parameters at
    runtime.

  • Stage.width undefined

    I have an existing Flash 8/AS2 game that uses Stage.width and
    Stage.height quite a bit, problem is that when I package as an AIR
    app the Stage.width and Stage.height properties are undefined,
    although Stage itself still shows up as an Object with 8-10
    properties, all of which are undefined.
    Under Flash 8/AS2 how can you get Stage.width and
    Stage.height to work in AIR?
    Any help is appreciated!!

    Is this still a know issue? is there a fix?
    I have the same problem and as i can see the bug is open
    since april 2008.
    Regards

  • Change background color of Stage with AS

    We I have a preloader that plays behind my transparent movie
    clip and I want to change the stage to black
    when I go to Full Screen. From what I have found most people
    use a black box but that won't scale in FS.
    So does anybody have another solution for changing the
    background color with AS that would help a lot.
    W Bell.

    To resize an mc box-background to the size of the stage, you can use the following script:
    var lsnr = new Object();
    lsnr.onResize = function () {
         _root.boxMc._width = Stage.width;
         _root.boxMc._height = Stage.height;
    Stage.addListener(lsnr);
    This assumes your background-box is named boxMc and resides on the root timeline, and that the movie is in noscale mode.
    EDIT: Another option is to just make the mc-background huge, so it will always cover the entire screen.

  • Resizing and positioning a stage with a background image

    Hey guys,
    I'm trying to get some specific behaviour on a stage as I think it'll work out best for the application I am doing. The module I am working on right now consists of a stage with an imageview bound to the width and height and an image inside. I'm eventually looking to setup some animations and such which will overlay on the image but I want the window to be resizable in various ways.
    Right now, when the stage is created I manually set the width and height so the image fits perfectly in the stage. For resizing, I want the user to be able to drag either the height or width or diagonal sliders but have the original aspect ratio of the stage retained. I have the preserveRatio variable set to true in the ImageView which makes the image not become distorted, but the stage can be extended horizontally/vertically/diagonally to any ratio which I'd rather not have. In terms of fullscreening, I'd like to allow it and have the image centred.
    I've tried to see if the LayoutInfo class can help me out, but it doesn't seem to have any implementations which are too useful for what I am trying to do. So does anyone know how I can accomplish the above? I'm very new to JavaFX so if anyone can make any other suggestions in terms of the objects I am using and what's best practices for what I am trying to do, it would be much appreciated. I've looked into using PathAnimation and PathTransition for the animations I am using and while they'd do most of the job well, I need to be able to place objects, modify speeds, locations etc. so I'll probably just end up making some custom drawing methods.
    Thanks in advance,

    Similar request in [JavaFX rezising-scaling scene & elements|http://forums.sun.com/thread.jspa?threadID=5437642]...
    Mmm, I made various experiments. The difficulty is to watch both dimensions, because when one change, the other must be changed as well, but the watch is then triggered, making a cascade of changes... I solved it (partly) with a boolean disabling the secondary change.
    def image = Image
        url: "file:///D:/images/forest_0003_1024.jpg";
        preserveRatio: true
    def startSize = image.width / 3;
    var bResizingWidth: Boolean;
    var bResizingHeight: Boolean;
    var stw = bind scene.width on replace
    println("Width -> {stw}");
        ResizeStage(true);
    var sth = bind scene.height on replace
    println("Height -> {sth}");
        ResizeStage(false);
    var scene: Scene;
    var iv: ImageView;
    def stage = Stage
        title: "Proportional Stage"
        scene: scene = Scene
            content: iv = ImageView
                image: image
                preserveRatio: true
                fitWidth: startSize
    def frames: java.awt.Frame[] = java.awt.Frame.getFrames();
    //~ println(frames[0]);
    def insets = frames[0].getInsets();
    //~ println("T={insets.top} L={insets.left} B={insets.bottom} R={insets.right} ");
    def insetX = insets.left + insets.right;
    def insetY = insets.top + insets.bottom;
    function ResizeStage(bIsWidth: Boolean): Void
        if (stage.width == 0) return; // Init, nothing to do
        if (bResizingHeight and bIsWidth) // One dim is changed, don't react on setting of other dim
            bResizingHeight = false;
            return; // Just ignore secondary change
        if (bResizingWidth and not bIsWidth) // Idem
            bResizingWidth = false;
            return; // Just ignore secondary change
        if (bIsWidth)
            bResizingWidth = true;
        else
            bResizingHeight = true;
        println("Stage: {stage.width} x {stage.height}");
        def ratio = image.width / image.height;
        if (bIsWidth)
            stage.height = scene.width / ratio + insetY;
            println("H {scene.width} -> {stage.height}");
        else
            stage.width = scene.height * ratio + insetX;
            println("W {scene.height} -> {stage.width}");
        iv.fitWidth = scene.width;
    }There are still some glitches, but it roughly works...
    [EDIT] Changed to avoid resizing the dimension that the user is changing. Result is more logical but slightly worse... (?)
    Edited by: PhiLho on 29 mai 2010 13:24

  • How to resize window when stage style is undecorated ?

    Hi,
    I have one undecorated window and I want to make it resizable by using mouse.
    How can I do it ?
    If I use decorated window then it allows me to resize it.
    Thanks.

    Just make a draggable shape and resize the stage depending on the drag action.
    Here is a simple stage illustrating that and moving the window too.
    Note an old bug already seen in 1.1 at least: when dragging such window, on WinXP, sometime it seems to "jump" to one bound of the screen, then it goes back (in a flicker) to current position. Strange and annoying.
    def resizeHandle: Path = Path
        var origX = bind scene.width
        var origY = bind scene.height
        var startW: Number; var startH: Number;
        elements:
            MoveTo { x: bind origX, y: bind origY }
            LineTo { x: bind origX - 50, y: bind origY - 30 }
            LineTo { x: bind origX - 30, y: bind origY - 50 }
        fill: Color.CORAL
        stroke: null
        blocksMouse: true
        // Resize with the arrow
        onMousePressed: function (evt: MouseEvent): Void
            startW = stage.width;
            startH = stage.height;
        onMouseDragged: function (evt: MouseEvent): Void
            stage.width = startW + evt.dragX;
            stage.height = startH + evt.dragY;
    var keyHandler: Rectangle;
    def titleBar: Stack = Stack
        var title: Text;
        content:
            keyHandler = Rectangle
                width: bind title.layoutBounds.width * 1.2
                height: bind title.layoutBounds.height * 1.3
                fill: Color.web('#33FF55')
                blocksMouse: true
                // We can drag the stage by dragging the title bar
                onMouseDragged: function (evt: MouseEvent): Void
                    stage.x += evt.dragX;
                    stage.y += evt.dragY;
                onKeyReleased: function (evt: KeyEvent): Void
                    if (evt.code == KeyCode.VK_ESCAPE)
                        FX.exit();
                    println(evt);
            title = Text
                content: "Resizable and Draggable Window"
                font: Font { name: "Arial Bold", size: 24 }
                fill: Color.web('#331122')
    var scene: Scene;
    def stage: Stage = Stage
        title: "Undecorated Stage"
        style: StageStyle.UNDECORATED
        scene: scene = Scene
            width: 500
            height: 500
            fill: Color.GOLD
            content:
                Ellipse
                    centerX: bind scene.width / 2
                    centerY: bind scene.height / 2
                    radiusX: bind 0.45 * scene.width
                    radiusY: bind 0.45 * scene.height
                    fill: Color.AQUA
                Circle
                    centerX: bind scene.width - 55
                    centerY: bind scene.height - 55
                    radius: 50
                    fill: Color.PURPLE
                titleBar,
                resizeHandle
    keyHandler.requestFocus();

Maybe you are looking for