# External .swf with diferent frame rate

**URL:** <https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921>\
**Category:** Uncategorized\
**Created:** [May 2, 2003, 9:17pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921 "2003-05-02T21:17:56Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![filete](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/filete/32/124_2.png) [@filete](https://forum.kirupa.com/u/filete)\
**Post date:** [May 2, 2003, 9:17pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921/1 "2003-05-02T21:17:56Z")

</div>

Hello there,

This is the issue,  
I want to be able to load external .swf to my main movie, but to the  
main is 12 fps and the external 25 fps.

Is this ok?

I mean does the external .swf will keep playing at 25 , besides the  
main movie is 12 fps?

Thanks

---

<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:** [May 2, 2003, 9:42pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921/2 "2003-05-02T21:42:59Z")

</div>

nope… the movie in \_level0 sets the fps. :-\

there are a few threads about this, run a search in the forum and you’ll find out what to do. 😉 =)

---

<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:** [May 2, 2003, 9:44pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921/3 "2003-05-02T21:44:08Z")

</div>

So, kax

How can i do this… ?:-\

---

<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:** [May 2, 2003, 9:50pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921/4 "2003-05-02T21:50:25Z")

</div>

=)

in this example, the instance myMovieClip would play at 48 fps

```auto
setFPS = function (instance) {
	instance.nextFrame();
};
setInterval(setFPS, 1000/48, myMovieClip);

```

---

<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:** [May 2, 2003, 10:09pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921/5 "2003-05-02T22:09:29Z")

</div>

So , do i have to put this code on the main movie?

“setFPS = function (instance)”

Does the instance is the name of the .swf after is load in the \_level0 ?

Can you explain me more clear this code?  
Once, again Kax

You are saving my life !

😛

---

<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:** [May 2, 2003, 10:43pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921/6 "2003-05-02T22:43:55Z")

</div>

ok… let’s make it easier.

```auto
setFPS = function(instance) {
	instance.nextFrame();
};
setInterval(setFPS, 1000/25, this);

```

you only need to paste the script in the first frame of a MovieClip/swf that should play at 25 fps. you may need to add a stop action as well… not sure.

and the code is very simple, just see setInterval in the as dictionary and you’ll understand it. 😉

---

<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:** [May 2, 2003, 10:48pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921/7 "2003-05-02T22:48:08Z")

</div>

So , that way …  
I do not need to put a name of the instance?

---

<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:** [May 2, 2003, 10:50pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921/8 "2003-05-02T22:50:36Z")

</div>

nope… you don’t need to 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:** [May 2, 2003, 10:57pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921/9 "2003-05-02T22:57:54Z")

</div>

So, to free my mind 😏

The code will be:

```
     setFPS = function() {
     nextFrame();
   };
    setInterval(setFPS, 1000/25, this);

```

??  
By the way , how do you post here AS and it appears that way?

thanks

---

<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:** [May 2, 2003, 11:02pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921/10 "2003-05-02T23:02:35Z")

</div>

ok… you still the parameter.

```auto
setFPS = function(instance) {
instance.nextFrame();
};
setInterval(setFPS, 1000/25, this);

```

paste it **as is** in a frame.

and you use [as][/as] tags. 🙂

---

<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:** [May 2, 2003, 11:04pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921/11 "2003-05-02T23:04:40Z")

</div>

OK!

Got it now,

Thanks again

---

<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:** [May 2, 2003, 11:06pm UTC](https://forum.kirupa.com/t/external-swf-with-diferent-frame-rate/19921/12 "2003-05-02T23:06:17Z")

</div>

no problem, filete. :beam:
