`

使用state做air启动画面

    博客分类:
  • air
阅读更多
老是分不轻mx:window nativeWindow  mx:windowApplication nativeApplication的关系
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" 
	windowComplete="init()" showFlexChrome="false" visible="true" 
	verticalScrollPolicy="off" 
	horizontalScrollPolicy="off"
	 layout="vertical">
	
	<mx:Script>
		<![CDATA[
			import flash.utils.setTimeout;
			private function init():void{
//				this.nativeApplication.x=
				setTimeout(closeSplash,3000);
			}
			private function splashInit(event:Event):void{
				this.splash.x = Screen.mainScreen.visibleBounds.width/2 - this.width/2;
				this.splash.y = Screen.mainScreen.visibleBounds.height/2 - this.height/2;
				this.splash.visible=true;
			}
			private function closeSplash():void{
				this.setStyle("showFlexChrome",true);
				this.currentState="login";
			}
		]]>
	</mx:Script>
	<mx:Window id="splash" 
		width="496" height="260"
		windowComplete="splashInit(event)" 
		showFlexChrome="false"
		visible="false" 
		verticalScrollPolicy="off"
		horizontalScrollPolicy="off">
		<mx:Canvas>
			<mx:Image source="assert/splash.png" id="simage"/>
		</mx:Canvas>
	</mx:Window>
	<mx:states>
		<mx:State name="login">
			<mx:AddChild>
				<mx:Panel width="100" height="100" >
					
				</mx:Panel>
			</mx:AddChild>
			<mx:RemoveChild target="{this.splash}">
				
			</mx:RemoveChild>
		</mx:State>
	</mx:states>
</mx:WindowedApplication>

 app.xml

<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
        <systemChrome>none</systemChrome>

        <!-- Whether the window is transparent. Only applicable when systemChrome is false. Optional. Default false. -->
        <transparent>true</transparent>

分享到:
评论

相关推荐

    stateflow 计时器

    基于simulink的计时器,方便学习stateflow,Stateflow是一个跟Simulink联合起来使用的,可视化图形界面工具。在Simulink环境下,它是用来模拟和控制一些逻辑系统. Stateflow跟Simulink是完美结合在一起的,可以建模...

    simulink-stateflow使用及代码优化

    simulink-stateflow使用及代码优化 在学习simulink中的笔记,先上传,后面继续更新。

    详解Stateflow建模与应用实例,简单stateflow建模实例,matlab

    stataflow逻辑系统建模.如何使用stateflow建立逻辑判断。系统介绍stateflow的使用方法与作用

    Stateflow使用方法

    Stateflow使用方法,介绍Stateflow使用方法的幻灯片课程,51页。

    Stateflow使用手册

    provides you with preliminary information on installing Stateflow and understanding this user’s guide.

    Spring State machine API(Spring State machine 开发文档).CHM

    Spring State machine API。 Spring State machine 开发文档。

    状态机stateflow

    matlab中状态机 stateflow的详细使用方法。matlab中状态机 stateflow的详细使用方法。matlab中状态机 stateflow的详细使用方法

    设计模式State模式源码

    State模式在实际使用中比较多,适合"状态的切换".因为我们经常会使用If elseif else 进行状态切换, 如果针对状态的这样判断切换反复出现,我们就要联想到是否可以采取State模式了. 不只是根据状态,也有根据属性.如果...

    stateflow教材手把手教你-Stateflow教程.pdf

    stateflow教材手把手教你-Stateflow教程.pdf Stateflow教程.pdf 很不错,对新手

    Android学习 StateMachine与State模式

    Android中StateMachine机制 对与State改变切换这种常见常用的处理, 只是各个平台框架中处理的方法不同, ...在Android中使用的了StateMachine机制就是一个State模式的应用, StateMachine是非常的强大和精妙。

    原创simulink使用Stateflow生成发动机曲轴和凸轮轴信号-crankSignal.mdl

    原创simulink使用Stateflow生成发动机曲轴和凸轮轴信号-crankSignal.mdl 最近在学习Stateflow,用它做发动机曲轴和凸轮轴的信号产生。 60齿的曲轴,缺齿在59齿和60齿。凸轮轴信号在第48齿发生。 ...

    面向Typestate的编程

    Objects model the world, and state is fundamental to a faithful modeling. Engineers use state machines to understand and reason about state transitions, but programming languages provide little ...

    Stateflow建模与应用

    StateflowStateflowStateflow StateflowStateflowStateflowStateflow 是有限状态机 有限状态机 有限状态机 (finite state machinefinite state machinefinite state machine finite state machinefinite state ...

    flask-uwsgi, 使用 Stateflow + Nginx 设置 Flask的教程.zip

    flask-uwsgi, 使用 Stateflow + Nginx 设置 Flask的教程 带有用户定义+ Nginx的 Flask本教程向你展示了如何设置一个简单的Flask 应用程序,它带有用户定义+ Nginx 。本教程结束时,你将能够执行以下操作:使用...

    Stateflow逻辑系统建模

    本书的后三章内容涉及Stateflow的高级话题,涵盖了Stateflow Coder代码生成、真值表、Embedded MATLAB Function以及Stateflow API的使用方法等内容。  本书内容丰富、全面、系统而且权威,对Stateflow有限状态系统...

    计数器的搭建和stateflow工作过程范例

    计数器的搭建和stateflow工作过程,熟悉多路示波器使用,脉冲触发使用,常量设置以及条件状态转移使用。

    Hierarchical_State_Machine 源代码

    For details refer to the article on Hierarchical State Machines In conventional state machine design, all states are considered at the same level. The design does not capture the commonality that ...

    stateflow实现的计数器

    stateflow实现的计数器,与matlab自带的实例有些区别

Global site tag (gtag.js) - Google Analytics