ActionScript 3.0 :: Positioning MCs According To Height?

Aug 24, 2010

I need to create the attached jpg, but i'm not sure of the best way to tackle it. The news posts are loaded from XML and will vary in height so they need to somehow be sorted so that if one is going to come off the page, then it's put into the next page - where the user will click the scroll buttons to view.

1/ Load article from XML

2/ Create a postMC_0 and add article bits to it (date, title, body)

3/ Record height

4/ Create a newsColumn_0 and add postMC_0 to it

Then a loop:

5/ Load next article

6/ Create a postMC_1 and add article bits to it

7/ If difference between postMC_0 height and newsColumn_0 height is greater than the height of postMC_1, then add postMC_1 to newsColumn_0.

8/ If not, then create newsColumn_1 and add postMC_1 to it.

9/ Loop back to 5 (increasing the numbers each time, so postMC_2, etc) Then just make the scroll buttons function according to how many columns have been created..

View 21 Replies


Similar Posts:


Arrays :: Positioning Using Previous Object Y Coordinate And Height

May 4, 2011

trying to loop out some pictures using a for loop and cant get them to be posiotioned directly beneath the previous picture, I have set the height number in my xml where I get the pictures from.[code]This is how the code should look like if you are trying to place pictures directly beneath the previously added picture using a class with parameters, in this case the "LoadExternaly" is that class.

View 1 Replies

ActionScript 2.0 :: Create A Mc Container With Positioning And Width And Height?

Jul 30, 2004

is this how i would create a mc container with positioning and width and height?

var mc = _root.createEmptyMovieClip("photocontainer", 1);
mc._x = 3;
mc._y = 30.5;
mc.width = 440;
mc.height = 345;

View 1 Replies

ActionScript 2.0 :: Positioning Dynamically Created MC's W/ Variable Height Along Y Axis?

Nov 7, 2006

My code works fine as long as all the dynamically created MC's have the same height.he following pulls in data from an array structured as such:

Code:
elements1= [
{file:"image1.jpg", sequence:0, header: "", description:"Text One", VRname: "Sample1" },

[code].....

View 3 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 3.0 :: Resizing A Movie Clips Height Automatically To Match The Height Of Some Dynamic Text

Jul 1, 2010

I am resizing a movie clips height automatically to match the height of some dynamic text that is displayed above it (will eventually be loading it from xml ). is there a way to keep a safe margin top and bottom? this is my code so far Text_Box_Graphic.height = Text_Box.height;

View 2 Replies

Bind A Flex Component's Height To Height Of Browser Window?

Nov 10, 2009

I want to constrain the height of a flex component to the height of the browser viewport.

The component's children are populated from a database table using a repeater, and are basic checkboxes. There are enough of them that the flex app ends up being about twice the height of the screen, which means some of the rest of the layout goes crappy on me. How can I force the component that contains these to limit itself to the size of the viewport?

View 4 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 :: Layout - Set Height Of Accordion To Height Of Tallest Child

Apr 5, 2010

By default the height of an Flex Accordion container is the height of the initially selected child. I'd like to be able to set the height to the tallest child so that no resizing or scrolling is necessary when other children are selected. I do not want to use the resizeToContent property. I want the size of the container to stay constant no matter what child is selected.

My current thought is to extend the accordion class setting the creation policy to "all" and then override the measure function to loop through all the children and find the tallest one and use that for the height. This seems a little kludgy though, so I'd like to know if there is a better approach. Ultimately my question is: is there a way to set the size of an accordion container such that the container never resizes and scoll bars are never necessary to display any of the children?

View 1 Replies

Flash :: Symbol's Height (in Code) Seem Different Than Its Height (in Design)

Jan 11, 2011

I have a bit of graphical content inside a symbol that I've created in Flash CS5. Let's call it FunGraphics_Art, it's set to export, and it extends MovieClip.When I edit the symbol in Flash and I hit control-A, the properties panel tells me that all of the content has a height of 72 pixels, positioned at 0,0.The content consists of a few (classic) textfields, and a couple of Checkbox components and a few bits of vector art.All the content is on a single frame, no layers.So far, so good. I export my art as a .svc and am able to use it all in code just fine. However I then add the following bit of code to my .as file..[code]Somehow, there's something strange going on that's causing Flash to think my exported symbol is about 75 pixels higher than it actually is. I've looked around for invisible "blank" textfields, but haven't found anything yet.

View 2 Replies

Actionscript 2 :: Flash - Set Container's Height To The Height Of The Textfield

May 6, 2011

I've created a dynamic text field, and set autoSize to true, so it can grow was tall as necessary. I then want to use the _height value to size a container graphic (speech bubble). Here's the (simplified) code:

[Code]....

Returns 19.6 followed immediately by 35.2. It's as though reading txt._height causes it to recalculate, so it's correct the second time. I also tried the textHeight property, which also seems to get recalculated after _height is accessed. This sequence, for example:

[Code]....

View 2 Replies

Html :: <object> Height Ignores Parent Div Height?

Aug 9, 2011

I have a problem with an flash object. The object is an expanding topbanner, but when retracted, the on mouse over effect still appears on the invisible part of the banner. The code is the following:

<div id="exp_banner" style="width:930px; height:180px; overflow: hidden; position: absolute; z-index: 100;">
<object type="application/x-shockwave-flash" data="test.swf" width="930"

[Code].....

I have tried to add a style height to the object with an height of 180px, but then the banner scales down.

View 1 Replies

ActionScript 3.0 :: Height Of Scrollbar To Height Of Scrolling Content?

Nov 8, 2009

I made a scrollbar class that works pretty well. I'm trying to come up with an idea for how to set to the height of the scrollbar vs the height of the scrolling content. This is a standard thing that happen in the OS. Seems there should be a minimum number and the maximum value should be reached as the size of the content approaches the size of the visible area.

View 3 Replies

Flex :: Make Height Of SWF == Height Of Content?

May 26, 2009

I am going to embed a Flex app on an html page. The html page is already going to have a scroll bar to scroll up and down. The contents of the flex app are very dynamic, and I don't want to have an extra scroll bar when there is already one. So is there a way to make the height of the swf match the height of the contents of the swf?

View 2 Replies

ActionScript 2.0 :: Set Stage Height To Browser Height?

Oct 8, 2010

Is it possible to get the browser height via flash and set the stage height to that value? I know you can set the height to 100% in publish settings, however one of my scroller scripts needs the stage height to be exactly the height of the content area of the browser.

View 5 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 3.0 :: Set The Height Of The Sprite Depending On The Height Of An Textfield Inside That Sprite?

Feb 2, 2009

Is it possible to set the height of the sprite depending on the height of an textfield inside that sprite? I'm creating a box with a textfield inside it, but I want the box to be sized depending of how much text it is in the textfield..

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

Flex :: VBox Doesn't Add Child If All The Objects' Height Over The VBox's Height?

Jun 7, 2011

I have a VBox with fixed width and height, and I add image objects with fixed width and height. I find that if my objects' height exceed the VBox's height, it doesn't show the object. I tried validateNow(), but it doesn't work. The object is added, but VBox just doesn't display it, so it leaves a blank with a same height as my other object.

[Code]...

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

IDE :: Relative Positioning With X AND Y?

Feb 13, 2009

I'm looking to create something like the link below, [URL].. however I need it to work on both x and y,I've been trying for days to figure out a way to pull this off,

can anyone point me to a tutorial or an example of something along those lines?

View 5 Replies

ActionScript 3.0 :: Positioning Loader For Swf?

Mar 9, 2009

I am trying to position my loader for an external swf. Can anyone help me. Here is the code that I currently have to load the swf. These are the positions that I need x=0, y=180.

Code:

stop();
var myLoader:Loader = new Loader();
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoadComplete);
function swfLoadComplete(loadEvent:Event)

[code]...

View 2 Replies

ActionScript 2.0 :: Positioning And Resizing A .jpg

Jul 12, 2010

I'm using action script v2 to load a .jpg from a button.I'm using the command 'loadMovieNum("photo.jpg",4)'What script could I add in to resize the jpg to specific dimensions and position it at a particular x,y coordinate?

View 2 Replies

ActionScript 1/2 :: Loading And Positioning A Swf Into A Swf

Sep 8, 2010

This is the swf I'm trying to load. These actions load and position a small simple swf just fine and the trace in the onLoadProgress function indicates that it loads completely but I can't see it. What am I doing wrong?

[Code]...

View 12 Replies

Flash :: Get Positioning After Rotation?

Nov 28, 2011

I built an app in flash where you can rotate objects and save positions and rotation to xml.... that xml then feeds html to produce a layout that is then rendered the a pdf It seems that every time it goes to the html, a rotated object in positioned a little to the lower right then the position in flash.

I know the rotation in css in different, but I think if I can find the true top left of the rotated object in flash and pass that it will solve the issue.

I tried this

newx = imageHolder.parent.localToGlobal(new Point(imageHolder.x,0)).x;
newy = imageHolder.parent.localToGlobal(new Point(0,imageHolder.y)).y;
also this imageHolder.parent.globalToLocal(imageHolder.localToGlobal(imageHolder.getBounds(imageHolder).topLeft));

neither work. Is there something else?

View 1 Replies

ActionScript 3.0 :: Positioning And Resizing?

Nov 27, 2010

I have been working on this to no avail. I would like to individually position different movie clips unto my flash site, yet it will only let me position one. Well.. more specifically it will perfectly position rock_mc, but transition_mc wont appear centered until I resize the screen manually. Is there any way I can fix this to have it appear in position from the beggining?

Code:
function init()
{

[code].....

View 1 Replies

ActionScript 2.0 :: Positioning Mcs On The Stage?

Aug 24, 2011

I'm trying to make some mcs be displayed from alpha 0 to 100, one by one in the stage and in random positions. I've managed to make appear it randomly from alpha 0 to 100 with this code:

Code:
mcs = new Array("mc0", "mc1", "mc2", "mc3", "mc4", "mc5");
mc0._visible = mc1._visible = mc2._visible = mc3._visible =mc4._visible =mc5._visible = false;[code]....

The strange thing is that only some mcs are positioned randomly and others stay in the same position.

View 3 Replies

ActionScript 3.0 :: Relative Positioning With X And Y?

Feb 13, 2009

I'm looking to create something like the link below,
[URL]
However I need it to work on both x and y.

View 2 Replies

ActionScript 2.0 :: Top Right Dynamic Positioning?

Mar 8, 2007

how would you go about positioning a MC in the top right hand corner - a few pixels. And How to get it to stay even on Resize? to get it to stay in that corner so it moves with the screen resize?

View 2 Replies







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