Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Q: How do I setup a multiple swf project and let them communicate?  (Read 6843 times)
jorren
Newbie
*
Posts: 1


View Profile Email
« on: November 20, 2008, 06:44:14 »

Hi,

I'm pretty familiar with the mvc concept as long as everything gets handled in one swf file.

For this new project I'm about to start, there need to be different swf files because of size/loading issues. I will be having a root file which can either load in the home, agenda or contact swf depending on what the user selects. On the homepage there is also a smaller list of agenda items. Which when clicked would load the agenda.swf and show the details of that particular item. On each swf there will be buttons or links to go to another swf file.

  • So how do I start ? I want to load the agenda data in the root swf's model and pass them on to either home or agenda and let them handle the view. So I don't have to load this data more then once.
  • How do I handle the loading of the different swf's ?
  • And how do I construct the clickthrough functionality on the list of agenda items on the homepage so the detail page in the agenda swf will show the correct data.
  • Are there any flash (no flex) tutorials out there?


I'm a complete newbie to puremvc, so please be gentle :)


Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: November 20, 2008, 08:37:02 »

This sounds like a job for MultiCore!

Check out the MultiCore version of the framework. It allows multiple PureMVC apps to run in the same VM, collaborating to get the job done.

As for communication between them, you have two options: interfaces or pipes. And you can mix and match in the same app.

With interfaces, the shell (the main, loading app) implements a specific interface (of your design) and the modules (or loaded swfs) implement a different interface. The modules are given a reference to the shell and visa versa, so that the may communicate by invoking methods on each other. This is synchronous.

With pipes, the shell and modules (collectively called 'cores') communicate by sending and receiving messages asynchronously through pipes to each other. Messages can be filtered, tee'd, queued and priority sorted.

Hope this helps,
-=Cliff>
Logged
Pages: [1]
Print