Re: Re[2]: [Flashcoders] RE: getDepth: highest depth, middle depth, lowest depth

2006-03-10 Thread Flash Mel
Hey Ivan, thanks!  Just getting around to replying.

On 3/9/06, Iv <[EMAIL PROTECTED]> wrote:
>
> Hello Flash,
>
> FM> I am not allowed to use Flash 8 for this project.
> FM> They want it published in Flash 6.  From what I was reading the new
> FM> DepthManager class only works with Flash 8.
>
> http://proto.layer51.com/d.aspx?f=834
> use property below main code.
>
>
> --
> Ivan Dembicki
> 
>
> [EMAIL PROTECTED] ||
> http://www.design.ru
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re[2]: [Flashcoders] RE: getDepth: highest depth, middle depth, lowest depth

2006-03-09 Thread Iv
Hello,

example of pyramidal depth management:

MovieClip.prototype.addProperty("topDepth", function () {
   var mc, mcd, d;
   for (mcd in this) {
  if ((mc=this[mcd])._name == mcd & mc instanceof MovieClip & mc._parent == 
this) {
 return (d=this[mcd].getDepth()+1)<1 ? 1 : d;
  }
   }
   return 1;
}, null);

// ---
this.onReleaseHandler = function() {
this.pyramiDepth(false);
};
this.pyramiDepth = function(depth, direction) {
if (depth === false) {
depth = this._parent.topDepth-1;
this.swapDepths(depth);
this.next_mc.pyramiDepth(depth-2, 1);
this.prev_mc.pyramiDepth(depth-3, -1);
} else {
this.swapDepths(depth);
if (direction == 1) {
this.next_mc.pyramiDepth(depth-2, 1);
} else if (direction == -1) {
this.prev_mc.pyramiDepth(depth-2, -1);
}
}
};
this.createAnyMc = function(this_obj, name, depth, prev_mc) {
var mc = this_obj.createEmptyMovieClip(name, depth);
mc.prev_mc = prev_mc;
prev_mc.next_mc = mc;
mc._x = (prev_mc._x+30) || 20;
mc.lineStyle(0, 0xFF, 100);
mc.beginFill(0xCC, 100);
mc.lineTo(40, 0);
mc.lineTo(45, 20);
mc.lineTo(40, 40);
mc.lineTo(0, 40);
mc.lineTo(-5, 20);
mc.lineTo(0, 0);
mc.endFill();
mc.onRelease = this.onReleaseHandler;
mc.pyramiDepth = this.pyramiDepth;
trace(mc.prev_mc);
return mc;
};
//
var prev_mc = undefined;
for (var i = 0; i<6; i++) {
prev_mc = this.createAnyMc(this, "mc"+i, i, prev_mc);
}



-- 
Ivan Dembicki

[EMAIL PROTECTED] || 
http://www.design.ru

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re[2]: [Flashcoders] RE: getDepth: highest depth, middle depth, lowest depth

2006-03-09 Thread Iv
Hello Flash,

FM> I am not allowed to use Flash 8 for this project.
FM> They want it published in Flash 6.  From what I was reading the new
FM> DepthManager class only works with Flash 8.

http://proto.layer51.com/d.aspx?f=834
use property below main code.


-- 
Ivan Dembicki

[EMAIL PROTECTED] || 
http://www.design.ru

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com