0 Replies - 955 Views - Last Post: 25 January 2007 - 06:42 AM

#1 reyco1  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 43
  • Joined: 20-March 05

Collect MCs on _root

Posted 25 January 2007 - 06:42 AM

Description: place prototype in frame 1With this code, you would be able to place all the MCs on _root into an array.
var stuff : Object;
for (stuff in _root)
{
if (_root [stuff] instanceof MovieClip || _root [stuff] instanceof Button)
{
if (_root [stuff]._name != this._name)
{
objects.push (_root [stuff]);
}
}
}


trace(objects.length+" objects exist on _root");

Is This A Good Question/Topic? 0
  • +

Page 1 of 1