Ultrashock Forums > Flash > Flex
Flex - resizing in flex

You are currently viewing our website as a guest which gives you limited access to forums, files and other resources.

Click here to join now for free, and start interacting with our members, download files and much more!

Click here if you are looking for our Flash files and other professional assets.
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
Flex - resizing in flex
Old 2008-10-08

I have the following code in an actionscript project in flex builder plug in on eclipse:
Code:
package {
    import flash.display.Sprite;
    import flash.events.Event;

    public class testing extends Sprite
    {
        public function testing()
        {
            stage.scaleMode = "noScale"
            stage.align = "TL"
            stage.addEventListener(Event.RESIZE, onResize);
        }
        public function onResize(event:Event):void{
            trace("Width: "+stage.stageWidth);
            trace("Height: "+stage.stageHeight);
        }
    }
}
The problem is that the stageWidth and stageHeight resize at every size except when I move the browser window smaller than 465 px. The html has the size set at 100%. Nothing else is in this project, where is the width getting set that is keeping it at a minimum stageWidth of 465? Anyone? TIA
Todd Coulson
Comcast Interactive Media
postbit arrow 3 comments | 1193 views postbit arrow Reply: with Quote   
Registered User
tcoulson is offline
seperator
Posts: 1,115
2001-11-15
Age: 36
seperator

Ultrashock Member Comments:
Isocase Isocase is offline Isocase lives in United States 2008-10-08 #2 Old  
What are you using to embed the SWF into your HTML and do you have the width and height of that set at 100%?

Also your using AS3 so it should be

Code:
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
Reply With Quote  
tcoulson tcoulson is offline 2008-10-09 #3 Old  
yeah, I am just using the defaults that Flex Builder spits out. And it comes out with 100% set for w and h. Switching to the static calls is the same as the string itself.
Reply With Quote  
Isocase Isocase is offline Isocase lives in United States 2008-10-09 #4 Old  
Not sure if this will work but try adding this after your imports. You can set the width and height to whatever you want to test with.

Code:
[SWF( width="900", height="600" )]
Reply With Quote  
Thread Tools
Display Modes Rate This Thread
Rate This Thread: