被缩放Flash影片没有我问 [英] Flash movie being scaled without me asking

查看:124
本文介绍了被缩放Flash影片没有我问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在开发基于纯ActionScript-3使用的是FlashDevelop(无MXML参与)视频游戏网站,并没有真正的惊喜为止。

I've been developing a web based pure ActionScript-3 (no MXML involved) videogame using FlashDevelop, and have had no real surprises so far.

我最近想动我的项目交给的IntelliJ-理念的审判(但功能齐全),并发现,虽然通过的IntelliJ产生的.swf文件还是功能,它莫名其妙地被放大,使所有的元素两倍尺寸。这是有没有我的任何code改变的所有的。

I've recently tried moving my project over to the trial (but fully functional) of Intellij-Idea and have found that while the .swf produced by Intellij still functions, it has somehow been scaled up so that all elements are twice the size. This is without me having made any code changes at all.

我知道Stage.scaleMode的,但我不使用它在我的code。

I am aware of stage.scaleMode, but am not using it in my code.

我要强调,我不是在谈论的HTML包装通常presents瑞士法郎的任何属性,因为这种行为是明显的,即使当我加载裸瑞士法郎到我的浏览器。

I want to stress that I am not talking about any attributes of the HTML wrapper which normally presents the .swf, as this behaviour is evident even when I load the bare .swf into my browser.

的唯一变量,我能想到的在这里是传递到Adobe Flex编译器的参数 - 但我已经通过了可用的参数看,并没有看到任何可能

The only variables I can think of here are the parameters passed to the Adobe flex compiler - but I've looked through the available parameters and haven't seen anything likely.

有没有人有任何想法,以什么可能会发生在这里?

Does anyone have any thoughts as to what might be happening here?

推荐答案

解决方案是以下两行添加到该程序的启动:

The solution is to add the following two lines to the start of the program:

        stage.scaleMode = StageScaleMode.NO_SCALE;
        stage.align = StageAlign.TOP_LEFT;

(随着一个StageScaleMode和StageAlign适当进口)

(With appropriate imports of StageScaleMode and StageAlign)

请注意,我的运行距离的FlashDevelop项目时没有的需要添加这些。

Note that I didn't need to add these when running the project from FlashDevelop.

的scaleMode可设定为四个值之一: NO_SCALE NO_BORDER 显示所有 EXACT_FIT 的IntelliJ似乎默认为EXACT_FIT的行为,同时的FlashDevelop默认NO_SCALE的行为。

The scaleMode can be set to one of four values: NO_SCALE NO_BORDER SHOW_ALL EXACT_FIT Intellij seems to default to the behaviour of EXACT_FIT while FlashDevelop defaults to the behaviour of NO_SCALE.

该阶段对准可以设置为 最佳 左上 剩下 BOTTOM_LEFT等。 我不知道该怎么形容默认的IntelliJ行为 - 它看起来部分,但不能完全集中。 FlashDevelop中默认为TOP_LEFT。

The stage alignment can be set to TOP TOP_LEFT LEFT BOTTOM_LEFT etc. I'm not sure how to describe the default Intellij behaviour - it looks partly but not completely centered. FlashDevelop defaults to TOP_LEFT.

在哪里存放如果不是在C本身的$ C $这种隐含的行为?我没有一个线索 - 也许在某些.swf文件头信息

Where is this implicit behaviour stored if not in the code itself? I haven't a clue - perhaps in some .swf file header information.

我当然preFER中的FlashDevelop默认行为。

I certainly prefer the FlashDevelop default behaviour.

这篇关于被缩放Flash影片没有我问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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