Revision: 30671
Updated Code
at August 19, 2010 04:03 by derrekwayne
Updated Code
package com.neonsunburst { import flash.events.*; public class Model extends EventDispatcher { public static var totalPages:int; public static var currentPage:int; public static var previousPage:int; function Model() { totalPages = 3; currentPage = 1; } function setCurrentPage(p:int) : void { previousPage = currentPage; currentPage = p; trace (this + " currentPage is " + currentPage); trace (this + " previousPage is " + previousPage); dispatchEvent(new Event(Event.CHANGE)); } function getCurrentPage() : int { return currentPage; } function getPreviousPage() : int { return previousPage; } function getTotalPages() : int { return totalPages; } } }
Revision: 30670
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at August 19, 2010 04:00 by derrekwayne
Initial Code
package com.neonsunburst { import flash.events.*; public class Model extends EventDispatcher { public static var totalPages:int; public static var currentPage:int; public static var previousPage:int; function Model() { trace ("model"); totalPages = 3; currentPage = 1; } function setCurrentPage(p:int) : void { previousPage = currentPage; currentPage = p; trace (this + " currentPage is " + currentPage); trace (this + " previousPage is " + previousPage); dispatchEvent(new Event(Event.CHANGE)); } function getCurrentPage() : int { return currentPage; } function getPreviousPage() : int { return previousPage; } function getTotalPages() : int { return totalPages; } } }
Initial URL
neonsunburst.com
Initial Description
The singleton model extends EventDispatcher and fires events when it is updated by the controller.
Initial Title
Neonsunburst Model Class
Initial Tags
actionscript
Initial Language
ActionScript 3