AS2: FullScreen


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



Copy this code and paste it in your HTML
  1. fullScreen_btn.onRelease = fullScreen_btn.onReleaseOutside = toggleFullScreen;
  2. fullScreen_btn.onRollOver = onRollOverHandler;
  3. fullScreen_btn.onRollOut = onRollOutHandler;
  4.  
  5. function onRollOverHandler()
  6. {
  7. }
  8.  
  9. function onRollOutHandler():Void
  10. {
  11.  
  12. }
  13.  
  14. function toggleFullScreen():Void
  15. {
  16. if( Stage["displayState"] == "normal"){
  17. goFullScreen();
  18. } else {
  19. exitFullScreen();
  20. }
  21. }
  22. function goFullScreen():Void
  23. {
  24. Stage["displayState"] = "fullScreen";
  25. }
  26.  
  27. function exitFullScreen():Void
  28. {
  29. Stage["displayState"] = "normal";
  30. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.