neonsunburst Navigation Class


/ Published in: ActionScript 3
Save to your folder(s)

The Navigation class is a view that contains all the two navigation arrows, ie. left and right.


Copy this code and paste it in your HTML
  1. package com.neonsunburst {
  2.  
  3. import flash.display.MovieClip;
  4. import com.neonsunburst.*;
  5.  
  6. public class Navigation extends MovieClip {
  7.  
  8. var model:Model;
  9. var controller:Controller;
  10. var left :Arrow;
  11. var right:Arrow;
  12.  
  13. function Navigation(aModel:Model, aController)
  14. {
  15.  
  16. this.model = aModel;
  17. this.controller = aController;
  18.  
  19. this.left = new Arrow(model, controller);
  20. left.theDirection = "left";
  21. addChild(left);
  22.  
  23. this.right = new Arrow(model, controller);
  24. addChild(right);
  25. right.scaleX = -1;
  26. right.theDirection = "right";
  27. }
  28.  
  29. function activate() : void {
  30. left.activate();
  31. right.activate();
  32. }
  33.  
  34. function unActivate() : void {
  35. left.unActivate();
  36. right.unActivate();
  37.  
  38. }
  39. }
  40. }

URL: neonsunburst.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.