In this blog entry I would like to share my approach to handling FlashVars in a PureMVC application. I assume that you are familiar with the basic concepts of PureMVC.
Archive for the ‘FlashDevelop’ Category
Handling FlashVars in PureMVC
Wednesday, August 13th, 2008Getting Started with the PureMVC Startup Manager – Introduction
Monday, May 19th, 2008This three-parts tutorial reflects my own learning experience with the PureMVC framework and the PureMVC Startup Manager. It was inspired by Philip Sexton’s demo Startup as Ordered and is my first attempt on PureMVC. The tutorial’s goal is to provide beneficial information to other novice PureMVC users who have understood the theory but lack practice.
(more…)
Getting Started with the PureMVC Startup Manager – Part 3
Monday, May 19th, 2008Preparing the View
We are almost there. In the final step of this tutorial we will be creating a very simple view:
- Create a file with the name StageMediator.as in the view folder.
- Create a new folder inside the view folder and call it components.
- Create two files in the components folder and name them SectionView.as and TitleView.as.
Getting Started with the PureMVC Startup Manager – Part 2
Saturday, May 17th, 2008The StartupMonitorProxy
A PureMVC-based application typically has a startup command that instantiates some basic proxies and mediators. In our sample project we want to load a CSS stylesheet and an XML file with content before allowing any user interaction (see part 1). The important thing here is to make sure that everything gets loaded in the proper order and is fully loaded before it is accessed. Here is where the StartupMonitorProxy steps in. This class is at the core of the Startup Manager utility.
(more…)
Getting Started with the PureMVC Startup Manager – Part 1
Friday, May 16th, 2008Coming from a Flex/Cairngorm background, I’ve always missed a utility that takes care of the asynchronous loading of resources during application startup. Being too lazy to write one myself, I usually chain together several Cairngorm commands for loading configuration settings, stylesheets, language resources and initial data from a database. Each command is only executed if the predecessor task has been finished successfully. The user interface isn’t initialized until the whole chain is completed, otherwise an error message is generated and the application won’t start. It’s not elegant but it works.
When I started to learn PureMVC (and I’m still learning), I was happy to discover that the AS3 version is accompanied by a Startup Manager. This utility isn’t part of the core PureMVC framework and has to be downloaded and installed separately, but it nicely integrates with the “PureMVC way of things”.
(more…)
Quick Tip – Where are my Easing Equations?
Wednesday, May 14th, 2008Tutorials on TweenLite or TweenMax often rely on the easing functions that come with the Flash CS3 IDE. These functions are contained in the package fl.motion.easing. All classes under the package name fl are specific to Flash CS3 and are not available in the free Flex 3 SDK. If you, for example, use FlashDevelop with the Flex 3 SDK you have to import your easing functions from the package mx.effects.easing. So any time you see an import statement like this
import fl.motion.easing.*;
you should be able to replace it with
import mx.effects.easing.*;
and get the same functionality.
Spinning Preloader – An All-Time Classic in Pure AS3
Saturday, May 10th, 2008Update (December 11th, 2008): The source code is available for download now. The zip archive also includes a FlashDevelop project file. Get it here.
This tutorial may serve as a beginner exercise in AS3 coding. But before starting, let’s take a quick look at what we will be creating:
The spinning preloader animation is an all-time classic. Our implementation will be highly configurable. You will be able to set the number, size, color and fade-out duration of the rectangular segments, as well as the radius and the spinning speed.
(more…)
Creating a SWC Component in FlashDevelop
Wednesday, May 7th, 2008In the past, if you wanted to create a SWC library from your ActionScript classes you either had to use FlexBuilder or the Flash IDE. After Adobe open-sourced the Flex SDK you were also able to use the command line tool compc.exe at no extra cost. But if you don’t like to mess around with command line tools you have another option now. A developer from Sydney released a SWC export plugin for the popular open-source ActionScript development environment FlashDevelop. The plugin is based on compc.exe but it hides all the ugly details from you.
This tutorial will guide you through the steps of creating a simple ActionScript component and compilling it into a SWC file.
(more…)