Door transition for jpg graphics

Hi all,

I have seen a couple of website using door transition. for example, 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?

hi …

check this post here

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 ?

maybe something like

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

got it? =)

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?

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

i’m glad you worked it out =) :wink: