A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: swapDepths issue...

  1. #1
    Member
    Join Date
    Aug 2008
    Posts
    38

    swapDepths issue...

    I have 3 movies at the _root level (Image, Menu, Selector). Inside 1 of the 3 MCs is another MC (color1). The color1 MC is a draggable object. How can I move the color1 MC to the front of the Image MC? I have the following script tagged to the color1 MC, but it's not working.

    PHP Code:
    onClipEvent (enterFrame) {
        
    this._alpha _alpha+12;
        
    this.swapDepths(_root["Image"])


  2. #2
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Location
    Lincoln City
    Posts
    2,156
    On the mc that contains color1 you need to put the code above, with a little twist:
    PHP Code:
    onClipEvent (load) {
        
    this.swapDepths(_root["Image"])

    onClipEvent (enterFrame) { 
         
    this.color1._alpha += 12;

    http://code.mneilsworld.com/
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

  3. #3
    Member
    Join Date
    Aug 2008
    Posts
    38
    I've tried that too... The image layer still has priority over the draggable MC.

  4. #4
    :
    Join Date
    Dec 2002
    Posts
    3,518
    If color1 is inside either Menu or Selector, then that movie clip will need to be swapped with Image.

  5. #5
    Member
    Join Date
    Aug 2008
    Posts
    38
    Wise you are my friend... hehehe... That did it. Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center