Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

_root array of elements

Status
Not open for further replies.

Dachyon

Programmer
Nov 4, 2002
32
NZ
Hi All,
I am trying to find a way to iterate over all of the elements of a MovieClip. Is there a property similar to all[ ] in JavaScript in which you can reference each of the child elements of a MovieClip ?

eg.

for (var i=0; i < _root._all.length; i++) {
if (_root._all instanceof MovieClip) {
_root._all.stop();
}
}

dachyon
 

function stopAllClips(clip) {
clip.stop();
for (var i in clip) {
if(typeof clip=="movieclip") {
if(clip!=clip) {
stopAllClips(clip);
}
}
}
};

Usage...

_root.stopAllClips(_root.my_clip);
 
Yep, that works. But what I actually want to do is simply pause the whole movie, then resume again. Would something like "framerate = 0" work ?
 
That would stop the whole movie, and you can restart it in the same manner...
 
Yes, but is it possible to set the framerate to 0 ?
I've had a look at FPSController component, but it will only allow a minimum framerate of 1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top