# Sliding door effect

**URL:** <https://forum.kirupa.com/t/sliding-door-effect/6241>\
**Category:** Uncategorized\
**Created:** [October 2, 2002, 3:49pm UTC](https://forum.kirupa.com/t/sliding-door-effect/6241 "2002-10-02T15:49:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ed\_oconnell](https://avatars.discourse-cdn.com/v4/letter/e/c68b51/32.png) [@ed\_oconnell](https://forum.kirupa.com/u/ed_oconnell)\
**Post date:** [October 2, 2002, 3:49pm UTC](https://forum.kirupa.com/t/sliding-door-effect/6241/1 "2002-10-02T15:49:50Z")

</div>

Hello Everyone,

I’m new here, sort of new to Flash (I’ve been working with it for three months or so), and have a little dillema going on. I want to create an sliding door sort of effect to cover up a little blink that happens when I load external .swfs into an empty movie clip on the main stage of my site.

To get an idea of what I am describing, you can look here:

[http://www.lshd.com/main.html](http://www.lshd.com/main.html)

It seems like a pretty common tack to take, but I am having some trouble.

Here’s what I’ve done so far. I’ve created a movieclip which has the sliding door effect and placed that on the layer above my the movie clip which serves as the target for my externally loaded .swfs.

The movie clip which contains the effect is called “wipe” – the target clip is called “c”.

On my first navigation button which I am using to test my strategy I have this code:

on (release) {  
\_root.wipe.gotoAndPlay(2);  
\_root.loader(“fast”, " ", 2);

}

“loader” is a function on the root time line which loads different movies into the target “\_root.c”

What I can’t figure out is how to make the door animation play until it is fully closed, _then_ execute the loader function, _wait_ until it knows the load is complete, _then_ open back up.

Does anyone have an idea how I might accomplish this?

Thanks,

Ed

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 2, 2002, 3:55pm UTC](https://forum.kirupa.com/t/sliding-door-effect/6241/2 "2002-10-02T15:55:00Z")

</div>

I don’t think I can help but I just wanted to say your incredible if you made that site after only using flash for 3 months. I’ve been using flash twice as long and can’t do anything near that quality. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 2, 2002, 4:09pm UTC](https://forum.kirupa.com/t/sliding-door-effect/6241/3 "2002-10-02T16:09:46Z")

</div>

I may have the wrong end of the stick here, but I’ll give it a shot.

How about a sliding door movie clip with a blank first and last frame, placed in the right position over everything else. When you want it to go, trigger it to play frame 2 from the main movie, and it’ll play, with the current main content still going. When it reaches the closed point, you have a bit of script attached to the movie that takes the name of the clip you want (passed by a variable) and opens then new one behind the slider. You could get some kind of loading thing going on there, like a preloader. Then it carries on playing until it reaches the last frame, where it is no longer visible, and the new movie is there waiting behind it.

Any good?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 2, 2002, 5:52pm UTC](https://forum.kirupa.com/t/sliding-door-effect/6241/4 "2002-10-02T17:52:57Z")

</div>

Thanks both of you,

I am thinking along the same lines as you Kitiara, but I haven’t quite got the little bits of script necessary to do it worked out. That’s sort of what I’m looking for tips on.

And, just to avoid confusion, that example site is _not_ one I designed – it just happens to be one that has the effect I want working. Credit where it’s due: Antonio Costa is the author of that site.

Still scratching my head,

ed

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 15, 2003, 6:16pm UTC](https://forum.kirupa.com/t/sliding-door-effect/6241/5 "2003-01-15T18:16:11Z")

</div>

Thanks for the credit Ed… found the fla I used for the sliding doors - done in flash 5… This post by Ed shows a how to do it in MX, much cleaner way to do it- now that mx is out.

[http://www.flashkit.com/board/showthread.php?threadid=378579&highlight=sliding+doors](http://www.flashkit.com/board/showthread.php?threadid=378579&highlight=sliding+doors)

Here is my old Flash 5 sceneswitcher - feel free to use…

[http://www.antoniocosta.com/open\_source/sceneswitcher\_flash5.fla](http://www.antoniocosta.com/open_source/sceneswitcher_flash5.fla)

Antonio
