ActionScript 3.0 :: Setting The Height Of My Viewing Area?

Nov 4, 2010

// set the height of our viewing area to one pixel less // than the y-position of our dividing line picCanvas.height = divider_mc.y - 1; ?

View 1 Replies


Similar Posts:


Actionscript 3.0 :: Setting The Height Of Viewing Area?

Nov 5, 2010

Code: Select all// set the height of our viewing area to one pixel less // than the y-position of our dividing line picCanvas.height = divider_mc.y - 1;?

View 1 Replies

ActionScript 3.0 :: Finding The Size Of The Stage/Viewing Area

Dec 18, 2009

How do I determine the pixel size of the stage or viewing area defined in Flash CS4? Isn't it just stage.width and stage.height?

Okay now the long version:

I'm working on a script in AS3 and Flash CS4, and I'm doing some art by code.

I wanted to make a progress bar for a preloader, so I made a Preloader MovieClip and on that movieclip I drew a white rectangle, and I told it to appear at stage.width / 3 and stage.height /3. It drew it at the top corner instead, and after a lot of experimentation, and reading the ActionScript 3.0 Language and Components Reference I found that a display object's width and height are defined by their contents, and you can't manually alter them to be bigger. So I figured that I could make an invisible rectangle the size of the stage in the background of the preloader MovieClip and that would make it the size of the stage, but I realized that I would still be stuck manually setting the stage size to match what I wrote in ActionScript. Untill the MovieClip containing the Preloader was added as a child object to the stage, which would then set the stage.width and stage.height to match those of the contents.

Now that I talk about it, I suppose I'm looking for the size of the perspective or viewing window, rather than the stage. The stage can be larger or smaller than the viewing window in Flash, can't it? But the perspective of the window is finite, unless you change it.

The thing is I'm sure I've polled this information to position an object at the center of the viewing area before, but I can't for the life of me remember how. So, that's what I'm asking; how do I find the dimensions of the viewing area, so that I can either position an object at the middle, or create an object the size of the viewing area, by code?

View 5 Replies

ActionScript 3.0 :: Zoom And Move The Viewing Area Around On The Site Layout?

Mar 13, 2009

I'm trying to create a site where all of its sections are laid out side by side and the user can zoom into each section to check it out, just like this site: [URL]I have the actionscript that allows the user move the viewing area around, but im not sure how to incorporate the zooming into it. What I need might be something different entirely. Here's that:

on (release) {
_root.motionx = -950;
_root.motiony = -700.0;
_root.motionScale = 100;
}

View 2 Replies

Flex :: Setting Spark List Height To Its Content Height?

Apr 1, 2010

How to set a Spark List height to the height of its content?Tried this:

var lastRow:IVisualElement =
myList.dataGroup.getElementAt(myList.dataGroup.numElements - 1);
myList.height = lastRow.y + lastRow.height;

It works in case of a single item, but lastRow is null in case of more items.

View 5 Replies

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

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

ActionScript 2.0 :: Expanding Canvas Area (500px In Height)?

Jun 14, 2007

Is it possible to expand my canvas area, for example, 500px in height with AS?

View 2 Replies

Flex :: Setting Content Area In Custom Component?

Dec 11, 2009

I am trying to define the content area of a custom component that extends mx:VBox. The component has predefined headers and footers (visual children) and I want to set the area in the middle for adding children to the component. The component will be used like this:

<custom_component>
<mx:button/>
</custom_component>

How would I set this content area?

View 3 Replies

ActionScript 2.0 :: Setting / Getting FLV Height And Width

Feb 19, 2008

Is there a way to retrieve and set the height and width of an FLV/Playback object via actionscript? I was hoping I could interact with the values via simple _height and _width properties, but that seems to offer all kinds of unexpected results in Flash (like reporting width in the thousands when the width is actually under 300, etc... height seems much closer to reality, but still off.)

View 1 Replies

ActionScript 2.0 :: Setting Browser Width/height?

Apr 9, 2007

I built out a scrolling Flash application that currently resizes the browser to whatever the full-screen res of the user's monitor is... I'm kind of indifferent about it.Anyhow, I'd like to be able to set the browser size to a specific height / width instead of taking up 100% of the user's screen real-estate.

View 1 Replies

ActionScript 3.0 :: Setting Width And Height Of External Swf?

Oct 9, 2009

How can I set the width and height of a external swf when it is loaded in to the holder?

View 1 Replies

ActionScript 3.0 :: Drag And Drop Function - Setting Target Area For Object

Mar 20, 2009

This animation is for a kindergarten course. I have 6 different colored teddy bears on the
floor and the bears are to be placed on the middle shelf in the room, in no particular order. I have the code in place to drag the bears, and they return to their original location if dropped in the wrong area. Everything works, except I can't make the bears stick to the target area. The target area has to be the same for all 6 bears.

View 17 Replies

Actionscript 3 :: Setting Width And Height Of A Sprite Container?

Feb 27, 2011

I know this might seem like such an easy issue and I can't understand why I cant figure it out but none the less I can't and I've just about given up. Here's the issue:

I have a sprite container which is supposed to hold a bunch of thumbnails to videos. I am able to populate the container with all the videos and the whole works but obviously if I add a bunch of videos its going to exceed the size of the flash document so I need to add a UIScrollBar (which I did) now the scrollbars target is set to the container but isnt allowing me to scroll and if im correct this is because the container doesnt have a set height. So Im trying to set the height of this container but the second I try setting the height or even width all my thumbnails I used to be able to see are gone! It's as if the size is being set to 0 when its not I've even tried to set it to a specified size just to test and nothing.

[Code]...

View 1 Replies

Flex :: Setting The AdvancedDataGrid's Row Height While AdvancedDataGridRendererProvider Rendering

May 10, 2011

Not able to setting height of row in AdvancedDataGrid using custom AdvancedDataGridRendererProvider datagrid renderer.

Snapcode as here

<mx:AdvancedDataGrid id="docId"
visible="true"
width="100%" height="100%"

[Code].....

View 1 Replies

Flex :: Get Label Height After Setting Text Property?

Jun 17, 2011

I'm looping through a recordset, and for each item I create at runtime a spark Label and set the text property from a field of the recordset. The labels must have a fixed width and some text goes multiline. I want to arrange the label vertically so I need to know the height of the label so I can place the next label properly, but when I try to read this property, after the labels is added through the addElement mehtod, it returns 0.

how to get the label height?

View 1 Replies

Flex :: DataGroup - Setting Height Of Item Renderer

Nov 28, 2011

I've been playing around with renderers the last few days for a mobile application. I'm creating a gridlike renderer that has columns that is light weight for a mobile app. It is a bit of a poor man's datagrid. The layout is fine. The question I have is controlling the height of each row in the list.

When measure() is called, I set the measuredHeight to:
measuredHeight = getElementPreferredHeight(ld) + verticalPadding;
Where vertical padding is:
var verticalPadding:Number = getStyle("paddingTop") + getStyle("paddingBottom");

When I debug on the desktop, the measuredHeight is set to 12 and on the device (Motorola Atrix), it is set to 12. But when layoutContents is called, the unscaledHeight is a number much larger than my measuredHeight value (44 on the device, 66 when running on the desktop), resulting in more vertical whitespace surrounding each item than I care to have. How do I control that row height? I happen to be using a Datagroup for this particular example but in some playing around I did with just a simple list, I had the same issue. Somewhere the system is overriding my measuredHeight with some other value.

View 1 Replies

ActionScript 3 :: Setting Windows Initial Width And Height?

Jan 18, 2012

I am working on a Flex mobile application and I want to set initial windows width and height in as3. When my app runs on Desktop, I want to detect screen resolution and set it to windows bounds, something like that
this.width = Capabilities.screenresolutionX
this.height = Capabilities.screenresolutionY

View 1 Replies

ActionScript 3.0 :: Setting The Height And Width Of Dynamic Text?

Feb 5, 2009

I am using this script (3.0) to set the text of a dynamic text field...

stop();
my_Btn.addEventListener(MouseEvent.MOUSE_OVER, onMouseover);
function onMouseover(event:MouseEvent):void

[Code].....

How do I set the height and width of the text?

View 1 Replies

ActionScript 3.0 :: Setting Width And Height Properties Of A Loader

Feb 19, 2009

I want to bring an image in from a folder and then display this image in a specifically sized box.[code]So obviously I want the image loaded into a 200 x 200 box (the image is 1200x1200) and scaled proportionately. What do I need to do? The box won't resize at all.

View 6 Replies

ActionScript 3.0 :: Setting Width And Height Not Working But ScaleX And Y Are?

Sep 28, 2009

let me know what i am doing wrong here. this DOES NOT WORK.

ActionScript Code:
//add image
imageLoader = new Loader();

[code]......

View 2 Replies

ActionScript 3.0 :: Dynamically Setting Line Height / Kearning?

Jan 5, 2010

I keep feeling like this is just a case of not RTFM hard enough, but I'm just not seeing the answer. Is there a way to use AS3 to dynamically set leading in a dynanmic text field?I've found the getLineMetrics function, which returns a TextLineMetrics instance. This instance can tell me what my leading already is, but when I try to change the value I see nothing change onscreen. Likewise, I don't see any setLineMetrics function to go along with the text field. Is there just no way to change it?

View 4 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 :: Load SWF Into Level And Setting Height/width/location?

May 30, 2011

I gave up on Flash heavy coding when it switched to AS3. Always thought it was less intuitive, longer, and a brand new language and I got tired of trying to keep up when most of my clients did not want to pay for a full flash site. But I got this client...
 
Here's the problem, I can load a swf into my main stage or into an MC , but I cannot find out anywhere how to set parameters or load into a level so it doesn't replace the current material or fix to a size that doesn't block my other material.[code]...

View 5 Replies

Flex :: Resizing A Spark Group By Setting Width And Height?

Apr 28, 2011

I have been given the seemingly simply task of resizing a Group container by setting width and height explicitly in response to user interaction. However, changing these values have no effect on the size of the container at all. Changing scaleX and/or scaleY will change the size of the container just fine, but this is not the behavior I am after.I have tried overriding updateDisplayList() to set a specific width and height, but this has not yielded the desired results.

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

[code]......

View 2 Replies

Flex :: Setting A Group Container Height To 0 Does Not Hide His Children?

Feb 21, 2012

I need to resize a Group using myGroup.height = 0. And it works, but myGroup's children are still visible, I do not know why...

View 1 Replies

Actionscript 3 :: Setting A Spark List To 100% Height Inside Of A TabbedViewNavigatorApplication?

Mar 3, 2012

I'm trying to set a Spark list control to 100% height of a View inside of a TabbedViewNavigatorApplication.

<s:List dataProvider="{dp}" itemRenderer="renderers.Renderer" width="100%" height="100%" />

Using this I can't seem to get the list to fit to the view, it always ends up being much too tall.I'm testing using the Flash Builder mobile profile, the results seem to be the same across all phones. Setting the height to some number under 50% seems to bring the list closer to full width but it's not consistent across phones.

My app container is set for 160DPI

<s:TabbedViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="160" applicationComplete="init(event)">

I haven't come across this issue until I started using TabbedViewNavigatorApplication, 100% seems to work fine in a standard view based application.

View 2 Replies

ActionScript 2.0 :: Setting An Empty Movieclip Default Width / Height

Aug 20, 2006

I have a movieclip with the instance name of "container_mc" that I am loading a external swf file into.When I trace(container_mc._width) after the preload it returns 0.Is there any way to tell the movieclip to stay at a width of 760px and a height of 460px regardless of the content that is loaded?Reason being, I then have a function that positions the container_mc movieclip in the center of the stage based on the Stage.width/height..The only way I have been able to get this to work thus far is to have a 760px by 460px square shape, position the movieclip.. then load the content to replace the square shape however I'd rather be able to default everything without having to do that.

View 3 Replies

ActionScript 2.0 :: Setting Final Mc Position Depending On Text Height?

Jun 1, 2003

I have an empty mc called "attachmcextra".Into this empty mc is attached another mc called "mcnote" that contains a texto box named "loadnote". So it`s path would be:_root.attachextra.mcnote.loadnoteThe following code is set to the mc "attachextra":

onClipEvent (load) {
//set inicial position
this.posY = 20;

[code]....

View 1 Replies

ActionScript 1/2 :: Decrease Hit Area - That Mouse Out Of To Make The Drop Down Area Pull Back?

Jul 28, 2009

i have a drop down menu am working on and each button tab (although they are not button instances !) when clicked opens up the "drop down" section which you can mouse over to choose another specific button etc - if you mouse out of that drop down area then it pulls back up to the original tab state ..  what do i change to the code below to decrease the area that you mouse out of to make the drop down area pull back .....at the moment it at least two inches on the screen below and to the right of boundaries of the drop down box before it pulls up - i want to it pull up as the mouse leaves the boundary box .... hope this makes sense .... there is some part of the actionscipt below that controls this but can work out which bit and how to change it !!! (am guessing the x mouse and y mouse bits - but how to change it ???)

[Code]...

View 1 Replies







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