ActionScript 2.0 :: Scaling And Projection On Stage?

Mar 18, 2010

i have a following problem with displaying a scaled and moved image. cliffs:

1. create movieclip

2. draw a square inside, with a starting point (top left corner) in (75000, 75000)

3. move the movie clip so that the square is visible on stage. its important that the movieclip for each iteration is the same.we reapeat this procedure, each time doubling the x/y of starting point, and its width and height. each time we also scale down the movie clip (so its two times smaller than the previos one). we position the movie clip.basic math suggest that all squares should appear one over another. this is what i get:zoomed:

Code:
container square2 x/y: (-47900,-47900)| zoom: 2| w/h: 500| 64%| x/y: (75000,75000)| stage x/y: (99.95,99.95)| stage w/h: 320
container square3 x/y: (-47900,-47900)| zoom: 3| w/h: 1000| 32%| x/y: (150000,150000)| stage x/y: (98.8,98.8)| stage w/h: 320[code]....

View 1 Replies


Similar Posts:


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 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 1/2 :: How To Get Stage Scaling

Nov 28, 2011

I have developed the entire module with 800x600 Resolution.But Now I got an issue that i need to reduce the content area (Shrink the contents instead of changing the resolution). Because some one had developed the custom player that will affect some of the margins of the content.Is there any AS2 script is avail for scaling the entire stage to 80 % of its original size for the entire module...

View 2 Replies

ActionScript 2.0 :: Scaling Stage To Fit Different Monitors?

Feb 23, 2009

I have a flash project that I published to an .exe so it can run on the desktop. I also used the code:

Quote:

fscommand("fullscreen", true);

This is to make it launch in fullscreen. However the stage dimensions are 1100 * 800px and when you lunch this on certain computers with lower res monitors, some of the stage area is cut off. I found that you can always right click and select the "show all" option and it will scale down to fit the monitors screen. How can I make this do that automatically without having to right click and selecting the "show all" button.

View 5 Replies

ActionScript 3.0 :: Scaling Stage In Fullscreen?

Nov 19, 2009

I'm having a little trouble getting my swf file to fully scale in fullscreen mode. It doesn't look like the stage is scaling and my picture gets cut off. Attached is an image and the code also. It goes full screen at its native resolution fine but gets cut off when i try to scale.

import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;

[code].....

View 2 Replies

ActionScript 3.0 :: Scaling X And Y Size Of Stage When Published

Apr 26, 2011

How do you do this in AS 3.0?I did it in AS 2.0 with the following code:this.onLoad = function () { this._xscale = 133.33; this._yscale = 166.70;can get it working for AS 3.0.

View 2 Replies

ActionScript 2.0 :: Resizing Stage And Scaling All Content?

Jan 3, 2007

I have a banner that is 468x60 pixels and I need to rezize it to 728x90 - this includes scaling all of the content over the timelines proportionally.

View 6 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

IDE :: Proportional Scaling MovieClips Relative To Stage?

Jan 30, 2009

how to proportionally scale multiple movieClips relative to the stage size.

I understand movieclip placement relative to the stage, and I have been using a code to scale MovieClips as a fullscreen background (also proportionally)

But

I can not figure out for the life of me how to scale other movieclips in relation
to the stage size.

for example I have a background_mc that proportionally scales with the stage
to fill without distortion.

HOW do I then place another MC say center aligned (I know how to do that) that will scale with the background without distortion?

Ideally I would like to place several MC's on my stage all scaling in proportion with the stage yet independently.

I have not been able to find any documentation on this. lots of tutorials on backgrounds and color fills and the like but nothing on proportional scaling of independent mc's

this is the code I use for my background_mc (can it be modified or should it be thrown out the window to achieve independent scaling?)

Code:

import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;

[Code]....

View 7 Replies

ActionScript 3.0 :: External SWF Scaling To Objects Outside Of Stage?

Dec 24, 2009

I have an swf in which objects go outside the boundaries of the stage (but are properly masked). Whenever I externally load this swf into a container it scales down to fit in the objects located off stage. EX:I have tried removing the objects outside the boundaries and the stage does not shrink the image. The container is the same dimensions as the external swf.

Code:
function open_puzzle(openSWF:String)
{
//Load SWF
container = new MovieClip();

[code]....

View 1 Replies

ActionScript 3.0 :: Proportional Scaling External Image To Stage

May 6, 2010

I know but basically I want to place some images on the stage and I want every image, whether big or small, portrait or landscape, to be scaled to about a quarter of the stage size.
 
I have tried coding this myself and even tried many suggestions found on the web, but they all seem to do the same thing. The code either sizes every image to be equal in width and varying height, or scale every image to be equal in height with varying width.
 
Say you have some images all the same size, but some in landscape orientation and some in portrait orientation. Most of the code I found for "proportional scaling" would scale the landscape images okay, but make the portrait images the same height as the others, so they looked alot smaller. Or the reverse was true.
 
example:image.width = stage.stageWidth;image.height = stage.stageHeight;
( image.scaleX < image.scaleY ) ? image.scaleY = image.scaleX : image.scaleX = image.scaleY;
 
This makes all the images fit on the stage all right, but they all have the same width. reversing the equality amkes all teh heights the same.
 
If two images did not have the same width before they are scaled down, they should not have the smae width afterwards in my opinion.
 
Sometimes I get some code that seems to work, then I change the stage size to check it and all the images did not scale to 1/4 of the stage new size when the FLA was run.

View 4 Replies

ActionScript 3.0 :: Proportional Scaling MovieClips Relative To Stage

Jan 30, 2009

I need some assistance on how to proportionally scale multiple movieClips relative to the stage size. I understand movieclip placement relative to the stage, and I have been using a code to scale MovieClips as a fullscreen background (also proportionally) But I can not figure out for the life of me how to scale other movieclips in relation to the stage size. for example I have a background_mc that proportionally scales with the stage to fill without distortion.

HOW do I then place another MC say center aligned (I know how to do that) that will scale with the background without distortion? Ideally I would like to place several MC's on my stage all scaling in proportion with the stage yet independently. I have not been able to find any documentation on this. lots of tutorials on backgrounds and color fills and the like but nothing on proportional scaling of independent mc's this is the code I use for my background_mc (can it be modified or should it be thrown out the window to achieve independent scaling?)

[Code]....

View 2 Replies

ActionScript 3.0 :: Scaling MovieClip Size - Width Of Stage

Jun 21, 2011

Is there any performance difference? I am scaling a 2000 - 4000 wide movieclip, within a 600 wide stage. Does it matter which way I scale it in terms of CPU usage;
myMovieClip.scaleX *= 2;
or
myMovieClip.width *= 2;
The movieclip will be scaled multiple times and to varying sizes.

View 5 Replies

ActionScript 3.0 :: Stage To Prevent Scaling Of Movieclips On Fullscreen?

Mar 3, 2011

in flash AS1,2 you just input this code Stage.scaleMode="noScale";

on a frame of the main stage to prevent scaling of movieclips on fullscreen.I tried the same thing in AS3 and its not working for me. so my question is how would i apply this in AS3?

View 8 Replies

Flex :: Sprite Scaling Children Even Though Stage.scaleMode = "noScale" And Stage.align = "TL"?

Aug 6, 2010

I am creating an AIR nativeWindow. I am adding two children, an HTMLLoader and a Sprite. The child Sprite has two children, a TextField and a Sprite that will be used to draw. I have set stage.scaleMode = "noScale" and stage.align = "TL", which the HTMLLoader seems to respect. However, the child Sprite scales its children whenever I set a height.

public function BaseWindow(){
var winInit:NativeWindowInitOptions = new NativeWindowInitOptions();
winInit.type = NativeWindowType.NORMAL;[code]..........

How do I prevent the distractor Sprite from scaling its children?

View 1 Replies

ActionScript 2.0 :: MX - Pulling Down A Projection Screen?

Jan 29, 2010

I want to build a sort of pulled down projection screen thing using ActionScript.Basically the MC will come down with a picture on it.I have this starting code which doesn't work terribly well because it just moves the screen from top to bottom instantly.

Code:
on (release) {
do {_root.mcScreen._y+=1;
} while (_root.mcScreen._y<200);
}

Essentially I want the screen to smoothly scroll down into place over about half a second.

View 6 Replies

ActionScript 3.0 :: Calculate 3D Plane From 2D Projection

Jan 16, 2012

I'm basically trying to emulate Photoshop's Vanishing Point tool where you can define the 4 2D points and the 3D plane is calculated from that information, in terms of the rotation of the plane relative to x y and z axes.

So if you have an image like this one:
And you define the points of the four corners, maybe like this:

It would define the 3D plane that the surface must live on relative to the x y and z axes. Researching this has led me to some tutorials on drawTriangles and Homographies, but they all seem to be focused on mapping bitmap data and I can't seem to find anything that defines a 3D plane itself.

View 5 Replies

C# :: Build Interactive Floor With Projection?

Jan 15, 2011

is there any lib or api out to deal with this ? EVEN, if there is any resource , article from another language c++ , c , .. i just didn't have enough time to test lot of ways

If you search interactive floors , or interactive floor projection you can find some companies who provide such a thing

View 2 Replies

ActionScript 3.0 :: User Resizing And Scaling Movie Clips On Stage

Jun 25, 2010

'i am doing a game for children where users can drag and drop resize and scale movie clips on stage! The drag and drop is not an issue...however im not quite sure how to do all the rest... is there a way or a tutorial to do this?

View 1 Replies

ActionScript 2.0 :: User Resizing And Scaling Movie Clips On Stage?

Jun 25, 2010

'i am doing a game for children where users can drag and drop resize and scale movie clips on stage!

The drag and drop is not an issue...however im not quite sure how to do all the rest.

View 3 Replies

ActionScript 3.0 :: Outside Stage And Objects Proportional Scaling To 100% With Resizing Capabilities?

Feb 23, 2011

i am looking for class or something to proportional outside scaling of stage and all included objects (internal or external).I know SWFfit and LiquidStage. I have got many problems with integrating SFWfit to my code (resizing is not affected to included objects). LiquidStage seems to be ok but it`s not freeware . I am looking for free possibilities to do it.I am trying to connect that with GAIA framework.

View 3 Replies

ActionScript 2.0 :: Scaling The Stage With The Browser Window But Images Distorted?

Oct 30, 2009

I'm using the code below to scale my main movie with the browser window.What happens is that the images in the movie are baldy distorted ..Can I preserve the images to scale or at least can I scale them with a different scale?I'm using CS3 ,AS2 and Flash Player 9

Code:
// ***Stage aligned top left
Stage.align = "TL";
// *** stage scaling with the browser window.
Stage.scaleMode = "Scale";

[code]....

View 9 Replies

ActionScript 3.0 :: User Resizing And Scaling Movie Clips On Stage?

Jun 25, 2010

'i am doing a game for children where users can drag and drop resize and scale movie clips on stage!

The drag and drop is not an issue...however im not quite sure how to do all the rest..

View 1 Replies

ActionScript 3.0 :: Scaling Bunch Of Point Objects Relative To Center Stage

Jan 8, 2012

All though I can scale down the size of my objects and can shift them to their correct positions when scaling. I cannot shift them to the correct relative positions, relative to the screen centre.

Code:
level=1; //starting scale level
public function scaleOut(level:int) // scale to a level 1-4{
for (var r = 0; r < Main.ballArray.length; ++r){
// scale radius
Main.ballArray[r].bRadius *= (oldLevel / level);
[Code] .....

View 8 Replies

Flash :: Get Visible Size Of DisplayObject With Perspective Projection

May 2, 2010

The following is entirely a math question. As we know, PerspectiveProjection delivers perspective transformations in 3D represented by the interdependent values of fieldOfView and focalLength according to the following formula:

focalLength = stageWidth/2 * (cos(fieldOfView/2) / sin(fieldOfView/2)

Q: How to get the visible on-screen size of the DisplayObject (Cube on the above-linked image) to which PerspectiveProjection has been applied? A more thorough description and illustrative code on the issue in ActionScript 3 lacks functionality for visible bounds of DisplayObject.

View 1 Replies

ActionScript 2.0 :: Opening Popup Page In Standalone Projection

Apr 28, 2005

I am creating a standalone projector (CD with autorun). This means my swf files are NOT contained within html. I would like to, when clicking on button, open a popup html page with specific dimensions. I was wondering if it is possible to do that, and what AS to use,
or if I have the obligation, to openpopups, to launch my swf files within html mother page.

Here is the code of button that works (but does not open popup):
on (press) {
getURL("URL", "_blank");
}

Here is the code for popup but does not work (opens html page normally):
on (press) {
getURL("URL", "", "width=580,height=400,left=100,top=100");
}

View 2 Replies

Actionscript 3 :: Calculate An Objects Scale Using A Perspective Projection Matrix?

May 31, 2011

Im currently building a little 3D particle engine in flash the uses sprites.to set the position of each sprite I am using the projectVector function below. (the viewTransform matrix is the particles world matrix concatenated with a perspective projection matrix)

var projectedPoint:Vector3D = Utils3D.projectVector(viewTransform, point);
sprite.x = projectedPoint.x;
sprite.y = projectedPoint.y;

[code].....

View 1 Replies

Actionscript :: Define Projection Matrix In Stage3d Without Using PerspectiveFieldOfViewLH Method

Jan 24, 2012

url...The interesting part is that he didn't use perspectiveFieldOfViewLH and instead he defined his own projection matrix. I'm new to the 3d programming, so after reading this explenation of projection matrix:[code]And i got the black screen. All i did was exchanging the matrix from the tutorial with this matrix. I tried to play with it for some time, but with no results. This is the matrix from the tutorial[code]

View 2 Replies

ActionScript 3.0 :: Physics Projection Algorithm - Determine Both The Correct X And Y Veleocity To Shoot The Balls Out

Jun 7, 2010

I have a machine that shoots canon balls into three different barrels, each on a different x axis, I need to be able to shoot at an arc into the target barrel, the target barrel will be randomly determined right before the ball is fired, the barrels will be randomly placed from stage to stage

the friction and gravity applied are constant variables, how can i determine both the correct x and y veleocity to shoot the balls out so that they end up in the correct barrel. I don't want to hard code any variables

View 2 Replies







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