Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 30th, 2003, 08:13 AM
koalabeer koalabeer is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 9 koalabeer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
advanced swapdepths problem

hi, i have a little problem witht the mcA.swapDepths(mcB) function.
i have a movie where users can add objects in the movie. when the mouse goes over on of those objects, it expands and has to be drawn above the other objects.

i load all the objects from an xmlfile. the loading and stuff goes fine, so i wont pay attention to that here.
i have a dummyObject, which is a movieclip. i create a copy of this dummy for each object in my xmlfile. this goes a little like this (simplified version):

var topId;

function drawObjects()
{
for (i=0; i<numberOfObjects; i++)
{
// as u can see, each object is copied in its own depth
duplicateMovieClip (dummyObject, "object" + i, i);
topId = i; // the last object has to be on top when drawn
}
}

in the object i have a rollOver call to the function fixDepth(movieClip, id)

this is how fixDepth(movieClip, id) looks like:

function fixDepth(movieClip, id)
{
var topMovieClip = eval("object" + topId);
topMovieClip.swapDepths(movieClip);
topId = id;
}

this function should swap the incoming movieClip with the topMovieClip and therefore should allways be drawn above ALL the other objects. the movieClip is now on top and this is 'remembered' by setting the topId to id.

now here's the problem:
this doesn't allways draw my object above all the other. what did i do wrong? since i can't trace the depth of an object, debugging is quite difficult. is there a maximum number of depths available?

thnx in advance

koala

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > advanced swapdepths problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway