PDA

View Full Version : Problems with depth and pauseMovie prototype


Vagabond
02-27-2009, 02:47 PM
these problems are unrelated to each other, I'm sure, so let me begin with the pauseMovie prototype.

I found it on this web site: http://proto.layer51.com/d.aspx?f=825
and I think I'm using it correctly, but it's not actually stopping my movie like it should (see attached zip file)

The other problem is with depth of attached movie clips.

I have 2 movie clips that I'm attaching multiple instances of. One of them is to populate a forest on the stage, and the other is to introduce moving targets.

The forest seems to work right as far as I can tell, but the targets are always appearing on top of everything. They -should- be appearing within their own layer and seem to be inside the forest (behind some trees, in front of other, you get the idea)

I've attached my FLA in a zip file. Inside this you'll find an empty movie clip named generate_deer_mvc. On this time line you'll find but one frame on one layer, and in that actionscript, I've thumb tacked 2 lines (23 and 36).

23 is where I call the pauseMovie prototype.

36 is where I attach the deer movie clip.

I've tried my best but I can't figure out why these don't wanna work for me. Can anyone help?

rrh
02-27-2009, 07:17 PM
Your "deer" are on top of everything. You have 4 deer in the layer deer1 and nothing in deer2 deer3 deer4.

And you're not calling the pause prototype, you're just defining it and never calling it.

( And the stop() and play() methods used in there will only stop timeline-based animation, onEnterFrame actions will continue to execute. )

Vagabond
02-27-2009, 07:50 PM
I swear I distributed those MCs to separate layers... well, thanks for the keen eye. Now that that's taken care of, on the generate_deer_mvc, on line 29, is that not the proper way to execute the pauseMovie prototype?

// where duration is a previously determined number
this.pauseMovie(duration);

if not, how do I use this prototype? I thought it was simple, but maybe I'm wrong

Vagabond
02-28-2009, 11:47 AM
so I have to figure out how to move my mobile objects across the stage over time without using onEnterFrame and while maintaining control over when they appear (so as to simulate randomness)

Vagabond
03-04-2009, 03:24 AM
So I scrapped the pauseMovie prototype and went with a frame based delay timer.

unfortunately, this spawned it's own problems, see the link below

Premature Execution (http://www.actionscript.org/forums/showthread.php3?t=199221)

and as always, I thank you all for your help ^^