A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Instances from previous frames dont go away!

  1. #1
    Wait- what now? tidenburg's Avatar
    Join Date
    Dec 2005
    Posts
    1,471

    Instances from previous frames dont go away!

    Ive always been aware of this problem but its really bugging me now. In my game when i use a gotoAndPlay function and instances which have had the swapDepths applied to them stay on screen. Its really annoying and I cant find a way to get around it. Can anyone help me please?
    "I'd only told them the truth. Was that so selfish? Our integrity sells for so little, but it is all we really have. It is the very last inch of us, but within that inch, we are free."

  2. #2
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    removeMovieClip() them.
    http://www.birchlabs.co.uk/
    You know you want to.

  3. #3
    Wait- what now? tidenburg's Avatar
    Join Date
    Dec 2005
    Posts
    1,471
    no i cant do that because then they dont appear at all on the next frame
    "I'd only told them the truth. Was that so selfish? Our integrity sells for so little, but it is all we really have. It is the very last inch of us, but within that inch, we are free."

  4. #4
    Wait- what now? tidenburg's Avatar
    Join Date
    Dec 2005
    Posts
    1,471
    if i phrased the question wrong;
    i have some fog using swapsdepths and i need it to change position and tint ect but it just stays the same as the last level. Its very annoying
    "I'd only told them the truth. Was that so selfish? Our integrity sells for so little, but it is all we really have. It is the very last inch of us, but within that inch, we are free."

  5. #5
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    Isn't that what you said you want?
    http://www.birchlabs.co.uk/
    You know you want to.

  6. #6
    The Flashman earl223's Avatar
    Join Date
    Sep 2000
    Location
    Marikina City, Philippines
    Posts
    876
    or make them _visible = false if you don't want to remove them.
    i eat actionscripts for breakfast

  7. #7
    crossconscious
    Join Date
    Sep 2005
    Location
    Belgium
    Posts
    1,188
    Or just attach them again when needed?

  8. #8
    skylogic.ca MD004's Avatar
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    366
    Quote Originally Posted by Tidusen
    instances which have had the swapDepths applied to them stay on screen.
    I've had the same problem, I've had movieclips on the stage and used swapDepths on them and then they dont go away when I want them to. Try using attachMovie instead of putting the clips on the stage, if you use attachMovie() you still have control over the depth and removeMovieClip() will work properly (and you have to use removeMovieClip because attached clips aren't affected by frames)

    Good luck,
    ~MD

  9. #9
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    Ironic, I cleared an attachment about this just a week or so ago.

    MD004's got it. If you place a clip on stage it's author time content, so it's depth is a minus. If you then swapDepths on that it has a postive depth, so Flash thinks it was dynamically created ( ie, via attach or duplicate ), and then looping back to that first frame ( Where the instance is first displayed on stage ) just confuses the hell out of Flash.

    Took me forever to get to the bottom of this way back when I first found it. Since then I've avoided swapDepths where ever possible, and never use it on authortime content.

    Squize.

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