[flexcoders] Re: ViewStack init images problem

2008-07-09 Thread doubleyoucue
Thanks but no dice.
I tried to explicitly set the dimensions on the mx:Image but still had
the same flicker result on the transition. For that matter I tried
to explicitly set the same image dimensions on it's containing mx:Box
and the ViewStack as well... but the same thing happens.

The best short-term workaround I could muster was to set the initial
selectedIndex to the second image which loads it, then set the
ViewStack to it's proper position via a actionscript call later. The
flicker behavior is still there, but I think it's slightly less
noticeable on the first image when the application loads then on the
second (but still a bit ugly).

Here's my ViewStack if anyone can see anything wrong with it:

mx:ViewStack id=bgImageStack
  width=100% height=100% creationPolicy=all selectedIndex=1
  creationCompleteEffect={blurIn}
mx:Box width=1024 height=768
  horizontalScrollPolicy=off verticalScrollPolicy=off
  hideEffect={blurOut} showEffect={blurIn}
mx:Image
  source=@Embed('assets/images/background/myBig01.jpg')
  width=1024 height=768 scaleContent=false
  horizontalAlign=left verticalAlign=top/
/mx:Box
mx:Box width=1024 height=768
  horizontalScrollPolicy=off verticalScrollPolicy=off
  hideEffect={blurOut} showEffect={blurIn}
mx:Image
  source=@Embed('assets/images/background/myBig02.jpg')
  width=1024 height=768 scaleContent=false
  horizontalAlign=left verticalAlign=top/
/mx:Box
/mx:ViewStack




Alex Harui [EMAIL PROTECTED] wrote:

 The problem usually has to do with the fact that images are loaded
 asynch so they don't get measured properly the first time.
 
 If you know the size of the image, set the mx:Image to that size so it
 will hold space for it when it comes in.




RE: [flexcoders] Re: ViewStack init images problem

2008-07-09 Thread Alex Harui
That's a big image so I would expect a flicker as there would be a delay
before the image finishes loading, especially once you deploy to a slow
network

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of doubleyoucue
Sent: Wednesday, July 09, 2008 9:37 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ViewStack init images problem

 

Thanks but no dice.
I tried to explicitly set the dimensions on the mx:Image but still had
the same flicker result on the transition. For that matter I tried
to explicitly set the same image dimensions on it's containing mx:Box
and the ViewStack as well... but the same thing happens.

The best short-term workaround I could muster was to set the initial
selectedIndex to the second image which loads it, then set the
ViewStack to it's proper position via a actionscript call later. The
flicker behavior is still there, but I think it's slightly less
noticeable on the first image when the application loads then on the
second (but still a bit ugly).

Here's my ViewStack if anyone can see anything wrong with it:

mx:ViewStack id=bgImageStack
width=100% height=100% creationPolicy=all selectedIndex=1
creationCompleteEffect={blurIn}
mx:Box width=1024 height=768
horizontalScrollPolicy=off verticalScrollPolicy=off
hideEffect={blurOut} showEffect={blurIn}
mx:Image
source=@Embed('assets/images/background/myBig01.jpg')
width=1024 height=768 scaleContent=false
horizontalAlign=left verticalAlign=top/
/mx:Box
mx:Box width=1024 height=768
horizontalScrollPolicy=off verticalScrollPolicy=off
hideEffect={blurOut} showEffect={blurIn}
mx:Image
source=@Embed('assets/images/background/myBig02.jpg')
width=1024 height=768 scaleContent=false
horizontalAlign=left verticalAlign=top/
/mx:Box
/mx:ViewStack

Alex Harui [EMAIL PROTECTED] wrote:

 The problem usually has to do with the fact that images are loaded
 asynch so they don't get measured properly the first time.
 
 If you know the size of the image, set the mx:Image to that size so it
 will hold space for it when it comes in.