Preloaders in UcompOS Implementations

In an enterprise-level UcompOS Rich Portal Application, many disaggregated applications may come together to create an overall rich experience.

Some of these applications may be relatively small HTML/JavaScript type applications that take virtually no time at all to load.  Other applications may be large and complex Flex applications that easily approach several megabytes in file size.

Providing the user with feedback and information about an application while it is loading is a critical part of creating a positive rich experience.

The UcompOS Portal has a built-in pre-loader dialogue that is a stylized progress bar implementation.

By default, the label on the pre-loader will read “Ucompass.com, Inc.”.

You can however override this by passing in a parameter named preloaderTitle to the UcompOS Portal implementation.

Click here for a simple example of this.

If you don’t want to append a query string to the UcompOS Portal URL, you can also set the value of the preloaderTitle global variable in your LocalLib.js JavaScript package that is in the ucompos/local/LocalLib.js file in the UcompOS Developers Package.  This resource is used to build custom authentication into your UcompOS Portal implementation.

Also, when you load Flash or Flex content into a UcompOS Window instance, you can customize the preloader that the user sees while the content is loading into the window.

By default, a generic progress bar dialogue appears (the same one used for the loading of the UcompOS Portal) with the title “Loading…” while the SWF content is loading into the UcompOS Window instance.

However, this text can be customized so that you could create messages that say things ranging from “Getting Sent E-Mails” to “Searching Flickr”.

Let’s take a look at the full signature of the add(); method of the UcompOSWindowProxy class:

public function add(source:String, title:String = Untitled Window, 
     width:uint = 400, height:uint = 300, x:uint = 0, 
     y:uint = 0, suppressParameters:Boolean = false, 
     sandbox:Boolean = true, preloaderTitle:String = null, 
     format:String = null):void

Notice the second to last parameter, preloaderTitle.

The value of this will be the value on the text field on the preloader that appears in the UcompOS Window while the SWF content is loading.

Below is a simple visual example of this:

PreloaderWindow

The preloader dialogue does not show up on HTML type applications loaded into a UcompOS Window.

Also, you can specify the pre-loader to be used on a “self-loading” applications.  A self-loading application is loaded immediately into a UcompOS Window versus simply being loaded invisibly into the UcompOS run-time.  This is accomplished by setting a selfLoading attribute in the root element of the application manifest for the UcompOS application and giving it a value of true.

To do this, simply set a preloaderTitle attribute in the root element of the application manifest.

If you are loading a Flex application into a UcompOS Window and that application furnishes its own preloader, then that preloader will be used versus the UcompOS Window’s default preloader.

At this time, I have not created a way to overload the default preloader used in the loading of the UcompOS Portal so you can only customize its text field for now using the technique illustrated above.

About Edward Mansouri
Edward Mansouri is the CEO and Founder of Ucompass.com, Inc., a company focused on building scalable and profitable e-Learning enterprises. His expertise is in building e-Learning software, as well as in building visual frameworks such as the Enrich Content Enrichment System and the newly announced UcompOS Rich Experience Framework. He has been working with Flash since 1998, building Flash applications since 2002, and working with Adobe AIR since its private alpha release in 2006. He authored the site AIRApps.net (later renamed to O2Apps.com) dedicated to providing leadership in building Adobe AIR applications. In 2010, he is building and releasing a new e-Learning platform called Educator 2 which is built entirely upon the UcompOS Rich Experience Framework. Since 1999, over 1,000,000 students have taken courses served with his original e-Learning platform, Educator 1.

Comments are closed.