UIComponent.addChild makes the elements to be visible outside the box

Hello

I'm new with flex and actionscript, so...

I want to add some sprites inside the container (UIComponent) and this container to act as a "video zone" - painting only within limits of limit elements. I want to use this code for the custom horizontal scrollingcontainer.PNG

Thank you

It's code:

package

Import flash.display.Sprite;

Import MX. Core;

Import util.*;

{

public class HorizontalImageContainer extends {UIComponent

public var bgColor:int = 0xFFCCFF;

private var itemWidth:int = 62;

private var itemHeight: int = 62;

private var innerSpace:int = 8;

private var bgColors:Array = [0xFF0000, 0x00FF00, 0x0000FF];

private var items: Array = new Array();

public function HorizontalImageContainer (width: Number = 500, height: Number = 80, bgColor:int = 0xFFCCFF) {}

               super ();

               this .bgColor = bgColor;

               this .width = width;

               this .height = height;

               this . clear ();

createItemsForTesting();

               this . graphics.lineStyle (1, 0 x 000000, 0.5, , true,);

               this . graphics.drawRoundRect (0, 0, 1-width, height-1, 7, 7);

}

private function createItemsForTesting():Sub { }

               for ()var i: int = 0; i < 20; i ++) {}

                    var x: int = i *(itemWidth+innerSpace);

                    var y: int = 0;

                    var bgColor:int = bgColors [i %3];

                    var : string text = (i + 1) + "" ;

                    var point: Sprite = new Sprite();

Item.x = x;

Item.y = y;

item.graphics.lineStyle (1, 0xFFCCFF, 0.5,

true );

item.graphics.beginFill (0xFFCCFF, 1);

item.graphics.drawRoundRect (0, 0, 1-itemWidth, itemHeight-1, 7, 7);

Items.push (Item);

If (I > itemsInRow-1) {}

Item.Visible = false;

//}

                    this .addChild (item);

}

}

}

}

Try setting the scrollRect on your parent component:

http://livedocs.Adobe.com/Flex/3/langref/Flash/display/DisplayObject.html#scrollRect

This can also help you with your scrolling.

Tags: Flex

Similar Questions

  • When I type text, the text is in a box, and I can't figure out how to make the box go away. I never had this problem before.

    When I type the text in the latest Illustrator, the text is in a white box. I never had this problem before. I can't find out how to make the box go away. What I am doing wrong?

    Today I tried to close Illustrator and re-boot the computer. It did not help. I went on a second computer video/graphics/animation and open Illustrator here. I did a few tests, and he managed to create the text without a box. Then, I opened my first computer Illustrator file form. The boxes were there. I tried to type the new text, and the box was there. When I open the file it says something about a missing font and a replacement. I tried to use this area to locate the police but couldn't. It's the default font on Illustrator on the other computer. A variant of Myriad. I tried to type in the text with a different font. No box. The default font selected by the Illustrator has apparently a box. I didn't try to change the font because it was going well, and because I didn't know any font came with a box. At first, I did all of the text, which was on a white background, so I don't see the boxes of cream. When I added the background image of the boxes appeared. If the problem is resolved. It was a font with a box.

  • Make the box work

    Have we lost 'make the box work' in first CC?

    You can enable or disable the work area bar menu of wing of chronology.

  • Make the boxes

    Does anyone know how to create check boxes in indesign. Online, I see a lot of interactive discussion forums boxes but all I need is a little small box. I don't want to create the area with the rectangle tool, if I have to.

    Thank you

    Checkboxes

    You cannot create form elements to fill with InDesign, you will need the full version of Acrobat for that. You can add visual elements to the form fields, such as blank lines for the name, address, etc. and squares for the boxes. Usually, I use a lowercase n in Zapf Dingbats and give it no fill and a black stroke. You can also use a grounded regrangle. Draw a rectangle, copy it, then paste it into your text block when you edit the text. Right-click on the rectangle to change the anchored object Options, and then copy and paste it (as if it were text) for each copy.

  • Can you make the box 'dX and dY' go?

    I am working on a logo and need to move some objects and align with other elements in the document, but this small "dx: dY 0: 0.04 in ' box appears and blocks my visibility. Is there a way to disable this check box? A link to a screenshot of what I'm talking about you is below.

    http://I57.Tinypic.com/20ssltj.PNG

    Garrett,

    You can have a loook at the settings for the Smart Guides and get rid of unwanted things.

  • Firefox not to remember passwords. I check the "Remember passwords for sites", however, whenever I restart Firefox, uncheck the box "Remember passwords for Sites". How can I make the box "Remember passwords for Sites" stay enabled?

    I'm running on a platform of Windows 7 desktop. I have looked for similar problems in a number of forums, but have not seen all the signs that work in my situation.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance/themes).

  • How to keep or make the area outside the transparent cutting tool. For me he is white and comes when I print

    I like to use the cutting tool and the photo frames.  For example, I use an oval frame that leaves the edges of the original outside the image. Initially the air transparent edges, but they are white and show when I print I do not have a completely white background

    How to make the box really transparent outside - or adjust?

    rross43 wrote:

    I like to use the cutting tool and the photo frames.  For example, I use an oval frame that leaves the edges of the original outside the image. Initially the air transparent edges, but they are white and show when I print I do not have a completely white background

    How to make the box really transparent outside - or adjust?

    If you save your picture in jpeg format, you cannot have transparency. The jpeg format simply doesn't support transparency. You must save in .png, .psd, .tiff formats.

    Note that the layer "background" in the layers palette must be transformed into a 'standard' layer to keep the transparency. Menu layer > New > layer.

  • Text disappears in the box once hit enter

    After you have clicked on enter, what I type is not visible. A red box with the sign more will appear in the lower right. It doesn't matter how big you make the box, the text never appears. Even if I get back to the text, it shows what existed before the Enter key. I've done everything I know how and can not get my text box to work properly. I reinstalled the program and reset all settings. I am at a loss and have the work I need to do! Help, please!

    The Enter key on the numeric keypad is a default column break. Some portable computers map the two enter keys together, and in these cases, the number lock toggle usually affect the behavior that see you.  Best way around, is changing the shortcuts keyboard and mak that BOTH enter keys a paragraph break in text mode.

  • increase the size of the box of nativgate

    How can I make the box to navigate more grand so I can see the different option

    Thank you

  • Make the subform visible in the drop-down list

    I have two drop-down lists in my form. I used the switch-case causes the option chosen in the drop-down list 1 to fill available items in the dropdown list 2. Depending on the option chosen in the drop down 2, I need to make the field visible or hidden. I don't know where I get the value of my if statement to make the field visible or not.

    Thank you

    MDawn

    Hi MDawn,

    Populating drop-down lists (DDL) is done by element pairs: addItem ("DDL text element displayed", the value of the element DOF) for example: ("Item", 1).

    You can access the value of point DOF using the output of the DDL event. Place a script here "this" to refer to the value of point DOF.

    For example, a script like

    If (this.rawValue == "1") {}

    Subform1. Presence = "visible";

    }

    will reveal the subform after the user selects a DDL element that has the value "1".

    In addition, you can consider using the preOpen event DDL to fill the 2nd drop-down list box. It allows to populate the drop-down list when clicked - this allows you to do a number of things such as check no matter what value of objects or more objects to their values before you decide what elements should be populated in the drop-down list box. It is powerful enough way to do this because it opens up a whole series of things that you were not able to do otherwise.

    I hope this helps.

    Stephen

  • How can I make the best use of a new external hard drive and a new catalog full of photos just loaded into Photoshop elements 14 Organizer?

    How can I make the best use of a new external hard drive and a new catalog full of photos just loaded into Photoshop elements 14 Organizer?

    Keep all the files on external hard drive image?  Nothing else and no pictures on the desktop?

    Keep all image files both places?

    What is the best way to go through thousands of images in the Organizer to identify and place them in files?

    Once I've placed a file, I just leave it in the entire catalog or a way indicate to me that it has been sorted?

    As overwhelming, any tips/shortcuts/schemes, you can offer are welcome!

    As I only have the version of the EP, here is some info on the organiser:

    https://helpx.Adobe.com/Photoshop-elements/how-to/use-elements-Organizer.html

    Independent of how this feature works, you want to have your photos in one place and have a backup (second copy) somewhere else. All hard drives will not be successful at some point - some more early, some late - never trust to have your files in any safety devices if they are on a single disc. Once you have your sorted, it would be useful that you will organize/name/tag new photos immediately if the task is relatively short and simple. I copy my photos on my internal hard drive for my camera, take a quick look with preview to see who needs some changes and then decide where to put them - either drop them immediately after naming them or bring in an editing application and then file them away.

  • How to make the cursor more visible healing

    Hello

    I ask your help to find the answers to 2 issues related both to Adobe Lightroom and Photoshop.

    1. I use the remove task L R and Spot healing in Photoshop.  A few times I'm going to remove a stain, and the background makes the cursor so light that it would be difficult to see.  I wonder if I can darken or change the color of the slider so it would be visible.

    2. when I remove a task in Photoshop, I can go over the same area that I removed a task and do more remove or modify.  In the case R L I need cancel first healing I did and start a new one.  It's a little irritating and I wonder if I can do the same thing in L R.

    Thank you all for your help and your support.

    MB

    You cannot change the cursor in LR, but if you press A, the tasks will be displayed in black & white. Press A again to disable the visualization.

    Every place you heal in Lightroom is represented by two circles - a place where you click and one for the source. To change a spot, click on the place, then it becomes active, and you can change the size, or drag the circle to the source somewhere else. You can also change the size, feather and opacity in the spot light modify Panel.

    Spot healing in Photoshop is done by changing the pixels, while in LR, it's done with metadata.

    Large healing spot in LR will be, as you may have noticed, slow LR to a crawl, so if you have many tasks in an image, it is best done in PS.

  • PS 14 elements cannot make the Photomerge Panorama

    I recently bought 14 items PS but am shocked I can't take photos to make the panorama.  The reference guide is clear that we can and I followed the instructions.  I see many others in the forum with the same problem.  Please tell me what to do.

    Peter T

    pt50688362 wrote:

    I can't even try because Photomerge Panorama option isn't there yet.   It used to be under file-> New->...  Now, under those he only has 2 options: file 1) Blank, Image 2) from the Clipboard.    I still have my old Elements 9, so I'm going there first, make Panorama and then change the rest to 14 items.

    I use Windows 10 and I've also updated 14 items and still no results.  I think Adobe has corrected the error before anyone can do anything...

    I think this is the third post today on the change of Photomerge in elements:

    Where is now panoramas into 14 pieces.  I spent hours trying to find it. It was obvious in 12 items and all just great. Help.

    ... and we get at least one every day since the release of PSE14!

    But apart from that, there are more problems with Photomerge in PSE14 than in previous versions and it is good if you can provide details for troubleshooting.

  • I finally got CS2 installed on my system. But now the menu background color is black and the elements are not visible until the cursor is over them. It is very difficult to read. How can I change this?

    I finally got CS2 installed on my system. But now the drop-menu background color is black and the elements are not visible until the cursor is over them. It is very difficult to read. How can I change this? I tried to go into change preferences but it does not work

    I changed it to the value default them and that worked. Thank you very much

  • Is there a way to make the vector lines (Path) more Visible in Photoshop CC on OSX?

    Is there a way to make the vector lines (Path) more Visible in Photoshop CC on OSX? Just passed from the CS6 in the CC, and it is very difficult to see when they are in fact seen visible.

    Apart from excellent advice from Terri, there is no way to really change how the paths appear - nevermind, I could use those more visible as well.

Maybe you are looking for