ActionScript 3.0 :: Make Component Resize As The Stage Resizes
Apr 16, 2009
No not that component my FLVPlayBack component. I'm trying to make my component resize as the stage resizes while maintaining aspect ratio like this example [URL]. What I have now [URL] does that but only haltingly. It will scale but not always when you want it to sort of like rusted machinery ya give it a whack and it works for a few seconds that's why I said it needs grease. It's not a html issue here's the link to the swf just to make that point [URL]
[Code].....
View 4 Replies
Similar Posts:
Feb 26, 2005
[URL] I like the menu, resizes when browser window resize. Where can I find an tutorial?
View 2 Replies
Apr 5, 2010
I am having an issue with an actionscript event that I am firing every time a flex component resizes. In the event, I am altering the height of the flash object within its html wrapper via an external javascript function. This in turn causes the component to resize and the event to loop in upon itself and continually add height to the component.
[Code]...
View 1 Replies
Sep 14, 2009
how could I make a bar top or bottom which doesn't move when window resizes like that [url]
View 3 Replies
Oct 9, 2007
i am trying to make this xml gallery that dynamically resizes according to the picture's width & height. the function resizer() is hardcoded with fix values. i have tried to assign it from the array like below but it works wierd, the border just keep increasing in size.
Code:
menuHolder["but"+i].onRelease = function() {
imageLoader.loadClip(this.path,gallery.imageHolder);
gallery.imageBorder.tween("_width",this.width,1,"easeOutExpo");
[code]....
View 2 Replies
May 27, 2009
is there a way to make a minimum width and stop resize? I have a menu I am building that is locked to the bottom of the browser and 3 buttons on the left and a movieClip on the right. When you resize the browser window - currently - you can make the button on the right sink under the three on the left.
[Code]..
View 6 Replies
Oct 19, 2011
I'm writing a web based flash app that's written entirely in AS3. I have objects on the screen as part of a GUI. I would like the user to be able to resize the window, or make it full screen. I would like everything to auto-scale with the resize, but also remain in the same relative position on the stage.
View 1 Replies
Feb 27, 2006
i saw a thread while ago .. that always position a movieclip in the middle of the stage even if the stage or window resize any1 can point me to it
View 3 Replies
May 10, 2008
When you resize the browser window the thumbnails rows and columns adjust accordingly to fit.I've managed to attach the thumbnails correct when my enableButtons() function is called but i'm unsure how to approach resizing.
Stage.align = "TL";
var numberOfGalleries:Number = 20;
var thumbMarginX:Number = 163;
var thumbMarginY:Number = 109;
[Code].....
View 1 Replies
Sep 9, 2009
I've got a large bitmap (1920 x1306) that my client wants as a bg image, scaled to the swf size on load (930 x 575); but that can "grow" up to its original size if/when a user expands the browser window. All the rest of clips in the display list are to remain in place (except for a copyright clip, which they want to always be 14 pix above the bottom of the browser frame. I've tried loading the bitmap dynamically at full size and then using scaleX,scaleY to set it's initial smaller (930x575) size, and I've tried just setting the height/width of the dynamically loaded image using the math of scaleX,ScaleY just in case the scaleX "transformed" the bitmap so that it couldn't return to its original size. Both make the bitmap the right size. But the resize function below did nothing to it, (or the copyright.y.) THEN I tried just putting the bitmap into the display list (both sizing methods work here, too). But even as an original member of the compiled display list, the resize event is still not reaching the target. Everything I've seen on the web says this should work - but...no luck.
Here's the AS3 code in the 1st frame of my swf:
import flash.display.Stage;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
[Code]......
View 1 Replies
Jul 10, 2008
Do you know any tutorial similar to this one [URL]...y=ActionScript) that shows how to make a bouncing image that resizes during bouncing?
View 3 Replies
Dec 11, 2004
I'm building this game, and it was working fine, until I used the menuBar component. It's not code related, 'cause i've commented out the script that does things with the menuBar. If I drag the MenuBar component from the component window, onto my Stage , the game refuses to work. If I deleet it (but keep it IN my library), it still doesn't work!. But if I turn the export settings of the MenuBar off, it works! The classes that i'm using for my game are called Node.as, JawBreaker.as The class I want to use to do something with the menuBar is called GameMenu.as (but that doesn't matter, since I commented the calling of that class out).
View 1 Replies
Dec 22, 2010
All I want to do is have a scrollPane component on the stage and within that component I would like to have a movieclip that is essentially a list, and each list item is a button to be clicked on. I have no problem doing this if I have buttons within a movieclip, but having them in a scrollPane produces the following error:
1119: Access of possibly undefined property mcButtons through a reference with static type fl.containers:ScrollPane.It seems that I am unable to use the scrollPane component as if it were a movieclip and to use dot syntax to access it's content.
View 2 Replies
Apr 5, 2011
I am trying to create an expanding object with the following event handler
public function pickerMove(e:MouseEvent):void {
trace("in mouse move");
var offsetX:int = e.stageX - touchX;
[Code]....
Is there something that I don't know about custom components resizing?
View 1 Replies
Nov 11, 2010
I'm building a top view 2D map, that it's objects are stored on the server.The kind of objects are 10 and might be a photo, label, button, lists, mix of them or labels with tooltips.The component must request the "areas" that are missing on screen.An area is 1000x1000 px and is cached in flex.To move in the map, will be like in google maps (drag-and-drop).I should be able to have another list and move objects from one to another using drag-an-drop on objects. Ex.: I grab an objects from a list and I move it on this map, I release the mouse button and the item is placed there.Now the problem is: I build a custom component for this trying to emulate the item renderer for performance and recyclage, implement drag-and-drop on objects and request the areas that are missing?
or
I extend the List component from spark and I add some features as multiple kind of itemrenderers and use recycle on them. Of course it must be able to request the missing areas on the screen and cache it's data.Maybe create a custom layout is needed too.What I need is something that must be really fluid, so the lighter this component is, the better.
UPDATE: *There will be not any object over another.
*I will not use hitTest on bitmaps because all bitmaps are wrapped in another component,as they,for now are itemrenderers.
Anyway I already begin to do this using a class that extends the SkinnableDataContainer and a custom layout. As the layout is not like a grid, is sparse, random items at diferent points(x, y).How to get the localX and localY, relative to item renderer and not to the Spark List, from a DragEvent in Flex 4?
View 1 Replies
Dec 10, 2011
My component has lots of inner components.When i resize the container component (panel), i want all inner components resize with same ratio. Which function should i use?
View 1 Replies
Jan 11, 2010
I am trying to set a listener so that I can respond to an flvComponent when it resizes etc. I am not uses any home made classes. I have stripped the code right down to this, and it still wont work! Have dragged a flvcomponent onto the stage and given it the instance name myVideo.
ActionScript Code:
stop();
myVideo.addEventListener(AutoLayoutEvent.AUTO_LAYOUT, fred);
function fred(e:AutoLayoutEvent){
trace ("hi from fred");
}
when I test I get "type was not found or is not a compile time constant:AutoLayoutEvent". I can do all sorts of processes like changing flv being played, moving it around etc.
View 2 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
Nov 29, 2010
in flash builder 4 how do i use the skinning option to make sure the popup dropdown list changes it's width to fit the longest item in the list?(the prompt area - the component when it is closed - should not change it's width)
View 1 Replies
Dec 5, 2010
i have written an air app which is fixed in dimensions: 1000 w X 800 h i have set the resizable and maximizable tags of the app-xml to false, to prevent the user from changing it's size. this app looks and interacts perfectly at these dimensions but not at other: it has "bad" coding techniques in it like hard-coded display sizes and such, rtl and ltr combined layoutdirections and so forth...
when the applicationComplete event dispatches, i check Capabilities.screenResolutionY and if it is less then 800 i want to resize the app programatically (preserving the width/height ratio). i have tried all the StageScaleModes and tried changing the dimensions of the stage, the nativeWindow, the app itself("this") and so on in every combination.
i am looking for a way to resize the entire app as is, meaning i dont want to use display logic of the components and such, just to "shrink" or "expend" the whole app as is, with hard-coded pixel amounts to change within the logic of the app accordingly (change all sizes, locations, fonts etc.. in sync) the app should look and work exactly as it did in it's 1000x800 default size, only smaller or bigger
View 2 Replies
Jun 20, 2010
I have two problems. 1) the page still will not resize properly until the window is resized. I assume I have the code wrong somehow.
2) I changed the height of my menu object to stage.stageHeight, but its now coming up squished and only about 30% of the actual height of the stage. I am not sure what I did as it seemed to be working before, but I cant seem to fix it.
Code:
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, stageresizeListener);
[Code]...
View 6 Replies
Nov 18, 2009
Is it possible to resize everything on the stage in one (or a few) step? I know scaling the movie has the same result, but when working in Flash it's a lot easier when you see the actual size.
View 1 Replies
Aug 14, 2008
I've been working on my web site. Its 1024x768px and i run it fullscreen.I come up with an idea and i added a 1024x768px to the top (new frame) as a intro like action.When i try to resize it to stage it will really mess up my whole pageAnd also cause of resize my movieclip stretched and looking terrible
Code:
var xy:Tween = new Tween(asdasd, "_x", Strong.easeInOut, 0, -1024, 2, true);
Code:
[code].....
View 9 Replies
May 15, 2009
They show their work as the page�s background which can be resize with the browser window, but their navigation always stays the same.I know how to achieve the resizing effect, but it resizes the whole stage including navigation.
View 2 Replies
Jan 31, 2010
The stage is set to 955x465 at 1st frame but once load external movie clip in 2nd frame the stage is set to 955x855 size, is it possible to do it?
View 1 Replies
Feb 6, 2010
I created a game but I made the game a little too big. It would be alot of hard work to shrink all the objects in the game and resize the stage using the properties. I notice that in debug mode the whole screen can shrink when you adjust the window. Is there some code I can use to this on it's own? and will it be costly on performance ?
View 2 Replies
Jul 9, 2009
i am trying to build a resize with stage image gallery. It is working except for when you first open the swf the image has it's original size, and it only adjusts to the stage when the stage resizes.s the script:
ActionScript Code:
Stage.addListener(this)
this.onResize=function(){
[code]......
View 0 Replies
Jul 13, 2009
have a Movieclip where i have duplicated a clip that loads external swf. My cuestion is how can i make this movieclip resize it self and it's content on stage resize.
View 2 Replies
Jun 7, 2010
I have a movieclip that i want to resize to fit the stage and center it with a button click. Then resize back to it's original size and place with a second button.[code]...
View 6 Replies
Dec 3, 2010
I'm trying to resize my stage using this code but I can get it work correctly. (I'm using FLASH CS4)
ActionScript Code:
var Stage_height = flash.system.Capabilities.screenResolutionY;
var Stage_width = flash.system.Capabilities.screenResolutionX;
[SWF(width=Stage_width, height=Stage_height)]
When I launch it I get this ERROR Could not parse 'Stage_height' as a number for height. And the same for the width.
I tried to set them as Number variables but that didn't work either.
View 7 Replies