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


Similar Posts:


ActionScript 3.0 :: Align Center A Sprite In Its Stage?

Jul 8, 2009

I try to align center a sprite container in the center of the stage.

What can be the method to do it?[code]...

View 5 Replies

ActionScript 3.0 :: Stage.scaleMode And Stage.stageWidth?

Jan 2, 2008

What am I missing here? According to the docs:

Quote:

When the value of the scaleMode property is not set to StageScaleMode.NO_SCALE, the stageWidth property represents the width of the SWF file as set during authoring in the Document Properties dialog box. This means that the value of the stageWidth property stays constant as you resize the Flash Player window. This property cannot be set. So stick this in a new FLA

[Code]...

and the traces are of different values. According to the docs, this shouldn't be happening. What's going on? Did I miss something little?

View 5 Replies

ActionScript 2.0 :: Fullscreen Projector With NoScale On Stage

Mar 22, 2008

I working on a projector presentation in flash where I would like to run it in fullscreen. I use:
fscommand("fullscreen","true")
In the first frame, but it scales up my content so that it gets blurred. Is it possible to keep the stage width and height and still go fullscreen, so you just fill the space with stage color.

View 2 Replies

Embed Swf Change Stage.scaleMode

May 21, 2009

Is it possable To change the scale mode of a swf in the html embed code?
 
my problem: I have the popular free flash game 'metal slug' as a swf, Its too large and wont resize as it was exported by who ever made it to preserve aspect ratio....
 
Ive been trying all day to get it to resize but it wont:
 
<div id="Nested" style="position:absolute; left:22px; top:32px; width:400px; height:300px; z-index:1;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve

[Code].....

View 2 Replies

ActionScript 3.0 :: Resizing A Sprite Without Scaling/streching Its Children?

Nov 29, 2009

I have a Bitmap. Let's say it's 100x100 in size. I would like to display that bitmap on a Sprite that for the sake of this example is 100x50. Since the height of the bitmap is double than the height of the sprite - I would have liked the bitmap to be cropped (and to later implement a "scroll-down" mechanism) - HOWEVER, apparently:

1. The size of an "empty" sprite is defined by the size of its first children(s) - once I addChild the bitmap into the sprite - the sprite becomes 100x100 (If I try to define the size of the sprite to 100x50 before adding the child, and then adding it - then nothing is displayed).

2. If I then try to resize the sprite by modifying its Height property - the bitmap get's "scaled-down", or rather "squashed-in" to fit the new size.I'd like the bitmap to retain its original size (and be cropped at the bottom).Can it be done (without copyPixeling to a different bitmap etc.), and if so how?

btw:(3) If after all that I try to scale the bitmap back up (by changing scaleY) - then the sprite itself is again gets scaled and resized with it...

View 1 Replies

ActionScript 3.0 :: Object Position On Stage Without Using Stage.align

Apr 23, 2010

I have a stage bigger than the size of a browser, and I have a camera to navigate around the area.Now when I click on a button, I will have something pop up blocking the whole browser, like a lightbox effect with another box on top of the blocker.The problem now is, when the blocker pops up, its position is not on the TOP LEFT corner of the browser. I've tried stage.align, but it would makes the camera or other object on stage position run.So is there any other way I could get the blocker to position according to the browser, not the stage?[code]

View 1 Replies

Vertically Centering Flash Movie In Browser With Stage.scaleMode?

Oct 30, 2009

I have this flash website where i use Stage.scaleMode to dynamically resize the swf depending on the browser size. (i use A.script 2.0). So the width takes the whole screen and the height is scaled in proportion. My design is in a landscape format. It works fine, except that i need the swf to also be vertically centered in the browser Window. (explanantion - on certain screens, example a 19 inch PC monitor which is quite "squared", my flash movie expands the whole way across the width, and the height in proportion, but as my design is in landscape, i have a big empty space in the browser below the swf.)
 
This is how it is:    This is how it should be:

Here is the code:
 
stop();
Stage.scaleMode = "noScale"
Stage.align = "TL";

[Code].....

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 :: 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

AS :: Flex - Obtain Stage Property In Added Children?

Feb 19, 2010

I am trying to trace stage.name in child view after addChild:

import flash.events.Event;
import flash.text.TextField;
public class TestView extends TextField {

[code].....

View 3 Replies

Actionscript 3 :: How To Align The Stage

Mar 17, 2011

I have a pure code Actionscript 3 project in flash builder 4 and I want to align the stage. For now I have a sprite that I have set the x property to 10, but the sprites are in the middle of the screen. How to set these kind of properties in code? I suppose it's the stage object that needs to be set in some way.

View 1 Replies

ActionScript 2.0 :: Align Mc To Stage?

Jan 19, 2005

Ive got my flash movie set to 100% width & height, while the stage is set to no scale. Is it possible for me to align an mc to the bottom regardless their window size?

Just to clarify if firefox is larger than the stage, can i align this mc ( like a footer ) to the bottom of the ussers screen.

View 3 Replies

Flex :: Map Scaling - Exclude Some Children?

Jun 15, 2011

I'm trying to build a webmap application in flex. For this, I've got a fxg-file which represents the maps. It's in a also there are some elements, like POIs, text etc., in this group. I zoom the with scaleX and scaleY, this works just fine for the map. But the problem is: All children zoom also. I don't want this. They should stay the same place on the map and the same size.

Heres some code the as function
<fx:Script>
<![CDATA[
import mx.skins.Border;
[Bindable]
public var hoehe:Number = 1;
[Code] .....

ComponentsLakwView contains some labels etc. This should not be resized?

View 2 Replies

ActionScript 1/2 :: Use Stage.align For Panning?

Oct 11, 2010

I have created a working flash file virtual_cube.swf in which I use Stage.align for panning. When virtual_cube is loaded from another swf (whhich I have no control over) the use of Stage uses the loader swf.I know _lockroot is nice for when using _root, is there something similar for Stage? like _lockStage?

View 1 Replies

ActionScript 2.0 :: How To Align Stage Vertical

Jan 5, 2010

when my flash movie in full screen status i want to align stage center. (Vertically and horizontally) from this code i able to align stage horizontally center.

ActionScript Code:
Stage.align = "T";

but its not vertically align middle. its only aligned to top (Vertically) what is code/ property i should use to make it vertically middle.?

View 0 Replies

ActionScript 3.0 :: Align Objects To Stage

Jun 25, 2010

I want to align objects to the stage, so that after the browser window is resized, the objects/MC's are still in the same places (top middle, right middle and so on...).[code]But this has to be loaded from an external .as file as far as i'm aware.I need the above code to work on frame one of the flash file. How can this be done? i'm sure it's something easy like replacing the "public" parts of the code... Also does the obj part of the code refer to the MC name?

View 9 Replies

ActionScript 3.0 :: How To Align Image On Stage

Sep 21, 2010

i want to show more than One image On stage Using Loader class and withOut Xml ..for these purpose i written code below but i suffer with Align these image .......in my stage i can view only single Image.

Code-----------
public class mydoc extends MovieClip
{

[code]......

View 4 Replies

ActionScript 3.0 :: Stage Align Setting The Min And Max

Nov 6, 2011

if i have some mc objects on stage and they align lets say to the top side and bottom of the screen then if resized smaller than stageWidth 800 and stageHeight 550 they stay where there are and if the stage is resized bigger then they lock to the top side and bottom. Ive got so far with it and it works ok but if i try and resize the window randomly with the mouse ( like clicking the bottom right hand corner and squiggle the mouse around it acts weirdly.

View 3 Replies

Actionscript :: IDE - Align To Stage = No_more?

Nov 16, 2005

Ok, not sure if this is just me, or if it is everyone - and i have looked for information on this a lot but cannot find anything on it.... I do a lot of 'aligning' in actionscript, and to align objects say to the bottom of your page you could do something simple like; my_mc._y = Stage.height - my_mc.height Which worked fine in Flash Mx2k4, but now in Flash 8 objects seem to align directly to the Stage and not the Page so to speak. Was wondering if anyone knew if this functionality had been changed in the new version of flash or if there was a new 'ammended' way of aligning objects on your page regardless of the 'Stage'.

View 9 Replies

ActionScript 2.0 :: Align Stage To The Left?

Apr 29, 2007

I want flash banner to span acros the screen so I put width="100%" and Stage.scaleMode = "noScale"; ok. But, this way all its content is centered. I want it to stick on the left, and so I put this code in it:

Code:
onEnterFrame = function () {
_root._x = 0.5 * (750 /* original document width */ - Stage.width);
}

This works. But the way this thing works when I resize browser window is far, very far from smooth. I tried to change it to

Code:
onEnterFrame = function () {
var rx = 0.5 * (750 - Stage.width);
_root._x = rx + 0.1 /* or another number */ * (_root._x - rx);
}

I am wondering if there is some straightforward way to do this, like some hidden FLA setting, or some Stage/_root property, and if there is no, how the hell to script it?

View 1 Replies

Flash8 :: Full Screen Stage Align In As2?

May 20, 2009

I'm creationg a full screen projector presentation and i'm havin issues with the stage align on full screen. it opens in the middle of the stage and is chopping off the top of the large stage. does anyone know the as2 for Stage.align="T"; ?

View 1 Replies

ActionScript 3.0 :: Align Text To Center Of Stage?

Mar 9, 2010

I've used the following code to create a textField and style it with a little CSS my problem is the textFeild is as wide as the stage and I want to center the text so its in the middle of the stage but when i use the css attribute textAlign the text is almost all the way to the right instead of centered

PHP Code:

var msg19:TextField = new TextField();
msg19.width = stage.stageWidth;
msg19.height = stage.stageHeight;

[code]....

View 2 Replies

ActionScript 3.0 :: Align Movieclip To Stage Dynamically?

Sep 28, 2010

How can do align movieclip to stage dynamically. If i use align panel, Movieclip perfectly aligned to stage. Here i have attached sample image.
 
For the Movieclip the registration point may be change.

View 4 Replies

ActionScript 3.0 :: Align Clip To Stage Bottom?

Sep 25, 2009

The following code blocks create a movie clip 20px high and align it to the bottom of the stage (I add 100px to stageHeight because by default it traces 300 instead of 400). Regardless, both code blocks work when tested in Flash.In HTML however, only the first code block works.The second code block produces a blank HTML page. The second block is so that I can change the footer's height and still have it sit at the bottom of the stage...Considering "footerY" traces 380px, I have no idea how the two code blocks are so different that one HTML page makes the clip visible and the other doesn't.

Code:
var footerHeight:uint = 20;
// var footerY:uint = (stage.stageHeight + 100) - footerHeight;
// trace(footerY);

[code]....

View 5 Replies

Actionscript 3.0 :: Align A Movie Container To The Right Of The Stage?

Apr 7, 2009

I have these 2 lines of code from a tut, but it centers the container. I need it on the right of the screen.

my_loader.x = (stage.stageWidth - my_loader.width)/2;
my_loader.y = (stage.stageHeight - my_loader.height)/2;

View 2 Replies

ActionScript 2.0 :: Dynamic Stage Align In The Bottom

Dec 17, 2006

i have a little problem about a MC.
- I put it on the stage
- I put an action script in my MC wich look like this:

[Code]...

The MC dont move at all, and it isnt in the Bottom of my screen

View 5 Replies

ActionScript 3.0 :: Stage Align For Display Objects?

Oct 22, 2007

I've been putting off asking this question and have tried to resolve it myself since it would seem to be so basic; however after much frustration , here goes:Can a display object (ie an instance of a class loaded from the library such as a filled rectangle {trying to keep this simple} be positioned on the main stage by using the following syntax:myrecTangle.stage.align = StageAlign.BOTTOM;I have created a fairly simple class to load objects to the stage by class type (recTangle) and name (myrecTangle) and all works fine up to the positioning. The objects are created and named properly and are placed on stage; however, they are all placed on stage at 0,0 stage coordinates. I can postion them anywhere using x. and .y values but when I use syntax similar to that above they are still positioned at 0,0. There are no errors thrown. I have also tried to create a sprite for each, load them into the sprite and addChild the sprite to the stage. They are still positioned on stage at 0,0. Is the stage.align/StageAlign syntax peculiar to absolute main stage positioning or am I allowed to use it also for object positioning.

View 1 Replies

ActionScript 3.0 :: Flash Stage Align For Every Child?

Apr 15, 2011

[URl]..i wanna know how he did when resizing the browser all the child are still in there alignment?

i think its about no_scale in different child and stage.

View 2 Replies

ActionScript 3.0 :: Set Stage.align To Center (vertical And Horizontal)?

Jul 9, 2010

How do you set stage.align to center (vertical and horizontal)? StageAlign only defines corners and edges, but I know that centered is possible because that's the default behavior?

View 4 Replies







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