zimbot,
Nesting clips is like nesting folders on your hard drive. If you have a
clip called viewer_mc on the main timeline, its path is _root.viewer_mc; if
you put that viewer into a movie clip called dog, its new path is
_root.dog.viewer_mc; if you stack that inside another clip called
dogcatcher, the newest path would be _root.dogcatcher.dog.veiwer_mc.
By the looks of it, though, it shouldn't make much difference in this
case. The reason I say that is because your code is written within an
onClipEvent block, which is a bit "old fashioned" nowadays. That's neither
good nor bad, mind you ... nothing *wrong* with it, just that ActionScript
now allows you to write all your code in a keyframe on the main timeline
rather than having to put your code *inside* clips. In this case, all your
methods and properties required by the viewer clip are contained within the
viewer clip, so you can put it where you like.
David
stiller ( at ) quip ( dot ) net
[quoted text, click to view] > so I wish to know how to make it happen with Main time line root has dog
mc
> and inside THAT is the viewer and that attcaches the leaf.
>
>
>
> Any assistance would be appreciated.
>
>
>
> thanks
>
>
>
> In the code:
>
>
>
> onClipEvent (load) {
>
> function init () {
>
> maxleaves = 300;
>
> //
>
> G = 1/1.618033989;
>
> GA = 360-360*G;
>
> //
>
> rad = 20;
>
> rgrowth = 1.005;
>
> //
>
> cur = maxleaves;
>
> }
>
> init();
>
> }
>
> onClipEvent (enterFrame) {
>
> if (cur) {
>
> cur--;
>
> //
>
> rot += GA;
>
> rot -= int(rot/360)*360;
>
> //
>
> rad *= rgrowth;
>
> x = Math.cos(rot*Math.PI/180)*rad;
>
> y = Math.sin(rot*Math.PI/180)*rad;
>
> //
>
> this.attachMovie("leaf", "l"+cur, cur);
>
> mc = this["l"+cur];
>
> //
>
> mc._x = x;
>
> mc._y = y;
>
> mc._rotation = rot;
>
> //
>
> }
>
> }
>
>
>
>