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

Pages: [1]
Print
Author Topic: Loading an application  (Read 10835 times)
pgianf
Newbie
*
Posts: 4


View Profile Email
« on: July 23, 2008, 01:42:13 »

Hello,

I have a problem starting up my flex air application. I'm using the startup manager to load all the necessary resources. So i've structured my main application in two flex states.
I use the first one for the startup phase during which i load ressources and show a progress bar together with my logo (like the examples) once Load Complete the main view mediator change the state in order to show the application ui, the problem is that changing the state it takes a lot for the UI to appears, so in the mean time progres bar disappeard and i can see only the background , it 's not a nice view.
Even if a set a creation policy = all i have to wait bfore the application shows then starting to load resource whike showing a progress bar. So i would like to have a mix, a unique progress loader that  indicate both application creation progress and resources loading.
How can i do that? Any suggestion?
thanks
Paolo
Logged
Tekool
Sr. Member
****
Posts: 192


View Profile WWW Email
« Reply #1 on: July 24, 2008, 12:26:45 »

We are working on the exact same problem here in the company I work for, exact same circumstances today with a colleague of mine. I hope we will have an answer today.  The only difference could be that we use modules and external RSLs.

I hope I can give you some news as soon as possible.

PS: Note that this not really PureMVC related.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 on: July 24, 2008, 04:53:37 »

You want to define  your window as invisible to start, and to remain invisible until you are ready to show it.

Check out the DesktopCitizen utility. Not only does this give your air app the ability to remember its location and size at startup, but it also controls the visibility of the window at startup. See the CodePeek and RSSHeadlines demos for implementation.

-=Cliff>
Logged
Tekool
Sr. Member
****
Posts: 192


View Profile WWW Email
« Reply #3 on: July 24, 2008, 07:50:52 »

My colleague finds the solution to our problem. I'm not sure it will be the same as yours.

We have to use three different progress-bars to load the application :
  • The first to load the application itself and RSLs.
  • The second to load modules (our main application is a module, the loader is a PureMVC shell)
  • The third in a loaded module to show initialization progress of the *StartupManager* (configuration loading, internationalization loading, etc...)

The "flickering" was between second and third. We first rely on the *ModuleLoader.onModuleComplete* handler to remove the progress-bar that loads modules. Now we have to rely on the *Module.onCreationComplete* to remove the progress-bar that load modules and display the *StartupManager* progress-bar in place of it without to have to display a blank screen during few milliseconds.

Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #4 on: July 24, 2008, 10:07:28 »

Then you must engineer a splash screen for your app that is only removed (and everything else shown) once the loading has completed.

-=Cliff>
Logged
Tekool
Sr. Member
****
Posts: 192


View Profile WWW Email
« Reply #5 on: July 24, 2008, 10:48:59 »

Hi Cliff,
I already have written some application with a splash (mProjector not Air). I love the idea. We will do that.
Logged
arlo
Newbie
*
Posts: 3


View Profile Email
« Reply #6 on: August 08, 2008, 12:01:23 »

In order to reduce clutter, I have an issue making a preloader as well using Flash and pureMVC.  I've made an XmlProxy proxy, (the xml part isn't important really, you'll see why in a sec).  It uses BulkLoader to load a file.  That works fine.  Once the loading is complete I can use the data. 

My question is how to relay the progress info to the view- normally it'd be an event that fires when load progress changes- 10%, 14%, 29%, and so on.  Would I send a notification out for this?  Or is that overkill and there is a simpler way?  Or am I approaching it entirely the wrong way?  Having a progress notification would be handy for various display uses from one source.

Thanks!
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #7 on: August 09, 2008, 04:48:17 »

Have the Proxy listen for ProgressEvents and relay the info to the view via Notification.

-=Cliff>
« Last Edit: August 11, 2008, 06:58:23 by puremvc » Logged
Pages: [1]
Print