Flash组件和9-Slice的转换缩放到HTML5画布 [英] Conversion of Flash Components and 9-Slice Scaling to HTML5 canvas

查看:314
本文介绍了Flash组件和9-Slice的转换缩放到HTML5画布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图帮助我们的设计师将他们的GUI资产导出到HTML5画布上,但是他们可以在 Flash Pro 。这些资产是愚蠢的,因为它们不包含任何JavaScript,例如。图标中的时间线用于将鼠标悬停和鼠标悬停等分开,并且每个帧都可能具有本地动画。但通常情况下,GUI中的所有应用程序可观察状态均由Flash Pro以外的 Haxe 中编写的应用程序代码控制。

有一些工具,比如 CreateJS ,但设计师使用组件,9-切片缩放,字体等,这是我们尝试过的工具无法处理的。所以,你如何继续在Flash Pro中工作,但仍然使用这些功能在HTML5画布上:
$ b $ ul
$ ScrollPane

  • 组合框

  • 列表

  • TextArea

  • TextInput

  • b
  • 字体



  • 我已经看到另一个从Illustrator使用生成的JS 的示例,使用 Ai2canvas插件,但是我很担心这个过程中的流程,因为一方面,GUI的总体设计是推到编程领域,因为图形用户界面(GUI)需要由编程人员设置和控制,而这通常不包括许多设计人员。另一方面,典型的设计人员将不得不工作在当设计由整个GUI概述的各个组件时,这是一个较低的级别。


    我将如何在Haxe中执行此操作? / p>

    解决方案

    一个选项是使用HaxeUI简化构建组件, https://github.com/ianharrigan/haxeui 。它具有您列出的几乎所有功能,并且可以节省您的编程时间。



    至于某些从Flash Pro导出的方式,您可能需要考虑构建一个插件。 CSSDK 是免费的,可用于在AS3中构建面板。我已经将它用于InDesign,虽然它可能不是最好的文档的SDK,它是非常强大的,让你控制应用程序。我相信也有JavaScript脚本可能是有用的,以及看看。


    I am trying to help our designers export their GUI assets to HTML5 canvas, but in a way that they can keep working on these assets in Flash Pro. The assets are "dumb" in the sense that they do not contain any JavaScript, eg. the timeline in icons is used for separating mouse-over from mouse-out, and so forth, and each frame might have local animations. But in general, all application-observable state in the GUI is controlled from the application code written in Haxe, outside of Flash Pro.

    There are tools like CreateJS, but the designers use Components, 9-slice scaling, fonts, etc. which cannot be handled by the tools we have tried.

    So how do you keep working in Flash Pro but still use these features on an HTML5 canvas:

    • ScrollPane
    • ComboBox
    • List
    • TextArea
    • TextInput
    • 9-slice scaling
    • Fonts

    I have seen alternative examples of using generated JS from Illustrator using the Ai2canvas plugin, but I am worried about the flow in such a process because

    • On one hand, the overall design of the GUI is pushed into the programming realm because the GUI needs to be setup and controlled by someone programming-savvy, which usually excludes many designers.
    • On the other hand, the typical designer will have to work at a lower level when designing the individual components outlined by the overall GUI.

    And how would I go about to do this in Haxe?

    解决方案

    One option would be to use HaxeUI to simplify building components, https://github.com/ianharrigan/haxeui. It has almost all of the features you listed and should save you programming time.

    As for some way of exporting from Flash Pro you might want to look into building a plugin. The CSSDK is free and can be used to build panels in AS3. I've used it for InDesign and while it's maybe not the most well documented SDK it is very powerful in giving you control over the application. I believe there are also javascript scripts that may be useful to look at as well.

    这篇关于Flash组件和9-Slice的转换缩放到HTML5画布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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