On Dec 22, 2008, at 4:05 PM, Alex Harui wrote:

Did you try resizeToContent=true?

When resizeToContent is inserted into either the VBox or the Image, a mistake reads: cannot resolve attribute 'resizeToContent' to that component type.

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Manish Jethani
Sent: Monday, December 22, 2008 12:09 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] how to manage display of 2 images inside a VBox?

On Mon, Dec 22, 2008 at 10:14 PM, kearney_buskirk
<kear...@lightthrumedia.com> wrote:

> The situation: a large photo jpg and a small text png are vertically constrained within a > VBox. The small text png is positioned below the photo in the layout.
>
> The problem is the small file loads first at the top of the VBox and then is pushed down to
> its place at the bottom once the larger photo loads.
>
> So how to program Flex to load the text file after the photo file? Or second choice would be
> for the text file to be constrained to load in its place.

<VBox>
<Image source="..." complete="smallImage.load()" />
<Image source="..." autoLoad="false" />
</VBox>

On the complete event of the first one, you load the second.

> Putting this within the opening VBox tag didn't work:
>
> creationPolicy="queued"
> creationIndex="0"

creationPolicy is really for the container (VBox) itself, not for its
children. That is to say, it does not affect the order in which the
children are created. Moreover, here the issue is not that the second
one is _created_ before the first, it is that the image inside the
second one gets loaded before the first.

--
http://manishjethani.com/



Reply via email to