简体   繁体   English

皮肤Flash播放器的最佳方式

[英]Best way to skin flash player

Is there a good pattern to creating a flash player that is easily skinned, providing different dimensions, buttons, background color, etc?是否有一个很好的模式来创建一个易于换肤、提供不同尺寸、按钮、背景颜色等的 Flash 播放器? I've considered 2 approaches:我考虑了两种方法:

1 The player skin is flat. 1 玩家皮肤平坦。 The logos and buttons are on one large background image.徽标和按钮位于一张大背景图像上。 The actual trigger areas are transparent sprites, positions and dimensions defined by xml or json externally.实际触发区域是xml或json外部定义的透明精灵、位置和尺寸。

The problems I see with this are that the skin is bottlenecked by the person designing the background and there's less that can be done in the UI (hover states on buttons, for instance).我看到的问题是皮肤受到设计背景的人的限制,并且在 UI 中可以完成的工作较少(例如按钮上的悬停状态)。 However this makes it very easy for someone to create a new skin by defining a new background image and position of transparent sprite triggers.然而,这使得通过定义新的背景图像和透明精灵触发器的位置来创建新皮肤变得非常容易。

2 Another way I've considered is by turning all graphical assets into movie clips and/or bitmaps. 2 我考虑过的另一种方法是将所有图形资产转换为影片剪辑和/或位图。 This requires placing the assets into the stage of a swf that is loaded externally by the player.这需要将资产放入由播放器从外部加载的 swf 的阶段。 This method provides greater flexibility in positioning assets (and relatively if the player size changes in the browser) as well as hover states on buttons.这种方法在定位资产(如果浏览器中播放器大小发生变化时相对)以及按钮上的悬停状态提供了更大的灵活性。 The downside of course is more time spent in Flash getting the assets setup for the player.缺点当然是花在 Flash 上为播放器设置资源的时间更多。

Why not use Flex?为什么不使用 Flex? Which has skinning functionality built in?哪个内置了换肤功能?

There is actually a template to download where you can reskin all standard components in Flash, Photoshop or Illustrator.实际上有一个模板可供下载,您可以在其中为 Flash、Photoshop 或 Illustrator 中的所有标准组件重新设置皮肤。 All you do is hand the template over to the designer(s) and read the stylesheet in your application.您所做的就是将模板交给设计人员并阅读应用程序中的样式表。

http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex_skins http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex_skins

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM