easy browser
♥0 |
Line 30 |
Modified 2014-09-13 16:35:04 |
MIT License
archived:2017-03-20 01:28:12
ActionScript3 source code
/**
* Copyright yurij.shaulov ( http://wonderfl.net/user/yurij.shaulov )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/wdIL
*/
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
[Bindable]
private var myUrl:String = "http://";
private var br:Loader = new Loader();
private function goToUrl():void{
myUrl = urlInput.text;
if (myUrl.substr(0,4) != "http")
{
myUrl = "http://" + myUrl;
}
br.load(myUrl)
browser.location = myUrl;
browser.load();
}
]]>
</mx:Script>
<mx:ApplicationControlBar dock="true" fillAlphas="[1.0, 1.0]" fillColors="[#0E0847, #FFFFFF]">
<mx:Label text="AIR WEB BROWSER" fontWeight="bold" fontSize="12" color="#990000"/>
<mx:Label text="Enter URL:"/>
<mx:TextInput id="urlInput" enter="goToUrl()" text="{myUrl}"/>
<mx:Button label="GO" click="goToUrl()" />
<mx:Spacer width="100%"/>
<mx:Button label="Back" click="browser.historyBack()" />
<mx:Button label="Forward" click="browser.historyForward()"/>
</mx:ApplicationControlBar>
<mx:Object id="browser" height="100%" width="100%"/>
</mx:Application>