So now we have 3 different Flash Applications on the page, laid upon a fullscreen map. One acts as the main controller (where you hit start/stop). The other 2 are your dedicated views – the grid and the chart display. These guys are notified when the state changes on the controller, and are updated at that time.
Through the magic of JSON our different Flash applications are able to communicate with each other.
Timeline of a typical Session
- Once the page is loaded – Behaviour calls the main function in ActivityPlayer – and we’re off to the races.
- ActivityPlayer initializes and created the MapController. It then writes out each swf which are then loaded.
- Once the main ButtonPanel swf is loaded – he searches for what activity to load from MotionBased.
- The appropriate activity is retrieved from MotionBased and passed to the ButtonPanel.
- Once the activity is parsed – information about the activity is passed to the Map, DataGrid and Chart panels.
- They do what they need to do – and appear in front of you.
- You click the play button – and it’s off to the races. Information is automagically passed to the appropriate views – just watch them update.
- It’s not just a one way street though – if you click on either the Map Line or Chart Lines you’ll be taken to that moment in time.