Created
May 16, 2011 15:19
-
-
Save peterblazejewicz/974631 to your computer and use it in GitHub Desktop.
scaling html content in Adobe Air
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" | |
xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:mx="library://ns.adobe.com/flex/mx"> | |
<fx:Script> | |
<![CDATA[ | |
protected function zoomInHandler(event:MouseEvent):void | |
{ | |
html.htmlLoader.window.document.body.style.zoom = 1.5; | |
} | |
protected function resetZoomHandler(event:MouseEvent):void | |
{ | |
html.htmlLoader.window.document.body.style.zoom = 1.0; | |
} | |
protected function zoomOutHandler(event:MouseEvent):void | |
{ | |
html.htmlLoader.window.document.body.style.zoom = 0.5; | |
} | |
]]> | |
</fx:Script> | |
<s:Button x="10" y="10" label="Zoom in" click="zoomInHandler(event)"/> | |
<s:Button x="88" y="10" label="Reset zoom" click="resetZoomHandler(event)"/> | |
<s:Button x="181" y="10" label="Zoom out" click="zoomOutHandler(event)"/> | |
<mx:HTML id="html" x="10" y="39" width="1057" height="621" location="http://www.google.com"/> | |
</s:WindowedApplication> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment