我想知道如何使用Feathers UI创建可以打包桌面应用程序而不是移动应用程序的Flash Builder AIR项目。
如果我按照FeathersUI入门指南的指示创建一个actionscript移动项目,我会得到与Feathers实例中相同的组件样式。
但是,如果我创建一个“常规”动作脚本项目,我会得到组件样式,它看起来非常小,与Feathers示例上的不同。
我在这里缺少什么? 是不是可以创建一个'常规'动作脚本项目? 然后,使用移动actionscript项目,如何打包桌面?
相关问题虽然没有具体回答我的问题:
http://forum.starling-framework.org/topic/feathers-ui-for-business-application-on-mobile-device-and-webdesktop-mode
我们如何使用Feathers UI开发Web和桌面应用程序?
I would like to know how to create a flash builder AIR project that can package a desktop app instead of a mobile app using Feathers UI.
If i create an actionscript mobile project, as instructed by the FeathersUI getting started guide, i get the same component styling as can be seen on the Feathers live examples.
But if i create a 'regular' actionscript project, i get component styling which looks very small and not the same as on the Feathers examples.
What am i missing here? is it not possible to create a 'regular' actionscript project? Then, using a mobile actionscript project, how to package for desktop?
related questions although not answering my question specifically:
http://forum.starling-framework.org/topic/feathers-ui-for-business-application-on-mobile-device-and-webdesktop-mode
How can we use Feathers UI for developing Web and Desktop Application?
最满意答案
对于桌面AIR应用程序,您应该使用桌面主题而不是“羽毛入门”教程中提到的MetalWorksMobileTheme 。 Feathers包含几个示例主题,并且,目前(从Feathers 1.3.0开始),其中一个示例主题针对桌面。 它被称为AeonDesktopTheme 。 您应该尝试使用AeonDesktopTheme而不是MetalWorksMobileTheme 。
将桌面主题用于桌面应用有两个主要原因:
桌面和移动设备上的相同UI控件的行为可能非常不同。 桌面主题将为鼠标和键盘桌面环境适当地修改每个UI控件,并启用键盘焦点管理等功能。
示例移动主题(包括MetalWorksMobileTheme )尝试基于Capabilities.screenDPI调整其内容的大小,以便组件在所有屏幕上以相同的物理大小(以英寸和厘米为单位)呈现。 这对于移动设备来说非常棒,但是桌面上的组件渲染太小,特别是因为桌面上的Flash运行时似乎为Capabilities.screenDPI返回了一个奇怪的常量值(忽略了连接的监视器的真实DPI)。
您通过设置DevicesCapabilities.dpi找到的解决方法不是正确的方法。 此API不适用于实际应用。 这是一个黑客,允许feathersui.com上的演示轻松模拟在Flash Player中运行的SWF中的移动设备。
For a desktop AIR app, you should use a desktop theme instead of the MetalWorksMobileTheme mentioned in the Getting Started with Feathers tutorial. Feathers includes several example themes, and some target mobile and others target desktop. A good one to start with is MetalWorksDesktopTheme. It has a similar design to MetalWorksMobileTheme, but it's designed specifically for desktop.
There are two main reasons to use a desktop theme for a desktop app:
The same UI controls on desktop and mobile can behave very differently. A desktop theme will skin every UI control appropriately for a mouse-and-keyboard desktop environment and enable things like keyboard focus management.
The example mobile themes, including MetalWorksMobileTheme, attempt to resize their content based on Capabilities.screenDPI so that components render at the same physical size (in inches or centimeters) on all screens. This is great for mobile, but the components will be render too small on desktop, especially since the Flash runtimes on desktop don't report the proper DPI of the attached screen.
The workaround that you found by setting DevicesCapabilities.dpi isn't a recommended approach. This API exists only because it allows the demos on the feathersui.com website to simulate how the components would be displayed a mobile device. To scale a real application, you should use Starling's multi-resolution APIs instead. See Multi-Resolution Development in the Starling Manual for details.
更多推荐
发布评论