I have done the flash programming and development of two sites that,
apparently, could have been built with the Gugga Flash Framework. I am
trying to map the similar points of its mechanics, so I can try to use
Gugga in a future project (I would like to use it in a small project,
first, so I can understand how I can use Gugga to implement it in a
faster way).
The first site (the one that is ready) is only in Portuguese, and you
can see it below:
http://www.drpromo.com.br/site_novo/site.htm
It has a class that acts as a main controller for the site, and two
sets of classes: a set (that I will call SectionMC), derived from
MovieClip, that implements each section of the site, and another one
(only Section), that contains the data used for each section. Each
section is in another .swf file, so the flow is like that:
- MainController creates the Section classes, one for each section of
the site;
- When needed, the MainController invokes the creation functions of
Section classes, so they load the section's .swf file and creates the
respective SectionMC object).
To make the transitions among the sections, each section has functions
like active(), desactive(), hide(), etc. But the mechanism is specific
of this site, so I want to make it more abstract, and I guess I could
use Gugga to implement projects like this one.
I could write some texts about that, when I get to implement a small
project. It would be my contribution to the Gugga project ;-)
bye,
andrei
We appreciate your willing to develop a site with GuggaFF. It will be
great if you share your experience after that.
Have you seen the sample projects included in the framework's
distribution? There you can see the common scenarios with GuggaFF. You
can see the ExternalContent project. It's very similar to your DR site
in structural means. I'll now suggest you one possible solution based
on this example:
1. You should have an Application class extending
gugga.application.ApplicationController which will be the overall
controller of the whole application.
2. The navigation (the swiss knife) can be implemented as a
gugga.navigation.MenuNavigation. It looks tricky but it's not. All you
need to do is to create this gadgets opening and closing animations as
an roll state transitions of the gugga.navigation.NavigationButton.
This means that your menu buttons should be linked to this class. See
the LabelNavigationButton in ExternalContent sample project.
3. As you already mentioned the content should be separated to
sections. They should extend the gugga.application.Section. Each
section will be responsible to play open and close animations
registered as its open and close tasks. In addition you should create
an activating task to load your data in it.
4. Transitions between sections are an interesting part of the project.
To build the transitions for this site you can use a closing animation
of the old section, SectionsTransition with loading bar (indicatior)
and an opening animation of the new section. For this transitions you
can take advantage of some of the key features in GuggaFF. I saw that
you start loading the new section after the whole close animation of
the old section is played. With GuggaFF you can start it with the user
click on the navigation button, and it will load while the user is
entertained with close animation. This can safe a lot of time for your
users. Please see the "Application Building Blocks part 1 -
Sections" article in GuggaFF blog for more information.
We are waiting for news from you. Keep us updated on your progress, and
let us know if you have any other questions about how to implement your
site.
Todor
I would like to ask some questions:
a) I have a MovieClip for each section, and each one has a class
associated with it. So, I make each class derived from Secion, am I
correct ?
b) I looked at the SimpleSiteWithAdditionalNavigationButton sample, and
I saw that the opening and closing animations are movie clips nested
inside the section. But, in the case of dr promo site, the section's
content is animated with AnimationPackage in the opening/closing. So, I
don't want to play a movie clip (to make the opening and closing
animations), but to call the section class method that animates its
content. So, I need a task that invokes this method and dispatches the
'complete' event when the animation is finished. How do I implement
this task? Do I have to implement ITask in another class, or can I use
SingleExecutionTask for that?
c) Or is it better to implement the methods initialize(), activate(),
open(), close() and destroy() in my sections classes, and ignores the
use of registerInitializingTask(), registerActivatingTask(),
registerOpeningTask(), registerClosingTask() and
registerDestroyingTask() ?
thank you,
andrei
hello Todor,
I would like to ask some questions:
a) I have a MovieClip for each section, and each one has a class
associated with it. So, I make each class derived from Secion, am I
correct ?
b) I looked at the SimpleSiteWithAdditionalNavigationButton sample, and
I saw that the opening and closing animations are movie clips nested
inside the section. But, in the case of dr promo site, the section's
content is animated with AnimationPackage in the opening/closing. So, I
don't want to play a movie clip (to make the opening and closing
animations), but to call the section class method that animates its
content. So, I need a task that invokes this method and dispatches the
'complete' event when the animation is finished. How do I implement
this task? Do I have to implement ITask in another class, or can I use
SingleExecutionTask for that?
c) Or is it better to implement the methods initialize(), activate(),
open(), close() and destroy() in my sections classes, and ignores the
use of registerInitializingTask(), registerActivatingTask(),
registerOpeningTask(), registerClosingTask() and
registerDestroyingTask() ?
thank you,
andrei
about the NavigationButton, I would like to ask you help to complete
the following text (we could put it back to the NavigationButton class
documentation, maybe it is useful):
frame "off": animation played when the button is disabled (?)
frame "offRoll": animation played when the mouse is moved outside the
button (similar to onRollOut event)
frame "onRoll": animation played when the mouse is moved over the
button (similar to onRollOver event)
frame "on": the normal state of the button (similar to 'up' frame in a
button symbol)
frame "offRoll_off": ?
frame "onRoll_off": ?
I also would like to ask: why some examples use stop() actions, and
another ones use the stopPlaying() function?
thanks again,
andrei
i would like to suggest you that this part of your answer
SingleExecutionTask is a wrapper (Decorator Design Pattern) for a task
which
should be executed just once, and the second time started it will
immediately dispatch "complete".
be added to the SingleExecutionTask docs
(http://www.gugga.com/GuggaFlashFramework/documentation/html/classgugga_1_1sequence_1_1SingleExecutionTask.html).
[]'s
andrei