ActiveDen

Are there any examples of times you'd *need* an enterFrame event?

535 posts
  • Beta Tester
  • Has been a member for 4-5 years
  • Sold between 1 000 and 5 000 dollars
dimumurray says
well.. as for tweens go, why use onEnterFrame when you have an onChange and onMotionFinished build inside?

Under the hood you are actually calling an onEnterFrame when using the mx.transitions.Tween class. You can even explicitly set the FPS property on a tween instance to force the setInterval implementation. Some developers get a kick out of creating there own tweening functionality from the ground up, usually making light weight versions of more robust tweening mechanisms. Hence the reason why they use onEnterFrame to begin with.

To really grasp all the nuances of programmatic tweening I like to go to the source. The father of programmatic tweening himself Robert Penner.

Here’s a link on his site to the tweening chapter from his book in PDF format:

Chp7 – Motion, Tweeing, and Easing

The code is in an older format but the concepts are still sound.

4492 posts
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Elite Author
  • Has been a member for 4-5 years
  • Sold between 100 000 and 250 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • India
+4 more
VF says

Without enterFrame event, we will loose the luxury of rich animation. Mostly the precision of techniques (conditions / equations) which we use to delete the enterFrame event is important for optimal result. If we are able to switch off the enterframe on right time, we no need to go for an alternative. This varies according to the nature of applications / projects.

It is always better to use mouseMove event wherever it fulfills.

by
by
by
by
by