forked from: Ornamental Heart (MVC test)
forked from Ornamental Heart (MVC test) (diff: 554)
I'm not sure what MVC really is, but anyway I've done it. There you go: behold pure MVC :)
ActionScript3 source code
/**
* Copyright makc3d ( http://wonderfl.net/user/makc3d )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/sKow
*/
// forked from yuuganisakase's Ornamental Heart (MVC test)
//
// I'm not sure what MVC really is, but anyway I've done it.
//
// There you go: behold pure MVC :)
//
package
{
import com.bit101.components.Label;
import flash.display.Sprite;
import flash.events.Event;
public class MVC extends Sprite
{
public function get model ():Number
{
return mouseX;
}
public var view:Label;
public function MVC()
{
super();
view = new Label(this);
addEventListener(Event.ENTER_FRAME, controller);
}
public function controller (e:Event):void
{
view.text = model.toString ();
}
}
}