Hi Again Marloplax,

I thought it best if I post some of the code I've abstracted for clarity reasons:

Below is an example of my Main class and a galleryView class I am using. galleryView itself extends a composite view that includes an array for storing components (other views in this case).

As you can see I am creating other views that relate the the galleryView, inside the galleryView itself, and then adding these views as components of galleryView. When update is called on galleryView in response to a change in the model, it loops through these other components and updates them as well (composite pattern).

Is this the right way to go about it? (sorry for any bad comments)


MAIN CLASS:

public class Main extends MovieClip
{
public function Main ()
{
// APPLICATION 1: 3D GALLERY:

var galleryXml:String = galleryXml.xml”;
var galleryModel:IGalleryModel = new GalleryModel(galleryXml):
var galleryView:Composite = new galleryView (galleryModel, null);
//
galleryView.x = 0;
galleryView.y = 0;
addChild(galleryView);
galleryModel.addEventListener(“navChange”, galleryView.update());


// APPLICATION 2: COVERFLOW

var cFlowXml:String = galleryXml.xml”;
var cFlowModel:IGalleryModel = new GalleryModel(cFlowXml):
var cFlowView:Composite = new galleryView (cFlowModel, null);
//
cFlowView.x = 0;
cFlowView.y = 0;
addChild(cFlowView);
cFlowModel.addEventListener(“change”, cFlowView.update());

}
}
}


GALLERY VIEW CLASS:

package
{
import flash.display.MovieClip;

public class galleryView extends Composite
{
public function galleryView (model:Imodel, controller:IController = null)
{
super(model, controller);

var navController:IMouseInputHandler = new NavController(model);
var navView:Component = new Component (model, navController);
// add controller to current composite view
this.add(navView);
//

var imgController:IMouseInputHandler = new imgController(model);
var imgView:Component = new Component (model, navController);
// add image viewer to current composite view
this.add(imgView);

// ScrollView contains and updates listview.
var scrollView:Composite = new Composite("Scroll View");
// List view contains and updates SliderView based of number of items
var listController:IMouseInputHandler = new listController(model);
var ListView:Composite = new Composite(model, listController);
scrollView.add(ListView);
//
var sldrController:IMouseInputHandler = new sliderController(model);
var SliderView:Component = new Component(model,sldrController)
ListView.add(SliderView);
// add scrollView to current composite view
this.add(scrollView);

// update added views, so they can get the latest data from the model.
this.update( );
// add EventListener to model and change gallery view
model.addEventListener(“navChange”, this.update( ));
}
}
}