All pastes #966012 Raw Edit

Mine

public text v1 · immutable
·published 2008-04-01 12:23 UTC
rendered paste body
loadSection(newArea,newSubsection)
{
    Queue.addEvent({fn:fadeOffSubsection, section:_currentSubsection});
    Queue.addEvent({fn:unloadSubsection, section:_currentSubsection});
    Queue.addEvent({fn:fadeOffArea, area:_currentArea})
    Queue.addEvent({fn:fadeOnArea, area: newArea});
    Queue.addEvent({fn:loadSubsection, section:newSubsection});
    Queue.addEvent({fn:fadeOnSubsection,section:newSubsection});
}

loadSection("kitchen","products");
loadSection("home","recycled");
loadSection("home","info");

// ------------

current status [area="kitchen",subsection="products"]
..
..
loadSection("home","recycled");

fadeOffSubsection	products
unloadSubsection 	products
fadeOffArea	 	kitchen
fadeOnArea		home
loadSubsection		recycled
[loadSection "home","info"]  <= user triggers here... needs to trigger an unloadSection ie step 2 onwards
fadeOnSubsection	recycled