# Help With Action Script

**URL:** <https://forum.kirupa.com/t/help-with-action-script/120559>\
**Category:** Uncategorized\
**Created:** [August 25, 2004, 12:39pm UTC](https://forum.kirupa.com/t/help-with-action-script/120559 "2004-08-25T12:39:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![macmar](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@macmar](https://forum.kirupa.com/u/macmar)\
**Post date:** [August 25, 2004, 12:39pm UTC](https://forum.kirupa.com/t/help-with-action-script/120559/1 "2004-08-25T12:39:53Z")

</div>

I have a load movie action in a frame on my Actions layer:  
loadMovieNum(“movie.swf”, 30);  
What additional AS could be added so the “movie.swf” starts playing at frame 15 rather than frame 1?  
Thanks for any help/suggestions!

---

<div class="post-metadata">

**Author:** ![Mad\_Flasher](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@Mad\_Flasher](https://forum.kirupa.com/u/Mad_Flasher)\
**Post date:** [August 25, 2004, 12:49pm UTC](https://forum.kirupa.com/t/help-with-action-script/120559/2 "2004-08-25T12:49:34Z")

</div>

im not sure of the AS but u could always just add 15 blank keyframes

---

<div class="post-metadata">

**Author:** ![claudio](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@claudio](https://forum.kirupa.com/u/claudio)\
**Post date:** [August 25, 2004, 1:01pm UTC](https://forum.kirupa.com/t/help-with-action-script/120559/3 "2004-08-25T13:01:43Z")

</div>

I think something like this should do:

```auto
createEmptyMovieClip("loader", 9876);
loadMovieNum("movie.swf", 30);
loader.onEnterFrame = function() {
	lev = _level30;
	if (lev) {
		var t = lev.getBytesTotal();
		var l = lev.getBytesLoaded();
		if (l == t) {
			lev.gotoAndPlay(15);
			this.removeMovieClip();
		} else {
			lev.stop();
		}
	}
};

```

---

<div class="post-metadata">

**Author:** ![macmar](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@macmar](https://forum.kirupa.com/u/macmar)\
**Post date:** [August 25, 2004, 3:59pm UTC](https://forum.kirupa.com/t/help-with-action-script/120559/4 "2004-08-25T15:59:53Z")

</div>

Thanks for the help, but you have an Action Script dummy here. I assume I make an empty movie clip with instance name of “loader.” I’ve tried a few different things, and nothing seems to work. Could you be more specific where I place the code you supplied. Better still a .fla with an example would be extremely helpful for an AS-challenged person like me. You’re help is greatly appreciated!

> [@claudio](#):
>
> I think something like this should do:
> 
> ```auto
> createEmptyMovieClip("loader", 9876);
> loadMovieNum("movie.swf", 30);
> loader.onEnterFrame = function() {
> lev = _level30;
> if (lev) {
> var t = lev.getBytesTotal();
> var l = lev.getBytesLoaded();
> if (l == t) {
> lev.gotoAndPlay(15);
> this.removeMovieClip();
> } else {
> lev.stop();
> }
> }
> };
> 
> ```
