# loadMovie frame length

**URL:** <https://forum.kirupa.com/t/loadmovie-frame-length/183759>\
**Category:** flash\
**Created:** [March 29, 2006, 8:35pm UTC](https://forum.kirupa.com/t/loadmovie-frame-length/183759 "2006-03-29T20:35:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![caustic](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@caustic](https://forum.kirupa.com/u/caustic)\
**Post date:** [March 29, 2006, 8:35pm UTC](https://forum.kirupa.com/t/loadmovie-frame-length/183759/1 "2006-03-29T20:35:12Z")

</div>

Is there a way to read the frame length of a clip? I’m attempting to make an image gallery(somewhat) that switches between various animations rather than static images. What I’d like to do is wait for each to finish playing before moving on to the next one…

---

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [March 29, 2006, 8:40pm UTC](https://forum.kirupa.com/t/loadmovie-frame-length/183759/2 "2006-03-29T20:40:42Z")

</div>

From the flash help menu:

> [@FlashHelp](#):
>
> MovieClip.\_totalframes  
> Availability  
> Flash Player 4.
> 
> Usage  
> my\_mc.\_totalframes:Number
> 
> Description  
> Read-only property; returns the total number of frames in the movie clip instance specified in the MovieClip parameter.
> 
> Example  
> In the following example, two movie clip buttons control the Timeline. The prev\_mc button moves the playhead to the previous frame, and the next\_mc button moves the playhead to the next frame. Add content to a series of frames on the Timeline, and add the following ActionScript to Frame 1 of the Timeline:
> 
> ```auto
> 
> stop();
> prev_mc.onRelease = function() {
> var parent_mc:MovieClip = this._parent;
> if (parent_mc._currentframe>1) {
> parent_mc.prevFrame();
> } else {
> parent_mc.gotoAndStop(parent_mc._totalframes);
> }
> };
> next_mc.onRelease = function() {
> var parent_mc:MovieClip = this._parent;
> if (parent_mc._currentframe<parent_mc._totalframes) {
> parent_mc.nextFrame();
> } else {
> parent_mc.gotoAndStop(1);
> }
> };
> 
> ```

---

<div class="post-metadata">

**Author:** ![caustic](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@caustic](https://forum.kirupa.com/u/caustic)\
**Post date:** [March 29, 2006, 8:49pm UTC](https://forum.kirupa.com/t/loadmovie-frame-length/183759/3 "2006-03-29T20:49:47Z")

</div>

Haven’t tested it, but I’m positive that’s exactly what I was looking for… Did quite a bit of searching, came up empty every time. Thanks much good sir

---

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [March 29, 2006, 8:58pm UTC](https://forum.kirupa.com/t/loadmovie-frame-length/183759/4 "2006-03-29T20:58:44Z")

</div>

I’m not a sir, but you are welcome anyway 😉

Sometimes its hard to search. I usually end up going through the Actions panel and looking at the built in classes/functions. In this case I found it under:  
Built-in Classes --\> Movie --\> MovieClip --\> Properties. A bit of a dig but there is lots of good stuff in there. 😃
