AS3 Switch Statement Example


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



Copy this code and paste it in your HTML
  1. switch (myVariable) {
  2. case 1:
  3. // Do something here
  4. break;
  5.  
  6. case 2:
  7. // Do something here
  8. break;
  9.  
  10. case 3:
  11. // Do something here
  12. break;
  13.  
  14. default:
  15. trace ("None of the above cases were met")
  16. }

URL: http://www.republicofcode.com/tutorials/flash/as3switch/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.