To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Reply
 
Thread Tools Search this Thread Display Modes
Old 08-03-2006, 04:51 AM   #1
lostinas
Junior Member
 
Join Date: Mar 2006
Posts: 21
dynamically attached overlapping buttons & depth

Hi, hope i can get some help on this i've been trying for ages with many different styles of code and not found the perfect answer yet.

I have a map where people can add cities to, the values for each city is stored in a db. each city is represented by a red dot on the map and on a roll over event it displays a text label of the city name. The cities are all attached dynamically. This is all working fine. Currently I am using a swapdepths(10000000) method on the rollover for each button which is working fine on the first view the page, however upon adding a new city some of the cities are very close to each other (eg New York, Boston, Philly) and on the rollover some citiy labels are displaying above or blow the other city dots near them.

Difficult to explain - much easier to understand visually. url below
http://www.joeshields.net/flashlab/cityviewmax/

Any help would be appreciated.

thanks
lostinas is offline   Reply With Quote
Old 08-03-2006, 09:19 AM   #2
nunomira
Moderator
 
nunomira's Avatar
 
Join Date: May 2002
Location: portugal
Posts: 6,767
hi,

If your problem has to do with the depths - and you want to guaratee that the next movie clip appears on top of the previous:
1- in MX 2004 or later, you can use getNextHighestDepth().
code:

some_mc.swapDepths(this.getNextHighestDepth());



2 - In previous versions, you keep record of depths:
code:

var depth = 1;
some_mc.swapDepths(++depth);


I'm moving this thread to the ActionScript forum as it seems to belong.
nunomira is offline   Reply With Quote
Old 08-03-2006, 12:02 PM   #3
lostinas
Junior Member
 
Join Date: Mar 2006
Posts: 21
thanks that put me on the right path, i was actually adding my dynamic mc's inside another movie so I set it to swapDepths(containerMC.GetNextHighestDepth()).

Cheers
lostinas is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:06 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.