Style Loader

An example that lets the user choose a style to load and uses a Mate extension (StyleLoader) to load it from the event map.

This example shows:

  1. How to extend Mate by adding a tag that handles results and fault returned by Flex's Style Manager when loading a new compiler css style.
  2. How to use the CallBack tag in the view to receive calls sent by the event map.

Run Example

View Source

Download Source

6 responses so far

  1. Nice, it looks like you are using Degrafa for skinning. Is this correct?
  2. Hi John,
    Yes, this example uses Degrafa to show the background patterns.
  3. hi , nice framework , I planning to use this in our big project , but i think since this is a loader , can you use a progressBar while its preloading? , I think this will be great if there is :) . I find your sample doesn't load the theme right away cause it takes a while to load the whole theme , I thought its not working till I wait a little longer. Please I'm gladly to see the next version :) . best regards
  4. Looking at the source, I found this in the main view:

    <mate:Dispatcher id="dispatcher" type="{StyleLoaderEvent.STYLE_CHANGE}" generator="{StyleLoaderEvent}">
    <mate:ResponseHandler response="currentState = 'complete'" type="{StyleLoaderEvent.LOAD_COMPLETE}" />
    <mate:ResponseHandler response="currentState = 'error'" type="{StyleLoaderEvent.FAULT}" />
    </mate:Dispatcher>

    Using injectors you can get around this so that you can keep the Mate framework separate from your views right?
  5. Hi Ryan,
    Yes, you can use the new tag Callback to achieve the same result.

Leave a Reply

Leave this field empty