Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Highest Depth, how to find
cybernetix
post Oct 20 2004, 03:03 AM
Post #1


ReloadeD
Group Icon
Group: Honored
Posts: 562
Joined: 20-May 04
From: Belgrade, Serbia
Member No.: 17





sometime you need to know which is highest dept used in movie, couse if you dynamically create some objects they can be over some predefined objects.

also it is neccessary while you dynamically create new object to give it new depth, if you give wrong depth it will erase existing object.

so, here it is.


CODE
onFrame(y) {
x=-16385; // lowest depth
for (z in this) { // lets find highest depth
x=Math.max(this[z].getDepth(),x); // find depth of every object on actual level
}
// and if you want some object on top of the scene, do this
yourObject.swapDepths(x+1); // swap to higest depth +1

}


note: only for swf 6
 
+Quote Post  Go to the top of the page
cmonney
post Oct 20 2004, 11:18 AM
Post #2


~ Soul Rebel ~
Group Icon
Group: Main Team*
Posts: 3,625
Joined: 18-May 04
From: a mind-altering psychedelic trip
Member No.: 3





thanks a lot 'agent'!!! Tip-Hat.gif
 
+Quote Post  Go to the top of the page
fedhater
post Oct 20 2004, 12:31 PM
Post #3


Mad Scientist
Group Icon
Group: *Premier*
Posts: 629
Joined: 19-May 04
From: .RO
Member No.: 10





Very interesting, thank you Cybernetix
 
+Quote Post  Go to the top of the page
chriskanye
post Feb 12 2006, 10:46 PM
Post #4


Getting Used To The Dots
Group Icon
Group: Member
Posts: 31
Joined: 12-February 06
Member No.: 9,709





Deeply interesting math! Nice thinking!
 
+Quote Post  Go to the top of the page
Andrew_F
post Nov 5 2009, 03:50 AM
Post #5


New Member
Group Icon
Group: Member
Posts: 20
Joined: 12-April 09
Member No.: 24,863





Very goot idea!
I was looking for this for a long time!!!
Tks
 
+Quote Post  Go to the top of the page

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version Time is now: 29th July 2010 - 11:00 PM
Life Insurance | Package Holidays | Package Holidays | Acs Student Loans | Skype