# Door transition for jpg graphics

**URL:** <https://forum.kirupa.com/t/door-transition-for-jpg-graphics/17301>\
**Category:** flash\
**Created:** [April 3, 2003, 3:48pm UTC](https://forum.kirupa.com/t/door-transition-for-jpg-graphics/17301 "2003-04-03T15:48:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![KazchiX](https://avatars.discourse-cdn.com/v4/letter/k/3e96dc/32.png) [@KazchiX](https://forum.kirupa.com/u/KazchiX)\
**Post date:** [April 3, 2003, 3:48pm UTC](https://forum.kirupa.com/t/door-transition-for-jpg-graphics/17301/1 "2003-04-03T15:48:51Z")

</div>

Hi all,

I have seen a couple of website using door transition. for example, [www.electrongeek.net](http://www.electrongeek.net)  
when I try to do this trick with jpg images, it gets harder than I thought it was. All the tut I ever read was explaining this effect using swf file as an external file. at the end of external file, use gotoAndPlay() to open the door. but what if I want to just display jpg images? how could I open the door once it closes?

---

<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:** [April 3, 2003, 4:23pm UTC](https://forum.kirupa.com/t/door-transition-for-jpg-graphics/17301/2 "2003-04-03T16:23:59Z")

</div>

hi …

check this post [here](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=19107) …

Soulty explaines everything you need to know (really great)  
also checkout the .fla’s he posted …

as for your question concerning the .jpg’s …

instead of using the transition between xternally loaded .swf’s  
i assume u can also use it with jpg’s …

check out soulty’s .fla … where he loads an .swf file u should  
load a jpg … i think … that’s what u meant ?

---

<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:** [April 3, 2003, 4:24pm UTC](https://forum.kirupa.com/t/door-transition-for-jpg-graphics/17301/3 "2003-04-03T16:24:24Z")

</div>

maybe something like

```auto
this.onEnterFrame = function() {
if (jpgContainer.getBytesLoaded() >= jpgContainer.getBytesTotal()) {
doors.gotoAndPlay("openDoors");
delete this.onEnterFrame;
}
}

```

got it? =)

---

<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:** [April 3, 2003, 7:12pm UTC](https://forum.kirupa.com/t/door-transition-for-jpg-graphics/17301/4 "2003-04-03T19:12:32Z")

</div>

Thanks for the help,

I kinda figured it out in a similar way.  
When I play movie on local server, it works perfectly fine but once I upload files and play it remotely, there is a delay between opening the door and displaying the image. Door must be open after the image is shown. I check the code and the door stops until the image is completely loaded. Do you have any idea?

---

<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:** [April 3, 2003, 7:40pm UTC](https://forum.kirupa.com/t/door-transition-for-jpg-graphics/17301/5 "2003-04-03T19:40:52Z")

</div>

I solved the problem.  
When I also check if container.getBytesTotal() \> 0, all works fine now. Thanks

---

<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:** [April 3, 2003, 7:57pm UTC](https://forum.kirupa.com/t/door-transition-for-jpg-graphics/17301/6 "2003-04-03T19:57:18Z")

</div>

i’m glad you worked it out =) 😉
