在Adobe AIR用户登录的验证和preloader [英] User Login validation and preloader in Adobe Air

查看:211
本文介绍了在Adobe AIR用户登录的验证和preloader的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出如何在Adobe AIR [桌面应用程序,而不是基于Web的Flex应用程序]验证用户和加载应用程序(而呈现出preloader)。

I am trying to figure out ways to authenticate a user and load the application (while showing a preloader) in Adobe Air [desktop application, and not web based flex app].

这是我已经能够做到至今: - 一个窗口,要求登录信息,一旦确认我做了登录窗口不可见的,打开应用程序的主窗口的一个实例。有2个问题是: -

This is what I have been able to achieve so far:- A window asks for login details, once validated I make the login window invisible and open an instance of the application's main window. There are 2 problems with this:-

  1. 我要打开一个新窗口(2窗户个)。它宁可看起来更好,如果我能够简单地显示一个国家的登录表单,并在另一个国家的主要应用视图。我试过了,但是问题是,除了视图组件,Flash并执行所有的动作,并保持其他国家做好准备。有一些应用程序视图为中心的动作而开始抛出空引用错误等。最重要的是,整个事情需要一段时间才能显示为创建这两种观点,但只有1人表示
  2. 我想表现出preloader一旦用户通过验证,直到主应用视图加载

在简单地说,这就是我想要做的事: -

In a nutshell, this is what I am trying to do:-

  1. 加载登录窗口尽可能快地停在那里(动作在应用程序的其他部分不应该运行)
  2. 验证后,加载应用程序的主视图。显示出preloader直到装载完成
  3. 加载在同一窗口中的主视图(而不是打开一个新的窗口,使登录1不可见的)

需要帮助和指导,如何这可能会被执行。

Need help and direction as to how this could be executed.

谢谢!

更新1

好了,现在我已经成功地整合在一个单一窗口的功能。然而,状态之间的转换是不是平滑的。 状态1是登录屏幕。如果用户输入正确的登录凭据,该视图的状态2被激活。

Ok, so now I've managed to consolidate the functionality in a single window. however, the transition between states is not a smooth one. State 1 is the login screen. If the user enters the correct login credentials, State 2 of the view becomes active.

现在的状态2到负载(其一堆UI组件和数据负载的网格),这需要时间。在此之前,该应用程序清空了,然后这一切显示在一个混蛋。可转换进行更顺畅?只是显示正在载入......就足够了。由于国家2将不会出现,直到所有的已建成和国家1逐渐消失,只要我改变目前的状态,国2有没有什么办法来监测的进展和变化的状态,只有当一个状态有被加载!

Now for State 2 to load (its a bunch of UI components and a grid with loads of data) it takes time. Until then, the application blanks out and then all of it is shown in a jerk. Can the transition be made much smoother? Just showing 'Loading...' would suffice. Because State 2 won't show up until all of it has been constructed and State 1 dies away as soon as I change the current state to State 2. Is there any way to monitor the progress and changing the state only when the next state has been loaded!

更新2

好吧,我得到的过渡动画国家之间的合作。然而,仍然存在与过渡开关的问题。问题是,我切换到登录后得到了验证国家有大量的组件,并显示大量的数据。 有没有一种方法,我可以将监听器(如果有的话),我可以发射状态的时候加载完成,并查看已经产生!目前挺举像在过渡效果是因为国家已经改变,但鉴于尚未完成。

Ok, I got the transition animation to work between states. However, there still exists a problem with the transition switch. The problem is that the state I switch to after login has been verified has a lot of components and shows a lot of data. Is there a way I can attach Listeners (if any), which I can fire when the state loading is complete and view has been generated! The current jerk like effect in the transition is because the state has changed but the view has not completed yet.

状态更改为国家2不流畅的状态2负荷从数据库中大约10000行数据。有没有一种方法,我可以明显地改变国家的用户,之后的状态2已经完全抽出,并在所有的数据已经退出?的creationComplete没有多大帮助这里。

State Change to State 2 is not smooth as State 2 loads about 10000 rows of data from database. Is there a way I can change the state visibly for the user, after state 2 has been completely drawn out and has pulled in all data? creationComplete doesn't help much here.

总之,是有办法,开始从初始状态加载状态,并使其可见,只有当它完成加载?的就是我能火从状态1的事件加载状态2,但明显转移到状态2,只有当国家2是完全加载。

In short, is there a way to start loading a state from an initial state and make it visible only when its complete loaded? i.e. can I fire an event from state 1 to load state 2, but to visibly transition to state 2 only when state 2 is completely loaded..

更新3

一周消防的,张贴赏金,并通过网络清除后,我仍然没有能够解决这个问题!我的应用程序窗口没有响应的用户界面创建和数据加载的时间。在Windows中,它甚至可以显示没有响应窗口标题栏约5秒钟。因此,它的用户界面被卡住,因为数据是花一些时间加以取出,并装 - 默认情况下,所有这一切都发生在单线程

After a week of firefighting, posting a bounty and scavenging through the web I have still not been able to fix this! My application window becomes unresponsive for the time the UI is created and data is loaded. In Windows, it even shows 'Not Responding' at the window title bar for about 5 seconds. So its the UI getting stuck because the data is taking some time to be fetched and loaded - all of this happens in a single thread by default.

如何谁开发基于Adobe AIR的人做到这一点的我大部分时间一直看到实际的游戏加载之前加载屏幕 - 当其加载的,它的功能齐全。必须有一个办法!

How do people who develop based on Adobe Air do this? I've mostly always seen a loading screen before the actual game is loaded - and when its loaded, its fully functional. There has to be a way!

推荐答案

耗时装载问题在网格10000行可以来在任何Web应用程序的任何基于Web的语言,因为Web应用程序需要在一个环境中运行网络浏览器有它自己的资源限制。

The time consuming problem of loading 10000 rows in a grid can come in any web based language in any web application because web application needs to run in the environment of a web browser which has its own resource limitation.

那么,我建议是,你根本不加载视图加载所有的10000条记录。而是首先加载1000条记录,然后保持一个链接或按钮标签下一步或查看更多,并像上点击从数据库中把下一一堆1000条记录。这样,您就可以完成你的任务。

So what I would suggest is that you don't load all 10000 records at loading the view. Instead load 1000 records first and then keep a link or button with label "Next" or "Show More" like and on that click bring the next bunch of 1000 records from the database. This way you can accomplish your task.

谢谢

Jigar皇座

这篇关于在Adobe AIR用户登录的验证和preloader的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆