flex4.5移动设备开发-定时跳转到某个页面

【转】 http://www.terrenceryan.com/blog/post.cfm/flex-mobile-getting-rid-of-the-action-bar
<?xml version="1.0" encoding="utf-8"?>
<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
			creationComplete="init(event)" 
			xmlns:s="library://ns.adobe.com/flex/spark" >
	<fx:Script>
		<![CDATA[
			import flash.utils.clearInterval;
			import flash.utils.setInterval;
			
			import mx.events.FlexEvent;
			
			import views.ActionBarHomeView;
			
			protected var intervalID:uint;
			
			protected function init(event:FlexEvent):void
			{
				this.actionBar.visible = false;
				//just a timer to simulate calling some sort of service. 
				intervalID =  setInterval(pushToFirstView, 2000);
				
			}
			
			private function pushToFirstView():void
			{
				clearInterval(intervalID);
				navigator.pushView(views.ActionBarHomeView);
				
			}
			
		]]>
	</fx:Script>
</s:ViewNavigatorApplication>

你可能感兴趣的:(flex4)