Skip to content

Instantly share code, notes, and snippets.

View lynxerzhang's full-sized avatar
🤒

frankwinter lynxerzhang

🤒
  • geckostudio
  • shanghai
View GitHub Profile
@lynxerzhang
lynxerzhang / gist:741c17ba53796d845a478f5ca576350b
Created January 12, 2021 07:22 — forked from snowman-repos/gist:3825198
JavaScript: Detect Orientation Change on Mobile Devices
// Listen for orientation changes
window.addEventListener("orientationchange", function() {
// Announce the new orientation number
alert(window.orientation);
}, false);
// Listen for resize changes
window.addEventListener("resize", function() {
// Get screen size (inner/outerWidth, inner/outerHeight)
package
{
import flash.display.Sprite;
import flash.events.ErrorEvent;
import flash.events.UncaughtErrorEvent;
import flash.external.ExternalInterface;
public class Console extends Sprite
{
public function Console():void
/**
*
*
* ScaleBitmap
*
* @author Didier Brun
* @author Jerôme Decoster
* @version 1.1
*
*/