# Framerate

**URL:** <https://forum.kirupa.com/t/framerate/29729>\
**Category:** Uncategorized\
**Created:** [August 29, 2003, 8:58pm UTC](https://forum.kirupa.com/t/framerate/29729 "2003-08-29T20:58:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![grandsp5](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@grandsp5](https://forum.kirupa.com/u/grandsp5)\
**Post date:** [August 29, 2003, 8:58pm UTC](https://forum.kirupa.com/t/framerate/29729/1 "2003-08-29T20:58:02Z")

</div>

Is there any way to get the framerate of the current movie using AS?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 9:35pm UTC](https://forum.kirupa.com/t/framerate/29729/2 "2003-08-29T21:35:48Z")

</div>

nope

[edit] … well you could get the playback framerate but not the set framerate - but of course the playback framerate could be fast enough to keep up with the set framerate making them the same but you never know[/edit]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 9:41pm UTC](https://forum.kirupa.com/t/framerate/29729/3 "2003-08-29T21:41:16Z")

</div>

how would you do that?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 9:53pm UTC](https://forum.kirupa.com/t/framerate/29729/4 "2003-08-29T21:53:53Z")

</div>

```auto
this.onEnterFrame = function(){
	if (this.lastTime){
		var curTime = getTimer();
		var dif = curTime - this.lastTime;
		trace("Playing at approx. "+ 1000/dif +" frames a second.");
		this.lastTime = curTime;
	}else this.lastTime = getTimer();
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 9:55pm UTC](https://forum.kirupa.com/t/framerate/29729/5 "2003-08-29T21:55:17Z")

</div>

very nice. thanks a bunch

i even understand the code:)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2003, 10:37pm UTC](https://forum.kirupa.com/t/framerate/29729/6 "2003-08-29T22:37:01Z")

</div>

welcome 😉
