Flex :: Layout: Can Width Be 100% Of The *visible* Area Of A Larger Container?
Nov 30, 2010
I've got the following situation, where I have an outer Vbox that is set at a fixed width, and then inside it there is a header made from an HBox and a content area (Canvas) that is much wider than the enclosing VBox (and therefore requires scrollbars on the outer VBox to see it all).
I would like to set the width of the header to fill the entire width of the outer container, but only the visible part, and to remain fixed so that when I scroll to view the content, the header doesn't move.
[Code]...
View 3 Replies
Similar Posts:
Aug 3, 2011
What I'm trying to do: build a super simple button skin (say a small circle when in up state, slightly larger circle when in over / down states) that has a larger mouse hit area than visible area. In other words, I'd like the button to look like a 5x5 circle when in up state, but transition to over state when the mouse is in a 15x15 pixel area around such circle - in order to make clicking on the button easier.
What I've done in the past is to use a transparent ellipse behind the the visible ellipse. This works nicely but seems like a waste of memory (not much, although if you start having a lot of these buttons it adds up) and rendering cycles (transparency). I thought I could avoid this by wrapping the ellipse in a group with a given size and listen to its mouse events, but somehow no mouse events seem to fire on such a group - not sure why.
I guess I'd love to know if anyone knows an efficient way to do this. Also would love to know why such a group won't fire mouse events, but I guess that's secondary. Simple code snippet below:
[Code]...
View 1 Replies
Jun 8, 2011
Is there a nice and not much processor consuming way to move all TitleWindow instances within the application visible area when the application been scaled - change it's width or height ?
View 1 Replies
Jun 23, 2008
In many cases the pieces have artifacts outside of their visible area. For example, a piece can have a picture of a dog's face, but one of the long ears is off to the side, outside the visible region of the piece. The path data is extremely detailed, so our designers didn't crop it off. They used a mask (at least I think it's a mask, I'm not a graphics guy and know little about that stuff) and this makes it invisible in Flash, when we turn them into movie clips. Also, in Flash when I look at the width and height of the piece, it does reflect only the visible area.However, in ActionScript when I try to get the width and height using, for example
Code:
pieceObject.width
I get the width of the piece including the part that is hidden, i.e. a larger width than the visible area.Is there a way in AS 3.0 to get the height / width of the bounding box of visible area only?
View 6 Replies
Jul 2, 2011
In a Flex Mobile project I have a simple itemRenderer where I'm trying to create an "bubble" texting effect, similar to ichat or iphone (just so you get what im going for). But if the text is longer than the screen it runs off, rather than just going down a line.
If I set Group thats holding the rectangle(to create the bubble effect) and the label to 100% it works and keeps it from exceeding the list containers bounds, BUT the group is always at 100% and looks bad, I'm trying to keep the "bubble" JUST AROUND the text.
Anyway so, at the top of my itemRenderer I tried specifying:
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%">
And here's my layout I figured since msg_container has a width of 100% I was hoping bubble_lable_group would just not exceed that but...it doesnt...it just runs off. I tried setting a max width but that does not allow you to input percents. And just to say it 1 more time. I know if i set bubble_lable_group width to 100% it works, and keeps it from going off the edge, but then the rectangle "bubble" stretches all the way across and just looks bad.
<s:VGroup id="main_container" horizontalAlign="left" paddingBottom="10" paddingTop="10"
verticalAlign="top" width="100%">
[Code]....
View 1 Replies
Mar 29, 2010
I am creating a component that displays a variable amount of "gauges" (square tiles of content if you will), that is laid out like so:
<HDividedBox id="container">
<VBox id="myComponent">
<HBox id="header">
[code]...
View 1 Replies
Sep 12, 2009
is it possible to make the child elements of a vbox to occupy 100% of the width without indicating width=100% for each element ?
View 3 Replies
Apr 12, 2010
I have:
an ArrayCollection of Numbers;
a List using the above ArrayCollection as it's dataprovider, and virtualLayout=true;
a custom ItemRenderer that shows a label with:
a) the number
b) an y position depending on the number AND the highest number visible
In another words, if I have 10 numbers in the AC, and only 5 appear on the screen, the y position of those 5 will depend on the value of the maximum number for those 5. When the user scrolls, of course those 5 elements change so the position of the label in item renderers will change.
1) How can I get the list of items that are "currently" visible?
2) Which event/method to override will help me know that the List was scrolled/the visible items changed?
View 3 Replies
Jul 9, 2009
how to make the preloader works on the full screen website/ fluid layout. I add the Stage.resize on the code for FYI When I added this code to the bar, it expanded to full screen, but there's no loading bar. The text is also no progress.
View 1 Replies
Apr 21, 2011
I have a list with tile layout,I have given the item renderer's width as 100%, but the item dosen't resize to fit the content . The same scenario works well for horizontal and vertical layout.
My code looks like this
<s:List width="{this.width}" dataProvider="{allActionsArrList}">
<s:layout>
<s:TileLayout />
[Code]....
View 1 Replies
Mar 30, 2011
I have a VBox inside a Canvas. The 'red bars' are custom components based on 'Canvas'. All red bars are of equal height. I have 20 red bars inside the VBox. The scrollbars visible in the screenshot are the Canvas's scrollbars. The scrollbars of the VBox are disabled using verticalScrollPolicy = off.
Without scrolling, only 16 red bars (and a part of the 17th bar) are visible. However, when I scroll down the Canvas I expect to see the remaining red bars - but the bars that are not visible when the application starts don't get 'drawn'. What am I doing wrong? I want the user to be able to see the 17th - 20th bars when the Canvas is scrolled down.
View 1 Replies
Oct 19, 2010
I am trying to determine the global coordinates of the visible rectangle that is currently rendered on the stage.
Specifically, if a canvas has an explicit height and width and is a child of a panel that has a scrollbar, the scrollbar can "hide" a part of the canvas. ContentToGlobal(x,y) provides the global position of the content at the time, but content coordinates can scroll off the boundaries of the parent panel and continue to give x,y coordinates that are not visible.
Is there a way to determine the viewable rectangle that is not hidden by anything?
View 2 Replies
Sep 29, 2011
I have a movie clip named circle_mc(see the image on the link below) and a mask object(movie clip) which determines visible area of the circle. User can change the portion which is visible (extend the red area and make it red+blue, gray area is invisible). I need to find proportion of visible area to invisible area (red+blue/gray) so that I can calculate angle.
View 1 Replies
Jul 21, 2010
How do I get the size of the content area of Container objects? One non generic solution is checking for styles I suppose but I am looking for some code that works generic for all standard flex Container objects. The controls are Flex 3
View 1 Replies
Dec 14, 2011
I am loading an external swf using the SWFLoader component. The swf that is being loaded is masked so that only a portion is being shown. However, when it's loaded the actual size of the swf (loader.content.width/loader.content.height) is the complete swf including the masked area. Therefore, the loaded swf does not display properly in the itemrenderer Is there a way to to grab the size of the just the masked area as opposed to getting the size of the entire swf's contents? also i need to re size the masked area
View 1 Replies
Jul 22, 2011
Using Flex 4 AIR, what is the maximum widtha and height I can set for line and the bordercontainer?
bc:borderContainer = new borderContainer();
bc.width = 80000;
bc.height = 80000;
View 1 Replies
Apr 19, 2010
It's probably a no brainer, but I've spent the last 40 minutes or so looking for it to no avial.
I have a Canvas control with a fixed width and a horizontal scrollbar.I'm trying to find the actual width of the control.The .width (fixed width) + the part being revealed by the scrollbar.I tried explicitWidth, width + maxHorizontalScrollPosition, and some other combos but non of them hit the spot.
View 1 Replies
Mar 11, 2011
How can I limit the size of a child container with percentage width/height of 100%?
Example:
<mx:HBox id="container" width="100%" height="100%">
<mx:HBox id="scrollContainer" width="100%" height="100%">
<!-- keep this content limited to the size of "container" -->
[Code]....
Apparently I can get the desired behavior if I change HBox to Canvas but I would still like to know how to accomplish this with a HBox and why it differs from Canvas.
View 3 Replies
Dec 16, 2009
I am trying to create a custom resize event as part of a larger project to create a flexible liquid layout class.Basically, i want an object to listen for the stage.RESIZE event. If i can listen for this event from multiple objects, it solves my event firing problem.[code]
View 7 Replies
Feb 5, 2012
I am trying to use flowlayout from : [URL] when i implement this layout the height of container/group is not increasing automatically depending upon the elements added. I have given no height to the container/group so that it can take as much height as required but this layout is not giving any height to it.
View 1 Replies
Jan 11, 2010
I want to save remotely (on a database) the state (visible columns, columns width and order) of a Flex3 DataGrid.For width and visibility I can simply save them by accessing each column attribute.. But for the order? Do I have to create the dataGrid dynamically?
View 2 Replies
Mar 13, 2009
I'm trying to create a site where all of its sections are laid out side by side and the user can zoom into each section to check it out, just like this site: [URL]I have the actionscript that allows the user move the viewing area around, but im not sure how to incorporate the zooming into it. What I need might be something different entirely. Here's that:
on (release) {
_root.motionx = -950;
_root.motiony = -700.0;
_root.motionScale = 100;
}
View 2 Replies
Dec 9, 2011
I have a simple swf in an invisible <div>; when user mouseover's the <div> becomes visible.The swf has a ExternalInterface.addCallback( "..." , ... ) to create connection to js that needs to be called at load, such that by the time user mouseovers the flash-js connection is working.PROBLEM: on windows safari the flash does not go through its loading sequence until the user finally mouseovers
View 1 Replies
Jun 17, 2010
I'm trying to avoid the scroll bar appearance on an UIComponent. Is there any way to obtain the computed width/height that my container component should have to have all children visible? I don't want to compute it myself. I would like to know if there is any variable computed by the component when it decides if it should draw the scroll bar or not.
View 0 Replies
Jul 19, 2009
I have a AS2 movie clip that has a drag navigation. The movie clip is bigger then the visible area. How can I find the center xy of the current visible area when I stop the drag?
View 2 Replies
Oct 27, 2010
I'm working on a game where if the person puts there mouse over a card, it should pop out over the other cards, and when moved off, the card should go back to where it was, i can get the card to pop out no problem, and go back to it's location, the thing is, i don't want the card to go back when i move off the entire image, only when the mouse moves off of what was originally visible, and i'm not certain how to obtain a pre-visible area that i can use to test if the object should still be over all the other cards.
View 5 Replies
Nov 15, 2009
I'm making a first-person adventure game where I have the different frames in the root movie be the various locations that the user can interact with. I want to have fading transitions between the scenes and I was wondering if this was possible in flash. What I've tried for now is to create an array with all the current children then when the frame is changed I add those objects on top of the new frame and use a (alpha) Tween object to fade them out. This doesn't seem like a good idea and feels very hackish, so I had a few questions:
1. Is there an event that is called when a frame is changed (Event.FRAME_CHANGE doesn't exist ) since the way I'm doing it now is to have a local variable which I compare with this.currentFrame.
2. This may sound weird, but is there a way to create a screenshot of the current visible area and use that as one would any other visible object? This would allow me to Tween that one out instead of the array of children that I'm using now. I know it's possible in OpenGL, to render the current view scope to a texture array, but does Flash have this capacity?
PS: This is all done inside a separate class, in case that matters (I am very noobish).
View 5 Replies
Oct 25, 2010
I would like to know how to have the cursor visible in non editable Text Area.
View 7 Replies
Oct 15, 2010
I'm trying to know if there's a way in ActionScript 3 to load a PNG image and make some sort of button or sensible area applicable only for the visible area of that PNG??Maybe there's a simple way to define a polygonal area on execution time, I mean, dynamically and make it sensible to mouse events??
View 4 Replies
Jun 29, 2011
In a flex project that I have that is designed to scale 100% to the web window, I have a spark list. And I have a simple itemrenderer that takes the data and displays a name, and a message. Just think of it like a simple instant messenger display. The problem is that for my msg_txt label I want to give it a width thats the width of the parent list thats holding it.I tried turning the horizontalScrollPolicy to off, also tried width="this.parent.parent.width}" (as well as this.parent.width) for the spark label inside the item renderer. and in the label i tried some things like left="0" right="0" maxWidth="{this.width}" but nothing really does the trick.How can I make this label have a max width of the list thats holding it, AND make sure it resizes if the size of the browser changes and the list size changes?heres the list:
<s:List id="chat_content" width="100%" height="100%"
alternatingItemColors="[#EEEEEE,#E6E6E6]" contentBackgroundColor="#EEEEEE"
horizontalScrollPolicy="off" itemRenderer="renderers.ActiveChatItemRenderer">
[code].....
View 2 Replies