English 中文(简体)
让系统时间确定消化速度,而不是方案
原标题:Let system time determine animation speed, not program FPS

I m 在《行动》3中写上卡片游戏。 每张卡都有一门从闪电式4号出口电影展期的班子,其中包括卡片图形和单射。 当我用一张卡片时,我打电话给AndPlay,看看这部电影。

当框架速度放缓时,所有估计需要更长时间才能完成。 看来,通过不停的电影剪辑,可以确保纸上的所有框架。 因此,如果方案框架比率低于规定时间,则计算速度会放缓。

我总是以同样的速度 play升,因此总是在同一时间的屏幕上显示。 如果框架速度太慢,无法显示所有框架,则框架就会下降。 是否有可能以这种方式将闪闪电告诉囚犯? 如果不是,最容易地将这种行为本身列入方案?

问题回答

最容易的方式是使用<代码> 日码(或setInterval,每1 000/fps milliseconds,其中注明MovieClip

如果你需要更准确的话,你必须检查自上一次更新<>以来所花时间。 (stolen from the first comment of this article from Keith Peters blog, 其中解释了所有情况。)

这是自我使用闪电以来的一段时期,但从我理解的那段话来看,由于闪电使用了一种基于估算的模型。

然而,银星利用了基于时间的估算模式,并将像基准值所允许的那样,利用尽可能多的中间框架。

tw类(fl.transitions)。 Tween对这种情况是完美的。 通过将施工人的最后论点设定为TRUE,然后将其推论/触发点数与秒数挂钩,而且我知道它补偿了FPS的损失/加因。

您可以通过向建筑商传递一个新物体(Trigger(new Object()、“x”)来方便地将其与时段相提并论,并为工程部创建听众(TweenEvent)。 MoTION_FINISH,以激发你的活动!

我利用Tweens,做一件小事,因为事情容易、快捷,得到一切支持。 正如我说过的那样,它应当解决你的科索沃警察部队/滞后问题,因为它适应了科索沃警察部队的实时变化(我知道!)。





相关问题
images sliding continuously with <table> and jQuery

I m trying to write a little test page that circulates images through a window (see image). I have colored boxes inside a table (gray border), with each box being a element. <table id="boxes" ...

WPF 3d rotation animations

I have a few 3d rectangles on my screen that I want to pivot around the Y axis. I want to press down with the mouse, and rotate the 3d object to a max rotation, but when the user moves their mouse, ...

Disable Windows 7 touch animation in WPF

In Windows 7 when you touch the screen there is a short animation that occurs at the touch point. In my WPF app I want to display my own touch points, without showing the one supplied by Windows. ...

jQuery block moving

I wanna move a div block to the top, so I coded like this: CSS part: .movingPart{ margin-top:80px; } jQuery part: $(document).ready(function() { $( #btn ).click(function() { $( .movingPart )....

Direct 2D gnuplot PNG animation?

Can anyone please confirm that yes/no Gnuplot 4.5 (on CVS) can output 2D animated PNG files? I have numerous datasets but one line that I d like to show iteratively in 3 different places in my graph. ...

Visual State Manager VS Animations in WPF

There is a lot of talk about the simplicity of Visual States and the transitions between them in WPF/Silverlight. I have the need to generate animations dynamically at runtime, to animate the ...

Create a ImageIcon that is the mirror of another one

I ll like to know if there is a way to create a ImageIcon that is the mirror of another ImageIcon. Searching on Google, I found how to do it by using many AWT libraries. Is there a way to do it with ...

how to drag in the animation in iphone application?

Iphone application is using the static co-ordinates to reach at some points in the application,which is based on the button event. But what i want is when i drag the item than it should reach at some ...