Futurescale, Inc.
PureMVC Home
The PureMVC Framework
Code at the Speed of Thought
Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
New discussions should be taken up in issues on the appropriate projects at
https://github.com/PureMVC
PureMVC Architects Lounge
Announcements and General Discussion
Getting Started
Can view components load images?
Pages: [
1
]
« previous
next »
Author
Topic: Can view components load images? (Read 11907 times)
hesten
Sr. Member
Posts: 52
Can view components load images?
«
on:
July 12, 2009, 02:03:53 »
Hi
This is probably a stupid question, but is a view component allowed to load the external images it needs (using Loader in Flash)?
Regards
Logged
Tekool
Sr. Member
Posts: 192
Re: Can view components load images?
«
Reply #1 on:
July 12, 2009, 05:47:31 »
When I only have to load a unique image I fully load it in a mediator. When it cames to a list of images, I prefer to use a proxy. But sometimes, when the loading is too dependent of the view state (scrolling, complex user interaction), I suppose that to manage all the loading in a well designed mediator is sufficient.
Logged
Sammi
Courseware Beta
Full Member
Posts: 45
Re: Can view components load images?
«
Reply #2 on:
July 12, 2009, 06:20:24 »
It is perfectly fine to have the views load external images.
Most of the time my views are responsible for loading the images it requires, unless the images are required at startup. Then my InitialAssetsProxy loads them and the view's mediator passes them to the view.
Someone made a simple BulkLoaderProxy recently and shared it here on the forums and I might use that in upcoming projects.
Best,
Sammi
Logged
hesten
Sr. Member
Posts: 52
Re: Can view components load images?
«
Reply #3 on:
July 12, 2009, 10:02:13 »
Tek > Why do you load it in the mediator, I was under the impression that a mediator should do nothing more than mediate?
Sammi > I was thinking about a gallery where a list of images is loaded when the callery is requested. My own perspective is the same as yours, that the view component should be able to load the images it needs - the list from which it gathers information on which images to load on the other hand I have in a Proxy.
Logged
Tekool
Sr. Member
Posts: 192
Re: Can view components load images?
«
Reply #4 on:
July 12, 2009, 10:29:09 »
hesten> I mean to use the mediator to initiate loading, receive complete event and add the image to the display list in the mediated view. You don't need this when the view is able by itself to load the image (when an image component is used in Flex or when you have your own component).
Logged
hesten
Sr. Member
Posts: 52
Re: Can view components load images?
«
Reply #5 on:
July 12, 2009, 11:58:09 »
Oh ok, I get what you're saying now
Logged
Pages: [
1
]
« previous
next »
Stack Overflow
GitHub
Linked In
Google Plus
Twitter
Powered by SMF 2.0.15
|
SMF © 2006-2007, Simple Machines LLC
|
Content © 2006-2018, Futurescale, Inc.
Loading...