Flex :: Get The Width And Height Of A Masked Area?

Dec 14, 2011

I am loading an external swf using the SWFLoader component. The swf that is being loaded is masked so that only a portion is being shown. However, when it's loaded the actual size of the swf (loader.content.width/loader.content.height) is the complete swf including the masked area. Therefore, the loaded swf does not display properly in the itemrenderer Is there a way to to grab the size of the just the masked area as opposed to getting the size of the entire swf's contents? also i need to re size the masked area

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Masked DisplayObjects And Getting Height/width/dimensions?

Oct 28, 2009

anyway, so i'm having an issue when getting the dimensions of an image that is masked. I want to get only the dimensions of the visible image, but AS3 seems to only return the height/width of the whole image, even the areas that are not visible (because of the mask).

I could create a custom class that extends the DisplayObject and overwrites the height and width getter to return the dimensions of the mask, but my problem is that I'm placing these masked images into a container DisplayObject, and scaling that container to fit the browser window.

View 6 Replies

Flex :: 4 - Move All TitleWindows Instances Within The Visible Area After Application Change It's Width / Height?

Jun 8, 2011

Is there a nice and not much processor consuming way to move all TitleWindow instances within the application visible area when the application been scaled - change it's width or height ?

View 1 Replies

ActionScript 3.0 :: Height / Width Of Bounding Box Of Visible Area?

Jun 23, 2008

In many cases the pieces have artifacts outside of their visible area. For example, a piece can have a picture of a dog's face, but one of the long ears is off to the side, outside the visible region of the piece. The path data is extremely detailed, so our designers didn't crop it off. They used a mask (at least I think it's a mask, I'm not a graphics guy and know little about that stuff) and this makes it invisible in Flash, when we turn them into movie clips. Also, in Flash when I look at the width and height of the piece, it does reflect only the visible area.However, in ActionScript when I try to get the width and height using, for example

Code:

pieceObject.width

I get the width of the piece including the part that is hidden, i.e. a larger width than the visible area.Is there a way in AS 3.0 to get the height / width of the bounding box of visible area only?

View 6 Replies

Flash :: Determining Visible Area/invisible Area Of A Masked Object?

Sep 29, 2011

I have a movie clip named circle_mc(see the image on the link below) and a mask object(movie clip) which determines visible area of the circle. User can change the portion which is visible (extend the red area and make it red+blue, gray area is invisible). I need to find proportion of visible area to invisible area (red+blue/gray) so that I can calculate angle.

View 1 Replies

ActionScript 2.0 :: [Ask] Object Moving In Limited Area Or Masked Area

Jun 15, 2011

I have Particle animation like this this PHP Code:

[Code]...

But i want that Object moving in limited area or masked area. I add masked area like this PHP Code:

[Code]...

But it still not working. Any advice ?? or correction in my script code?

View 1 Replies

ActionScript 3.0 :: Flash Referencing Stage.width/height References Mc.width/height?

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

ActionScript 1/2 :: Load External Image Of Different Height & Width Into Same Height And Width

Jun 12, 2009

i want to load external images of different height and width into same height and width.

View 3 Replies

ActionScript 2.0 :: Load External Image Of Different Height & Width Into Same Height And Width?

Feb 24, 2010

i want to load external images of different height and width into same height and width.

View 0 Replies

Actionscript 2.0 :: Change Width - Height And Width / Height Ration In Flv?

Mar 25, 2011

I would like to use a movieclip to load a flv video. The problem I have is that I want to change the video dimensions. I've tried several software to change the video dimensions but as far as it seems all of them keep the same height-width ratio than in the original video. Is there any software that would allow me to change the height and width without keeping the same height/width ratio as in the original video file?

View 1 Replies

Flex :: Set The Page Height And Width?

May 17, 2011

I'm looking to print my view to an A5-printer but when I test the print functionality to pdf, I always get a narrow and long printout.

Is there a way to set the pageheight and width? According to adobe help it's read-only.

View 3 Replies

Flex :: X / Y Width / Height Of Actual Chart

May 7, 2010

I wahnt to place a container (alpha red) on top of my chart like on the image.How to get the x, y (point A), width, height of this area?

View 1 Replies

ActionScript 3.0 :: Flex SWF Metadata Width And Height

Jul 30, 2010

I have an actionscript, which makes a dynamic image wall. It gets parameters from FlashVar and changes the width and height dynamically.

When I use

[SWF(width="584",height="290")]

It's fully centered, but when I remove it, it's appear ~+50px from left. How can I set dynamically the SWF metadata or what I need to set for the correct view?

Top of the picture with SWF tag and the bottom is without SWF tag.

View 1 Replies

Flex :: The Same Ratio Width/height Of Application?

Feb 21, 2011

How can I make an application with the same ratio width/height? I have an application with width = 800 height = 600. Its width = 1.33*height and when I change the width to 1024 I want the height to change to 768 automatically.

View 1 Replies

Flex :: Unable To Set Width/height On FlexSprite?

May 3, 2011

I'm trying to set width/height of a FlexSprite object in ActionScript but it doesn't seem to work at all. I'm still a rookie when it comes to ActionScript and I don't understand why I can't set the dimensions of that object. I know I could use a UIComponent but I need something more lightweight since I'm going to add hundreds of them.

public class MyComp extends UIComponent
{
public function MyComp()
{

[Code].....

I plan to add other objects inside the FlexSprite and I need to set their dimensions explicitly as well so I really need to figure out how to do that.

View 1 Replies

ActionScript 3.0 :: Flex - SWF Metadata Width And Height?

May 12, 2005

I have an actionscript, which makes a dynamic image wall. It gets parameters from FlashVar and changes the width and height dynamically.When I use [SWF(width="584",height="290")]It's fully centered, but when I remove it, it's appear ~+50px from left.How can I set dynamically the SWF metadata or what I need to set for the correct view

View 4 Replies

Flex :: Layout: Can Width Be 100% Of The *visible* Area Of A Larger Container?

Nov 30, 2010

I've got the following situation, where I have an outer Vbox that is set at a fixed width, and then inside it there is a header made from an HBox and a content area (Canvas) that is much wider than the enclosing VBox (and therefore requires scrollbars on the outer VBox to see it all).

I would like to set the width of the header to fill the entire width of the outer container, but only the visible part, and to remain fixed so that when I scroll to view the content, the header doesn't move.

[Code]...

View 3 Replies

Flex :: UIComponent's Width And Height Have No Effect On Sprite

Oct 23, 2009

Given this code:

[Code]...

Why does changing the width and height of uiComp not affect the Sprite? Wouldn't UIComponent provide Sprite with a Graphics object, which limits that area where Sprite can draw?

View 1 Replies

Flex :: Width/Height Of Dynamically Loaded Image?

Nov 16, 2009

In my Flex application, I've got a component that extends UIComponent where I'm loading images at runtime and try to display them. I've tried lots of different approaches (using beginBitmapFill(), using different containers), but I can't get things to work as I want. The problem seems to be related to the width and height properties of the image, which aren't updated correctly.The idea is:

var sprite:Sprite = new Sprite();
addChild(sprite);
var im:Image = new Image();[code].....

The image's width and height doesn't seem to be correct when it's loaded. I get width==0 (and nothing is displayed), but the property $width seems to be correct. How can I assure that width and height of the loaded image is updated?

View 2 Replies

Flex :: Calculate Height Of Text (width Fixed)?

Nov 18, 2009

I want to create a text box with a fixed width that will fit itself to its current text. So I went ahead and wrote this simple application[code]...

View 2 Replies

Flex :: Changing Width / Height Can't Affect Contents

Jul 13, 2010

I thought I had a handle on AS3, DisplayObjectContainers, etc. but this basic thing is really confusing me: changing the width/height of a sprite does not affect it's visual contents - either graphics drawn within it or any children it may have.[code]...

View 2 Replies

Flex :: Get Visual Width And Height Of A Rotated Component?

Jul 25, 2010

I'm playing around with code like this:

<s:Button id="test" label="test" transformX="{Math.floor(test.width/2)}" rotationY="20" x="20" y="20" />

The button is rotated on the Y axis and the rotate pivot is in the middle of the button.

This will create a button that looks something like this[code]...

I put together a sample to show off the various approaches for calculating this that people are suggesting. The source code is also available. Nothing is quite working like I'd expect. For example, turn the rotationSlider to 85. The button is effectively invisible, yet all approaches are still giving it height and width.

View 3 Replies

Actionscript 3 :: Flex - Dynamic Width/height Change

Aug 29, 2010

Is it possible to dynamically (not in the project's options) change the dimensions of the stage by using ActionScript 3? I'd want to create a 400x300px loader, but I also want it to load animations that have bigger or smaller dimensions. I would then change the width and height of the loader to make the loaded animations fit well. Is there any way to do that?

View 1 Replies

Flex :: Detect Screen Width/height Change?

Dec 2, 2010

I have objects placed on the screen using x/y coordinates. I want a way to update that based on changes in Screen Width/Height. So if used re-sized browser window x/y should change. How do I cick off a function every time the screen is re-sized.

View 3 Replies

Flex :: Size Get Width And Height Of Embed Image

Jun 13, 2011

I have the follow declaration :[code]How can i determine "img6" width and height ?

View 1 Replies

Flex :: Border Container Maximum Width And Height?

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

ActionScript 3.0 :: Flex BitmapData Dimensions (Width And Height)

Jan 20, 2012

I'm new to flex and I have a question concerning bitmapData and its width and height. Normally you set up bitmapData like this in AS3:
Code:
var bd:BitmapData = new BitmapData(100, 100, true, 0x00000000);
var bm:Bitmap = new Bitmap(bd);

But in Flex embedding an an image works like this:
Code:
[Embed(source="../../../../../assets/sprites/asteroids/asteroid_32_full.gif")]
public static const Asteroid1:Class;
var imageBM:Bitmap = new Library.Asteroid1();

When using the bitmapData (e.g. imageBM.bitmapData) I don't have to set up width and height any more. Does the Flash player know the width and height of a bitmapData automatically even when NOT setting up the bitmapData's width and height? I'm totally unaware about this topic because I don't know whether the Flash player always knows the dimensions of a bitmapData. Could this cause problems when not setting up the dimensions of a bitmapData?

View 2 Replies

ActionScript 3.0 :: Get / Set Correct Height For Masked Object

Sep 12, 2009

I'm building a class for a data grid that creates everything dynamically, and allows the user to add buttons to a cell easily. If the user defines a height for the dataGrid that's smaller than the content, the content is cropped and a scrollbar is added. Now here's where my problem occurs. Once the content is masked, and you then try to access the .height property of the dataGrid, it will return the height of the dataGrid + the masked content.So I added a get/set override function for the .height property. Now this works, but only if I'm constantly updating the height as I create my dataGrid. What I'm curious about, is how (when the properties aren't overridden) when you add a child to a MovieClip, it's .height property is updated automatically? For example if you have

ActionScript Code:
var par:MovieClip = new MovieClip();
// each Cell is 20px tall.
var cell1:Cell = new Cell();
var cell2:Cell = new Cell();
par.addChild(cell1);
par.addChild(cell2);
trace(par.height);

The .height will equal 40px. Is there a set somewhere inside addChild that updates the .height property, or is there a different way that they do it? Basically I'd like to override the .height property after a certain amount of the dataGrid is built (to compensate for the difference in masked content height), but since the override happens from the very beginning, I'd like to know if there's a better way of setting my MCs height rather than constantly setting it as I build the grid. Or better yet, is there a way to get the proper height of an object that contains masked content without having to override the height?

View 1 Replies

ActionScript 2.0 :: Change Widht, Height And Width/height Ration In An Flv Video File?

Mar 25, 2011

I would like to use a movieclip to load a flv video. The problem I have is that I want to change the video dimensions. I've tried several software to change the video dimensions but as far as it seems all of them keep the same height-width ratio than in the original video. Is there any software that would allow me to change the height and width without keeping the same height/width ratio as in the original video file?

View 3 Replies

ActionScript 2.0 :: [FMX2004] Resize Images In Flash To Fit The Masked Area But Proportionately?

Jan 24, 2006

Basically I'm trying to resize images in flash to fit the masked area but proportionately....

My mask area is:

Code:
width = 478;
height = 420;

now consider that the the max width I want my pictures to be. This doesn't have to be exact. Now what I came up with to resize proportionatly is:

Code:
//width & height are my mask deminsions ( which i wanna resize my pics to)
//width_orig & height_orig are the deminsions of each new loaded pic.
height = (width / width_orig) * height_orig;
width = (height / height_orig) * width_orig;

That does scale them proportionatly but some of the times it will resize a lil bit smaller than the image area which I don't really want. Like I said this doesn't need to be exact. I would prefer it to be a lil bit bigger than the masked area. I just need to make sure the pics are scaled proportionatly.

View 1 Replies







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