Flex :: Limit The Size Of A Child Container With Percentage Width/height Of 100%?
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
Similar Posts:
Sep 30, 2011
I have a ViewStack which is dataProvider for a TabBar. There are two VBoxs as children for this ViewStack. It works fine with absolute values for width and height for these VBoxs, but when specified in percentages, the VBox uses all the available space (100%) for any percentage value. find the code and screen shots below.
how can children of a ViewStack be aligned to center? There is no horizontalAlign property for ViewStack and it is not working with horizontalCenter= "0".
Code:
<mx:ViewStack id="viewStack" width="100%" height="100%" selectedIndex="0" horizontalCenter="0" textAlign="center">
<mx:VBox label="Tab 1" width="25%" height="10%" borderThickness="2" borderColor="red"
[Code]....
View 2 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
Jun 13, 2011
I have the follow declaration :[code]How can i determine "img6" width and height ?
View 1 Replies
Apr 5, 2011
I have an ActionScript project set up using the Flash Builder IDE. Using the Flex 4 compiler to compile it. At the top of my application class, I have:
[SWF(width="100%", height="100%")]
public class MediaPlayer extends MovieClip {
This is not acceptable to the compiler to do a release (it throws errors saying it can't parse the width/height values). Pretty annoying. I've tried to do things the "right" way, but none of the following work:
[Code]...
So the width and height attributes are being explicitly set to numbers here. I don't know much about the 'scale' attribute; maybe it is coming in to play here? And, to be clear: it will work as expected if I set the [SWF] meta tag to have width "100%" and height "100%"... so it seems like it actually is preferring the compiled arguments over the browser environment. Perhaps there are other settings I am missing?
View 2 Replies
Sep 15, 2011
I would like to know how to make flash size (width and height) full size in the browser? the real size of flash is w:955px h:600px I tried to make w:100% and h:100%, it makes pictures pixelate.
View 6 Replies
Aug 26, 2005
I have a root folder that calls a container loading movie-a. The problem is that this movie-a has a red symbol that scrolls from the outside to the inside of the movie. If I loaded the movie-a by itself it wouldn't show the symbol outside but as this is inside a root... well... it shows (see image). Is there a way to set container width-height? I know I can mask it but I don't want to to that because I have other symbols flying around the movie.
View 11 Replies
Jul 30, 2004
how i would create a mc container with positioning and width and heigth?
var mc = _root.createEmptyMovieClip("photocontainer", 1);
mc._x = 3;
mc._y = 30.5;
mc.width = 440;
mc.height = 345;
View 1 Replies
Feb 27, 2011
I know this might seem like such an easy issue and I can't understand why I cant figure it out but none the less I can't and I've just about given up. Here's the issue:
I have a sprite container which is supposed to hold a bunch of thumbnails to videos. I am able to populate the container with all the videos and the whole works but obviously if I add a bunch of videos its going to exceed the size of the flash document so I need to add a UIScrollBar (which I did) now the scrollbars target is set to the container but isnt allowing me to scroll and if im correct this is because the container doesnt have a set height. So Im trying to set the height of this container but the second I try setting the height or even width all my thumbnails I used to be able to see are gone! It's as if the size is being set to 0 when its not I've even tried to set it to a specified size just to test and nothing.
[Code]...
View 1 Replies
Jul 30, 2004
is this how i would create a mc container with positioning and width and height?
var mc = _root.createEmptyMovieClip("photocontainer", 1);
mc._x = 3;
mc._y = 30.5;
mc.width = 440;
mc.height = 345;
View 1 Replies
Feb 15, 2009
I have a container object that i add children to. I want to change the height & width of the container without the children scaling. In this case I draw a rectangle in flash which I'll use as the container object then export for AS.
[Code]...
View 5 Replies
Aug 20, 2010
My artist drew a beautiful island but it's 5000 in width. We scroll it as it's for a Virtual World. - it's in layers and we scroll the different layers at different speeds. Flash documentation states that the limit is 2880 BUT it does work in the player i.e.: you can see the full island but it does run a little slow.
Should I
a. Create a smaller island of 2880 which is a shame as I would have to get rid of a lot of good stuff
b. Split it into two images and dynamically connect them with code.
Also, I have different layers scrolling at different speeds which would make things more difficult to look natural.
View 13 Replies
Jul 29, 2011
I got a Parent Sprite, let's name it SpriteP, which holds inside it two other Sprites. Sprite1 and Sprite2.[code]Sprite2 is a rectangle. When I rotate it, of course, the height of its parent, SpriteP, GROWS. But I would expect that height to go back to what it should be when I'm removing Sprite2!And it does! If I remove Sprite2 while NOT being rotated, the height of the parent drops back to normal, 200.
View 10 Replies
Jul 29, 2011
I got a Parent Sprite, let's name it SpriteP, which holds inside it two other Sprites. Sprite1 and Sprite2.
When Sprite2 is NOT rotated:
Code:
trace(SpriteP.width + ' ' + SpriteP.height); //100 250.
SpriteP.removeChild(Sprite2)
trace(SpriteP.width + ' ' + SpriteP.height); //100 200. -> works, 200 is good.
When Sprite2 is rotated at 90:
[Code].....
And it does! If I remove Sprite2 while NOT being rotated, the height of the parent drops back to normal, 200. But if I rotate Sprite2, the Parent won't update its bounds.
View 1 Replies
May 26, 2011
I've got a container(sprite) with children(sprites) added to it. When I scale the container, I would like to get the new width of a child, but when I trace the children's width I always get the original dimensions, even though everything gets visually scaled as it should. How do I overwrite the children-width ?
Update: I just found out that the children.graphics-"dimensions" could have caused the problem. When I leave the graphics, everything seems ok. Is it possible to scale the graphics at same time as the child-sprite?
View 3 Replies
Jul 27, 2011
Here i want to set my SWF heigh and width in 100%.
If i want to increase my height by draging on my SWF corner then automatically the width should change.
So both should be in 100% at any case. how to achieve this.
View 4 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
Jul 16, 2009
I have a video object and would like to size it to the width of my document. In order not to distord it, I would like to size the height in relationship. I can't seem to wrap my head around the math for that. How is that done?
View 3 Replies
Sep 10, 2005
is it possible to define a width and then autosize the height?
View 3 Replies
Jan 9, 2007
i been trying to get the width and height on this set to one standard size
PHP Code:[code....
i got this from flashkit and been edeting it,
View 1 Replies
Apr 25, 2008
I have a movieclip (containter_mc) , which i then load a .jpg image into with actionscript. but when i try to set the height and width (setProperty(containter_mc,_width,200) it changes the image size, but does not make it to the specified size...
View 3 Replies
Mar 23, 2009
I have a basic framework for my code, but I am not sure how to just get the icons I have to grow and shrink. Right now I can only get it to snap to +10 width and height.
var grow:Number = 10;
var shrink:Number = 10;
resiSplash_mc.addEventListener(MouseEvent.CLICK, resiClick)
resiSplash_mc.addEventListener(MouseEvent.ROLL_OVE R, resiGrow)
resiSplash_mc.addEventListener(MouseEvent.ROLL_OUT , resiShrink)
function resiClick(event:MouseEvent):void {
[Code] .....
View 1 Replies
Jan 15, 2011
when i create stage and make its width and height in pixels Web Browsers show it with pixels too. so i want to make a stage which width and height would be 100% in web browsers. i just want to place buttons and some stuffs on the top and right of the web browser.
View 2 Replies
Apr 13, 2010
I've implemented a video player to integrate into my Drupal website.
I would like to assign different width and height size to my swf according to the videos sizes.
How can I do it ? Should i pass back values from Flash app with an External Call ?
Can I retrieve the height and width of the video before to pass it to flash app, so I can set the html wrapper parameters in advance ?
View 3 Replies
Dec 14, 2010
I have been trying to resize my swf width and height to the browser size for the past 10 days...this is what I was able to get so far
looked at numerous tutorials online...but no luck with my swf I would like my images to fill the entire browser without the white background on the side and I would like to do it so that my images will not look distorted...
Code:
Stage.scaleMode = "noScale";
Stage.align = "TL";
setStage();
[code]....
View 3 Replies
Oct 11, 2010
I would like to know the way to prevent a child swf from referencing its parent swf stage width/height?
for example, i created a child swf that loads image and center it on it's stage. As a stand alone its fine but i loaded it with parent swf, it centers on the parent swf instead.
View 3 Replies
May 27, 2004
s how to adjust the size (width*height) of a externally loaded movie?
View 12 Replies
Jul 29, 2010
I am trying to reference to top level (stage) width and height of the main stage for the placement of something located inside a movieclip on the stage.
My code is:
Code:
my_loader.x = (stage.stageWidth - my_loader.width)/2;
my_loader.y = (stage.stageHeight - my_loader.height)/2;
But this seems to just relate to the width/height of the mc that my_loader is nested in...
I have tried the following and had no luck:
stage.stage.stageWidth
root.stage.stageWidth
parent.stage.stageWidth
MovieClip(root).stage.stageWidth
View 8 Replies
Nov 5, 2008
Is there anyway (with action scripting) when having a Flash Video set to Expand to 100% Width and Height to have certain elements within that video maintain their inherent size and not scale ?URL...Notice how the BG Scales, but the video in the center does not nor does the footer. Is this performed with CSS and using multiple DIVs with varying Z Indices.
View 4 Replies
Apr 5, 2010
By default the height of an Flex Accordion container is the height of the initially selected child. I'd like to be able to set the height to the tallest child so that no resizing or scrolling is necessary when other children are selected. I do not want to use the resizeToContent property. I want the size of the container to stay constant no matter what child is selected.
My current thought is to extend the accordion class setting the creation policy to "all" and then override the measure function to loop through all the children and find the tallest one and use that for the height. This seems a little kludgy though, so I'd like to know if there is a better approach. Ultimately my question is: is there a way to set the size of an accordion container such that the container never resizes and scoll bars are never necessary to display any of the children?
View 1 Replies