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 06-07-2007, 12:39 PM   #1
inquizard
Senior Member
 
Join Date: Jan 2007
Location: Nottingham, England
Posts: 263
[f8] depth control on movieclips

Hi,

wondering if someone is able to confirm something for me...

I've been playing with someone else's fla.file and been trying to teach myself about the throw mc option. Basically i've got 10 squares which load on to the main screen and you can throw them around - but they dont jump to the front...


I've been trying to make this happen by adding this to the movieclip, but it's not working

code:
on (rollOver){
mx.behaviors.DepthControl.bringToFront(this);



I've had a look at the main "as" which came with the file and seen this

code:
for (var i = 0; i < kNbrBalls; ++i) {
var mc = this.attachMovie("superball_mc", "mc"+i, 1+i);



not sure what this is exactly but would i be right in thinking the reason why the movieclips aint jumping to the front when you click on them is because their not on the same level?


any help very much appreciated, thanks
inquizard is offline   Reply With Quote
Old 06-07-2007, 01:40 PM   #2
bitsk308
Getting There!
 
bitsk308's Avatar
 
Join Date: Jul 2000
Location: Phoenix, AZ
Posts: 427
the swapDepths() mc method may help you out. It will take a clip and assign it to a new depth, and if there's something else already there, it will take that something else and put it where your clip used to be, i.e. it will swap the two items. If there isn't anything already there, it'll just move it your clip to the specified depth and be done. If you need to maintain the stack order of the items, try iterating through an array to swap everything down one depth.
__________________
www.mandersonimage.com
bitsk308 is offline   Reply With Quote
Old 06-07-2007, 06:36 PM   #3
inquizard
Senior Member
 
Join Date: Jan 2007
Location: Nottingham, England
Posts: 263
thanks for that - no idea really what you said but gives me something to look into - swapdepths & arrays....



i maybe some time
inquizard is offline   Reply With Quote
Old 06-07-2007, 07:31 PM   #4
silentweed
Flashmatics
 
silentweed's Avatar
 
Join Date: Mar 2005
Location: London, UK
Posts: 4,823
this may help http://board.flashkit.com/board/show...ht=bring+front
__________________
Flashmatics | Flashmatics Library (free downloads)
-----------------------------------------------------
Latest Projects:
The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

-----------------------------------------------------
Flash Certified Developer
silentweed is offline   Reply With Quote
Old 06-07-2007, 08:10 PM   #5
inquizard
Senior Member
 
Join Date: Jan 2007
Location: Nottingham, England
Posts: 263
thanks silentweed,

not quite sure where to be attaching that though - i've done it to the mc and doesnt seem to do anything. I've had a practice at the overlay of mcs before and had some thing that seems to work - I've been trying to figure out if there's some way i can attach the 2 together...

but that would involve me know what i'm doing.

i've attached the 2 fla and i just want to point out the action scripting for the superballs one aint mine - i've been pulling someone else's work apart trying to figure out why it works...

Last edited by inquizard; 09-09-2007 at 11:13 AM.
inquizard 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 02:19 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.