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!

swapDepths issue

Status
Not open for further replies.

PaulFynch

IS-IT--Management
May 23, 2002
105
CA
i searched the forum, and couldn't find an applicable answer.

i am creating empty clips in my movie that are loading individual images from an external source.

when a particular button is pressed, i would like a mc with a nested text box to display text relative to the image.

the original images are loaded into holders example h3, h2, h1 in the root of the movie

i cannot seem to get a depth value from these using the getDepth method, and furthermore, cannot seem to place my textbox mc above the depths of the images

this code in frame 1

for(i=_root.index; i>-1; i--){
_root.createEmptyMovieClip("h"+i,i);
_root["h"+i]._x=341;}

should place the depths at 3, 2, 1 and 0 respectively....

when i use this code

_root.myTextBox.swapDepths(5);
trace(_root.myTextBox.getDepth);


my swapDepths appears not to work, and my trace returns "undefined"

any suggestions would be awesome...

cheers
paul
 
Are you stacking all of those clips one over the other? And allways want your text box to appear over the top one, when swithching depths on the different clips?
 
the clips are in a consecutive order as far as depths go, or should be, one one is present at a time, i want the text box (which will dynamically load a text file according to the index) to jump to a higher depth when the button on the left of the page is pressed.
i just have an instance of a square box on the stage to test the swapDepths method, but have had no luck


check it out...

and thanks for your help last time, worked like a charm

cheers, paul
 
ha ha ha
me feel dumm
the reason i could't get a depth on the textbox is because i named the instance "tb" which coincidentally, is the name of a variable on the root for my preloader.
thank you to anyone who looked at this

cheers
paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top