Flex :: Resize Datagrid On Browser Resize?
Sep 28, 2010I have a datagrid that occupies 100% of browser screen. I want the grid to automatically resize when the browser is resized to small or full screen.
View 1 RepliesI have a datagrid that occupies 100% of browser screen. I want the grid to automatically resize when the browser is resized to small or full screen.
View 1 RepliesI'm having a bit of a problem here. As per the title, my flash swf file works fine when tested from the IDE, but when I publish it and open it through the browser, the stage doesn't seem to resize along with the window.I post below a bare-bones example. The "back" movie clip should resize, only it remains at the starting dimensions
Code:
import flash.events.Event;
import flash.display.MovieClip;
[code].....
I'm trying to write my flex application so that it restores the user's settings when it starts up. The application has 3 data grids (only one is visible [on screen] at any time) and I simply save the state of the grids if the user ever does any resize events.Saving the state works perfectly, the problem comes when restoring. It seems that only the visible data grid gets restored properly. On all the other grids, the widths are all wrong and do not match the settings I restored from.
The problem is that, when the application starts, the data grids are not sized correctly. Each data grid takes up the full screen, but initially they are only given a very small size (ie. 200 width).Is there some way to force the data grid to resize properly when it is created? Or is it possible to know when the data grid is "maximized" I don't want to hook up to the resize event - if possible - because I would get that quite frequently, and I only want to restore the settings once.Here's the code I'm using to restore the column widths:
var grid:DataGrid = ...;
for each column ...
... parse width into width (ie. width is now "320")[code]....
The settings are saved into a database (the flex proejct is connected to JBoss). I simply save a CSV type thing with the column's name and it's width. I know this works because the one data grid that is visible when the application starts gets sized correctly.Yes, the grids use relative sizes (ie. 100%) -- I can't really change that because I want the grid to take up all available space in its container -- and I want the user to be able to resize their browser and still have it look right.Each grid is contained in its own Hbox The data grids are created when the application starts -- you can only see one of them though.They are in a tab navigator type thing, but it's creation policy is set to "all" so they can be populated with data (the population takes some time, and typically the user sits on the front grid for a little while.)
I can't put my resize stuff in the creationComplete handler because I end up with the same problem. The grid's size is like 50 right after it's created (it should be like 1000, 100% of the page width) -- and then I go to set the sizes of the columns (which are obviously > 50) and the resize does nothing
I have an item renderer tied to an mx:DataGrid column. The renderer used to be inline with the column, but I've moved it out to its own file so I can reuse it across multiple tables.
The problem is that now the renderer doesn't resize (grow/shrink) when the column is resized. So if the user makes the column very small, the contents displayed by the renderer just eat up space and show up over top other columns
Code for Item Renderer:
<?xml version="1.0" encoding="utf-8"?>
<s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[Code].....
I have Buttons which I have rotated vertically within a Canvas, that is working fine. The problem occurs, when the user resizes the window to a small size a vertical scroll bar appears, I would rather have each button squashed upto a smaller size.
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="40" maxWidth="40" xmlns:myComponents="myComponents.*"
horizontalScrollPolicy="off"
[code].....
I'm having a little issue with the resize event and resize effect of a VBox.
I have something like this:
<mx:VBox id="container"
backgroundColor="0xFFFFFF"
backgroundAlpha=".9"
paddingTop="15"
paddingLeft="15"
[Code]...
Is there a way to get the columns to resize to the width of the new Datagrid instead of overflowing and showing the scrollbar? I've tried on the skin, setting all relevant properties and ran out of options. I just want it to behave like the previous Datagrid where the columns would resize to the width of the datagrid.
View 1 Repliesi am creating flex 3 component when i re size the window i need to re size the labels and text.how to do this?
View 1 RepliesI would like to open a new windows when a user clicks on a button so I would like to resize the browser (for example let's say I get the screen size (width) is 1000, I want to resize it to 700px and then launch a window next to the browser that is 300px in width and 100% in height. How do I resize the browser window using flex (and how do I get the current size of the browser).
View 1 RepliesI am working on image and i like to scale or resize the image by dragging and resize option.same working as "free transform tool" in flash (design part); i need same functionality in application.
View 7 RepliesI have a main movie here that loads in an external swf through a container mc. everything is aligned and positioned to where it should be, and they are also set to that value onresize. the problem is, when my swf is loaded in, it works fine and is in the right position, same when you resize it. BUT, if you resize the window before the swf is loaded, it misaligns, until you resize!!
View 2 Replieshow to create this:[URL].. the site will resize itself no matter how you resize your browser.
View 2 RepliesI am trying to achieve the resizing effect as seen on [URL]There is no distortion no matter what direction the browser window is resized.
View 1 RepliesI got my external swf to center...However, when I resize my browser the external swf dissapears off the screen (I can still hear it's music though) Anybody have any suggestions? Heres my class code:
[Code]...
I am creating a site and I want a small swf slideshow background to be loaded into the main site SWF and be able to be resized to fill the browser. But as I bring in other swf files they are able to retain their size, not be resized in the browser. And I want the main site to stay in the center of the browser.
View 5 RepliesI'm trying to run my swf by going directly to it on my serer eg(www.example.com/mySWF.swf), later I will embed it using HTML or PHP, however Im wondering why it keeps getting resized to the window size, I want it to stay the size of the swf. In the publish settings I set dimension to Match Movie, and I set scale to No Scale in the HTML tab of publish settings, am I doing something wrong or can you not have it stay its original size without emedding it into html?
View 5 RepliesI'm pretty new to Flash but working it out. Just one question: how does one make it so the Flash animation automatically resizes depending on the resolution of the user's screen? I made a site with a Flash video that looks perfect on my screen, but when my friend with a different resolution goes to it, evertyhing is out of whack..
View 3 RepliesI have been scouring the net for some answers on how to get a swf to automatically resize to fit all browser windows (resolutions)...
I found one javascript [url]... that is meant to do this, but I havent had any luck in getting it to work.
I am working on a flash website which needs to be fluid layout. The background image is resizingperfectly fine when the browser is re-sized.I have also managed to make the logo centre on re-size. My problem is with the two other movie clips which both have other mc inside.My content is residing inside a movie clip called "content_mc" inside the content_mc I have other movie clips with AS. I have tried using the same line of AS I used to centre the logo on "x" but the content disappears of the screen on run time!I thought maybe I am doing something wrong in the math. Note my content_mc it is positioned at x= -1620 and y= 270 W= 900 H= 7412. Here is the AS I use to resize the bg img and to centre the logo_mc
Code: Select all// background image resize..//
function init()
{
[code]....
how a browser automatically resize itself, once visitors type in the link ? and no rescale allowed.i know the way to open a fixed size pop up window, but i haven't seen any tutorial about auto-resize browser ?
View 2 Replieshow can i position an externally loaded MC on browser size were if the browser is resized the mc follows and stays in view instead of been shifted out of view
i can get it to work if my MC is on stage but it dont work if the MC was loaded externally it loads but does not position/follow the browser edge and goes out of view below is the AS2 code
Stage.scaleMode = "noScale";Stage.align = "TL"; var stageListener:Object = new Object ();stageListener.onResize = positionContent;Stage.addListener (stageListener);positionContent
I'm also completely new to flash and Actionscript 3 programming. I got Flash CS4 two days ago and i've already started work on a website by following various on line tutorials and I'm beginning to pick it up.One thing that I haven't been able to work out is how to make my site centre in the browser. My website consists of a 1000px by 700px stage. However it is simply white space for the right and left 150px in leaving the actual content in a rectangle in the middle, 400x700. Now when I test my movie in CS4 it renders perfectly in the centre of the screen with no issue. However when uploaded to my domain, it is always not central
View 1 RepliesI've seen this in a few sites and I would like to know how they do it. [URL]
View 5 Replieshow to constrain the proportions of a flash site so that when a browser window is resized the swf resizes to fit?Is it actionscript needed in the fla or some html in my dreamweaver file? [URL]
View 1 RepliesI want it to take the whole screen but i dont want to scale it.The elements on the application will change the position according to the stage size,but i dont know how to change the stage size according to the browser size.
View 1 RepliesI'm wondering how to set my stage to resize relative to the size of the user's browser and keep the main movieclip centered. But I don't want the stage to scale, I want the physical boundaries to get larger without scaling the content.
The reason for this: I have something that we'll call "snow" falling in the background. When the browser resizes, I don't want the stage to scale and the snow flakes get bigger or smaller, but have the stage show more area for the snow flakes to fall. I already have the snow flakes falling outside the current stage boundaries, I'm just wondering how to make the stage boundaries extend dynamically to the size of the browsers.
I am loading external swf's inside content_2 and when i resize my browser the external content OR content_2 disappears. what I need to do to stop this. I've tried adding an onresize function but that does not work. Here my as3 code:
scroll_sb2.scrolling("content_2", "area_2", 0.18); // Range from 0.00 to 1.00
stage.addEventListener(Event.RESIZE, resizeHandler);
function resizeHandler(e:Event):void
{
[Code].....
I'm having a lot of trouble with a website a friend asked me to make her.For the longest time, I couldn't figure out how to make the site resize according to the browser. (Any help with how to have the background/stage expand while keeping the movieclip containing the content centered and the same size would be a great bonus.)Now, with the code I found after weeks of searching, I'm recieving error 1046. What is this, and how do I fix it? Or, how do I implement the changes to resize background/keep movieclip constant?
[Code]...
I am building a xml driven website in flash an my client want the website should fit the browser of the costumer and when they scale browser the website must adjust accordingly but he also ask me to the website must not be smaller than 850 height and 1000 width, and must not be bigger than 1100 hight and 1440 width. Please help me because i never done such project coz i am fairly new to actionscript and flash design, i am graphics design trun flash developer.
View 1 RepliesI am wondering how would I scale an image on browser resize with minimum and maximum width and height parameters?
I know how to use the Event.RESIZE function to make my image proportional with the browser using stage.stageWidth/Height, but I am trying to figure out a way to have a movieclip or image scale up or down to a certain dimension such as on browser resize the image max would be 640x480 and the minimum being 320x240.