Great to hear :) Caveman coding might not be the fanciest, but it usually
work ;)

If you want to go a little less "neanderthal" to a more "homo sapiens"
approach (even if the neanderthal approach was my suggestion :), you could
also try to use contentCache queue prioritization, and set a high priority
to the first 3 images and a low priority to the rest, but I'm not sure if
it's really worth the work (and if the underlying implementation of
contentCache will truly "obey" those priorities)

Have a look at contentCache.priorityGroup and
contentCache.prioritize(string) here (although documentation is quite
limited):
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/core/ContentCache.html#priorityGroup

Also, make sure that your webserver is correctly sending the necessary
cache tags (expires etc...) for the requested contents, or contentCache
will be pretty useless on caching.

P.S. Instead of using prioritization, you could also try to switch to the
second ArrayCollection immediately after setting the first (or just a few
milliseconds after that). If contentCache queueing is doing its job, the
first assignment should put your first 3 images to the top of the empty
queue, and the switch should populate the rest of the queue (and hopefully
get everything loaded in the correct order). You could simulate some very
low bandwidth network conditions and monitor contentCache.requestQueue and
contentCache.activeRequest, to see if everything is working as intended.


On Fri, Oct 13, 2017 at 1:12 AM, bilbosax <waspenc...@comcast.net> wrote:

> I initially tried Erik's solution to use a contentCache with queueing
> enabled, and set maxActiveRequests to 3, but I still got the same results -
> one of the first three images was always the last to render.  So I finally
> took a more neanderthal approach and have two url ArrayCollections.  The
> first just has the first three image url's, and the second has the the
> entire list of url's.  I set the dataprovider for the list to to the first
> ArrayCollection, and when updateComplete fires, I set the dataprovider to
> the second ArrayCollection.  The whole time I use a contentCache, so all
> the
> the images are available to my application for other uses.  So now the
> first
> three images load quickly, and by the time I start scrolling, all of the
> other images are ready to go. Thanks for the suggestions guys!!
>
>
>
> --
> Sent from: http://apache-flex-users.2333346.n4.nabble.com/
>

Reply via email to