ActionScript 3.0 :: Senocuar's Layout Class Scaling Image On Resize

Apr 8, 2010

i've been running into weird problems regarding Senocular's Layout Class. It's a nice little framework to align and scale objects in a fluid layout, though.Some images in the background (currentContainer) don't resize all the way to fit stage's height, and sometimes they get really small in a corner.[code]each time the currentContainer mc gets a different bitmap images (with varying dimensions) on it, it gets assigned to bgLayout , whis is added to the stageLayout.actually, do I need to do that ? Or maybe I should remove bgLayout from stageLayout before assigning it again?[code]

View 2 Replies


Similar Posts:


Flex :: Resize Layout After A Loaded Image Gets Resized?

Jun 2, 2011

So I'm loading a really big pic in this mx:Image manteinAspectRatio enabled with a height constraint and as usual it doesn't work (Flex is definitely not for me):

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code].....

View 1 Replies

ActionScript 2.0 :: Fluid Layout Doesn't Work On Image Until Resize The Browser Again

Jan 27, 2009

ive been using this tutorial [URL] after following the tutorial everything works except when I have an image that is not on all frames, the fluid layout doesnt work on that image until I resize the browser again after I have gone to that frame, which obviously isnt quite right.

View 1 Replies

ActionScript 3.0 :: Custom Resize Event As Part Of Larger Project To Create Flexible Liquid Layout Class

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

ActionScript 2.0 :: No Resize/scaling A Movie Clip On The Scaling Stage?

Mar 11, 2008

I've search through all the threads with "scaling" and "resizing" and can't find the solution.

Basically I have a GUI element on a gallery that I don't want to scale, while the rest of the page is free to resize/scale.

I think I need to add a listener of some sort to the stage, but I'm not sure how to do this.

View 2 Replies

ActionScript 2.0 :: Scaling A Mc In A Liquid Flash Layout

Jan 18, 2010

I am sure this is an easy one but I can't figure it out: I have a movieclip (tester) that I am locating on the stage via the following code:

[Code]....

What I want to have happen is have it start in the defined location but when you drag the browser window open the "tester" movieclip scales up in size but stays centered on those cooridinates - basically as the window gets bigger I want it to stay in the same place but get bigger and be able to control ( by percentage) how big the movie clip grows as the window opens.

View 0 Replies

ActionScript 2.0 :: Proportional Scaling Mc In Liquid Layout?

Mar 12, 2011

I am using the following code to fill the browser window with an image and scale it up or down....works great. I would like to proportionately scale a mc but not have it initially fill the screen. It would start centered in the window at a initial size but then scale up as the browser window opens but not scale back down below it's original starting size.

this is the code for the full screen:

port1Height = new Object ();
port1Height = port1._height / port1._width;
port1Width = new Object ();
port1Width = port1._width / port1._height;

[code]....

View 0 Replies

ActionScript 2.0 :: Scaling MovieClip In Fluid Layout

Feb 15, 2011

I am using the following code on individual movie clips to keep the object centered in a fluid layout:

onClipEvent(load){
this._x= (Stage.width)/2;
this._y= (Stage.height)/2;
Stage.addListener(this)
this.onResize=function(){
this._x= (Stage.width)/2;
this._y= (Stage.height)/2;
}}

My question is this: Can I add/modify to this code to make the MC scale proportionately up as I drag the browser window farther open? Right now it stays centered but it stays the same size.

View 3 Replies

ActionScript 3.0 :: Liquid Layout Site Not Scaling Correctly

Mar 24, 2011

I have made a liquid layout flash site in AS3 but it doesn't rescale correctly in any browsers above 1440x900. I know most people don't have screens bigger than this but it should be scaling to the entire window regardless of the screen size. Can anyone take a look at my code which has resize handlers but still no joy. [code]...

View 0 Replies

ActionScript 3.0 :: Zoom On Panning Class - Cannot Seem To Get The Image To Scale Without Also Scaling The Container _rectangle

Aug 27, 2010

I'm trying to add zoom functionality to Lex Talkington's great Panning Class HTML Code: [URL] and have run into the following issue: I cannot seem to get the image to scale without also scaling the container _rectangle. Here's my code

[Code]...

View 2 Replies

ActionScript 3.0 :: Flash Liquid Layout Site Not Scaling Correctly?

Mar 24, 2011

I have made a liquid layout flash site in AS3 but it doesn't rescale correctly in any browsers above 1440x900. I know most people don't have screens bigger than this but it should be scaling to the entire window regardless of the screen size, small or large. Can anyone take a look at my code which has resize handlers but I still have no joy. This is the website but I am not allowed yet by this site to add the entire url! [URL]

package {
import flash.events.MouseEvent;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

[code].....

View 1 Replies

ActionScript 3.0 :: Liquid Layout Site Not Scaling Correctly In Large Browsers?

Mar 23, 2011

I have built a liquid layout Flash site using AS3 but it isn't  scaling correctly once I go above 1280x1024. I am currently using a Mac  screen with dimensions of 2560x1440 and it looks terrible. The menu  pushes to the top and the bg and page info stays central but with no scale.[URL]..
 
The HTML is 100% w+h so it's obviously something  within the AS3 code. This is causing me nightmares so if someone could  take a look at the code pasted and see if there is a way to resolve

[Code]...

View 11 Replies

ActionScript 3.0 :: Liquid Layout Browser Resize?

Feb 16, 2011

I have created a liquid layout site in AS3 and am having an issue with the stage resize. Although the elements flow with the browser on resize I notice if you drag the browser's window to the right a white border appears. Now obviously not everyone would do this but it's more of a concern for anyone viewing the site on a large resolution screen. The site is currently 1200x800 in it's original dimensions and I want it to retain it's size in larger browsers.

View 1 Replies

ActionScript 2.0 :: Fluid Layout And Resize Stage Don't Work With Tween?

Jun 24, 2009

I'm trying to make a site for all screen resolution. Seems this method don't work when I have a tween navigation. The navigation border stay the same even after I put this coding:

[Code]...

View 1 Replies

ActionScript 3.0 :: Content Not Scaling On Window Resize?

Apr 10, 2010

How come my content isn't scaling when I resize the player window (see attachment)?

View 2 Replies

ActionScript 3.0 :: Scaling External SWF Before Window Resize?

May 23, 2010

I am trying to scale external swfs to the window size that exists at the point when the button is clicked. The external swf is being loaded into a dynamically created mc in the main swf. I am using a resize handler and the issue i am having is that all external swfs only become veiwable when the window is resized. After the window is resized, they become viewable and scale on the resizing of the window. I call the resize handler to upate the scale base on the window size but to no avail.

The AS (3.0) that I am using can be seen below.

ActionScript Code:
stop();
var Xpos:Number = 0;
var Ypos:Number = 0;

[Code].....

View 0 Replies

ActionScript 3.0 :: Resize MovieClip Without Scaling Content?

Jun 10, 2011

Essentially I'm building an application in Flash, just for the fun of it really. Upon the initial design it was just a static size, now however I've been working on making it completely resizeable (with the original size as the minimum). I've done this on most of the screens correctly. However on the main screen I have several components. All custom built MovieClips basically, and inside these are more MovieClips, and inside those are even more movieclips.

For my question, I'm going to be using a button as my example. I created a button movieclip with a resize function to call after I change the size of it. So it works like this:
ActionScript Code:
buttonMC.width = 200;
buttonMC.height = 150;
buttonMC.resized();

Now this button is inside of another movieclip which is designed to just house a group of similar movieclips. (this structure is not changable; several hundreds of lines are code are specifically designed around it). How to get our button's width from the root timeline, we'd do this:
ActionScript Code:
trace(housingMC.buttonMC.width);

Now, when this frame gets resized, the resizing script changes the width height of the housingMC. Something like this: (not a working example)
ActionScript Code:
//resize listener {
housingMC.width += stageWidth - oldStageWidth; //width difference
housingMC.width += stageHeight - oldStageHeight; //height difference
And the housingMC changes to the correct size in the correct position of the screen.
[Code] .....

View 7 Replies

ActionScript 2.0 :: Stage Resize And Scaling Movieclips?

Jun 30, 2007

how do I code stage resize with scaling movieclips? I can do stage resize and position/scale movieclips relative to stage size..but i don't how to have a scalable movieclip retain its scale relative to stage size. how do I code this? for example, i have a movieclip originally 50px wide, and the stage 100px wide..when i click the mc, it scales up to 80px wide. and when I resize the stage to 50px,(50% of stage size) i want the mc to scale to 40px too(50% of mc size).. and when I click it again to restore to it's original size, i want it to scale to 25px(50% of original size). then finally when i scale the stage back to 100px, the mc again is 50px wide.

View 2 Replies

ActionScript 3.0 :: External SWF Scaling Relating To Window Resize?

May 23, 2010

menu_mc.about_btn.addEventListener(MouseEvent.CLIC K,aboutClick);

function aboutClick(e:MouseEvent):void {
removeChild(loader);
var about:URLRequest = new URLRequest("demo1.swf");
loader.load(about);
addChild(loader);

[Code]....

View 3 Replies

Actionscript 2.0 :: Resize Movie Clip While Scaling Its Contents Proportionally

Mar 4, 2010

I have set a movie clip with instance name if "body" to resize automatically based on the size of the browser window using:

body._x = Stage.width / 2;
body._y = Stage.height - 44;
body._height = Stage.height - 149;
body._width = Stage.width-20;

(that code may not actually have any relevance?)

What I'm wanting to happen is that when the "body" movie clip changes size, I want the objects within it to be scaled proportionally (keeping the x:y ratio the same). The result that I'm wanting will result in the contents (as a whole) being proportionally scaled to the height (because it will always be the smaller dimension in my case) of the current size of the body mc.

I've uploaded my .fla so you can see what im working with. The red square is the body that i've managed to scale but I have not yet added anything within it. (I have tried but it's contents distort when the body is resized)

View 1 Replies

ActionScript 3.0 :: Scale Or Resize The Image By Dragging And Resize Option?

Sep 19, 2011

I 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 Replies

ActionScript 3.0 :: Fluid Layout Stop Changing Resize Position When Movieclip Is At Certain Position?

Nov 19, 2009

I added a Menu_mc on my stage. Initially, this should be at the center of the stage and when I click on it, it will tween on the upper left corner of the browser. However, when I resize the browser, the Menu_mc goes back to the center of the screen.

I have tried separating a different actionscript file where it is specifically for initialization of the object and another one for resizing. And then when I call it on my main AS file it goes like this:

Code:
// Add the symbols to stage
var Menu_mc = new Menu_MC();
addChild(Menu_mc);

[code]...

But it seems futile.

View 6 Replies

ActionScript 3.0 :: Creating A Layout Class?

Aug 3, 2009

first of all i `ve to say, that i am a total beginner in as3.. and also my english is not very well, but i hope u 'll be fiendly to me =) so lets go.. i am thinking about to create a design class for my project .. this class should load a xml-file, which contains some container:

[Code]...

View 2 Replies

ActionScript 3.0 :: Document Class To Set Stage Layout?

Jul 17, 2009

I am attempting to understand the document class. I have the following code in my current document class in an attempt to set up my stage.I did regarding classes and linking them directly to Library assets, but just as I told him-- I am throwing my pride to the side to try and understand and breaking down to ask the dumb questions.here's the code:

Code:
package site.src
{
import flash.display.Sprite;[code]...

Why would this throw up the error: "1046: Type was not found or was not a compile-time constant: Event." referencing the line in the code: "function setStage ( e:Event = null )"?

View 8 Replies

Flash :: Rails 3 Swap A Layout Image For A Animation?

Feb 11, 2011

So I have a helper that I'm using to swap my header image for another image that seems to work fine. This is my helper.

[Code]...

View 1 Replies

Full Width Preloader For Fullscreen Layout/fluid Layout?

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

Actionscript 3 :: Centering Objects On Stage And Auto-Scaling With Stage Resize

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

ActionScript 2.0 :: Resize LoadClip Image - Return 0 When The Image Loaded Is Obviously Much Larger Then 0 Pixels

Dec 13, 2007

Some images I load dynamically are too big so I would like to scale them to fit the stage.

[Code]...

this returns 0. Why does it return 0 when the image loaded is obviously much larger then 0 pixels. How do I change the width and height of imgCont to a specified dimension.

View 1 Replies

ActionScript 3.0 :: Add A Visible Border To The Image That Allows To Resize The Image

Mar 19, 2010

i am building an editor which allows you to resize images and to do this (once an image is selected) I add a visible border to the image that allows you to resize the image. so i want to have a function something like,

[Code]....

and i have to call this redrawborder function inside the MOUSE_MOVE listener that controls the resizing (so that i am constantly removing and redrawing the border). constantly removing and redrawing the frame seems very inefficient. is there some property or better why to do this? i want to have, displayobj.scaleChildren = false or something like that

View 1 Replies

ActionScript 3.0 :: Scaling Using Tween Class?

Sep 1, 2010

It was supposed to be an easy code but i can't make it work until now.I want my intro texts to get scaled to a certain postion when clicked .So far this is what I have done,
 
var scaleTo:Number = 0.6;
var introTexts:Array = [...];
for(var i:int = 0;i<introTexts.length;i++){    introTexts[i].addEventListener(MouseEvent.CLICK, onintroClick);}

[code]....
 
Right now,this code doesn't do anything, I can trace out "click" but nothing happen. I tried out the first item from the array first to make sure the code is working. The x position I want is -15 and y is 300.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved