understanding the framework's structure

0 views
Skip to first unread message

Andrei Thomaz

unread,
Oct 10, 2006, 10:53:01 AM10/10/06
to Gugga Flash Framework
hello list,

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

tod...@gmail.com

unread,
Oct 11, 2006, 12:31:24 PM10/11/06
to Gugga Flash Framework
Hello 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

Andrei Thomaz

unread,
Oct 16, 2006, 10:23:21 AM10/16/06
to Gugga Flash Framework
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

Todor Kolev

unread,
Oct 16, 2006, 10:51:56 AM10/16/06
to gug...@googlegroups.com
On 10/16/06, Andrei Thomaz <andrei...@gmail.com > wrote:

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 ?

If they have different behaviour then you should implement them in different classes. Maybe your sections are sharing some functionality. You can separate it in a class named "dr.sections.BaseSection" for example. All the other sections will extend this class.

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?

The opening animation in SimpleSiteWithAdditionalNavigationButton is just an example. You can use any task or composition of tasks for this. Have a look at the gugga.animations.PropertiesTweenAnimation . It can be used to create tweens in your code as tasks. They can be composed letter in gugga.sequence.TaskSequence or gugga.sequence.TaskManager.

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". I'm not sure you'll want this for your opening animation. It should be played every time the section is opened.

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() ?

Tasks are the recommended way doing the things in GuggaFF. Sections are supporting alternative option to call one of the lifecycle methods and then dispatch the corresponding event when you are ready, but this is considered as work around. 

thank you,
andrei


Andrei Thomaz

unread,
Oct 16, 2006, 10:54:59 AM10/16/06
to Gugga Flash Framework
hello again Todor,

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

Andrei Thomaz

unread,
Oct 16, 2006, 11:09:18 AM10/16/06
to Gugga Flash Framework
hi Todor,

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

Todor Kolev

unread,
Oct 16, 2006, 11:15:17 AM10/16/06
to gug...@googlegroups.com
There is a lot to say about the Button in GuggaFF. We'll try to write an article for them and post it in near future. Please be patient until then :). You can use the buttons in the examples for now, and modify them to fit your design.

On 10/16/06, Andrei Thomaz <andrei...@gmail.com> wrote:

Todor Kolev

unread,
Oct 16, 2006, 11:19:25 AM10/16/06
to gug...@googlegroups.com
It will be done. Thanks.

On 10/16/06, Andrei Thomaz <andrei...@gmail.com> wrote:

Andrei Thomaz

unread,
Oct 16, 2006, 11:21:09 AM10/16/06
to Gugga Flash Framework
ok, I understand. I can help to write some basic docs, too.

Reply all
Reply to author
Forward
0 new messages