<?xml version="1.0" encoding="utf-8"?>

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 

xmlns:s="library://ns.adobe.com/flex/spark" title="{data.title}" xmlns:components="components.*">

<fx:Script>

<![CDATA[

import com.adobe.nativeExtensions.Vibration;

import views.SnippetView;

protected function button1_clickHandler(event:MouseEvent):void

{

// TODO Auto-generated method stub

var vib:Vibration = new Vibration();

vib.vibrate(500);

}

]]>

</fx:Script>

<s:navigationContent>

<s:Button label="Snippet" click="navigator.pushView(views.SnippetView,data)"/>

<s:Button label="Tutorial" click="navigateToURL(new URLRequest(data.tutorial))"/>

</s:navigationContent>

<s:VGroup gap="20" paddingTop="15" paddingLeft="15" width="{this.width}">

<s:Button label="Email" click="navigateToURL(new URLRequest('mailto:foo@bar.com'))"/>

<s:Button label="Browser" click="navigateToURL(new URLRequest('http://www.flex.org'))"/>

<s:Button label="Maps" click="navigateToURL(new URLRequest('http://maps.google.com/'))"/>

<s:Button label="Phone" click="navigateToURL(new URLRequest('tel:1234567890'))"/>

<s:Button label="SMS" click="navigateToURL(new URLRequest('sms:1234567890'))"/>

<s:Label text="You can also embed native librairies to extend the capabilities of the framework. Try this:" maxDisplayedLines="3"/>

<s:Button label="Vibrate 500ms using a native library" click="button1_clickHandler(event)"/>

</s:VGroup>

<components:QuestionBlock bottom="40" horizontalCenter="0" questionData="{data}"/>

</s:View>