I believe you are looking for the viewActivate event. It will be fired after the view transition is complete.
If you find you have Views that are taking a long time to create this post might be useful: http://flexponential.com/2011/10/05/performance-tuning-mobile-flex-applications/
Here's my scenario:-
A View shows thumbnails of all say 20 photos. When user clicks/taps on a photo, an API call is made to get the full photo and then displayed in full screen. When the user swipes, an API call is made again to get the next photo and it is displayed on the screen. Basically how the default image gallery works in Android.
I have been able to get this done but on every swipe the API needs to be called and this results in a wait time causing the user experience to be kind of bad and I want to make that experience better.
Here's a test I did:-
I added trace statements to the following 2 events:-
2. complete event of my image control.
I noticed that the complete event was called after the viewActivate. However, the photo in my view was not displayed until after the complete event was completed.
I was looking for an event after the photo is displayed and looks like there isn't any. Am I right?
You'll probably want to wait for the ready event on Image/BitmapImage. This is similar to complete except will still fire even if the image is coming from a cache.
It sounds like you are pushing a new view for every image. I would probably approach this a little differently and have a single View with a full screen List with paging (this is easy in Flex 4.6: http://opensource.adobe.com/wiki/display/flexsdk/Item+Snapping).
I highly recommend watching Glenn Ruehle's talk from MAX 2011: http://tv.adobe.com/watch/max-2011-develop/best-practices-for-building-flex-tablet-applica tions/
He talks about avoiding loading images during view transitions because you never know when that load will complete and it could come back during the transition causing a slower transition frame rate.
I did stumble upon that video while I was searching and was elated when I saw his list with paging functionality only to realise it was not available in Flex 4.5.
That approach is the certainly the best but that kind of brings me back to my orignal problem which is that the API only allows one hig resolution image to be fetched at a time so I need an event where I can call up that API multiple times and fetch more items in the background and add it to the list without any stuttering or impacts to what the user is viewing currently.
By the way, the API I am talking about is the 500px API. Any idea how the 500px iPad app or the ISO500 iPhone app managed to pull this off. There is very little delay when I slide from one image to the other on those apps.
I was mistaken. It does look like ViewActivate is a good option for making additional API calls. The initial image (from the first API call) gets displayed as soon as it's available and the remaining API calls continue after that in the background.