# Please help with this code!

**URL:** <https://forum.kirupa.com/t/please-help-with-this-code/121802>\
**Category:** Uncategorized\
**Created:** [September 7, 2004, 9:23am UTC](https://forum.kirupa.com/t/please-help-with-this-code/121802 "2004-09-07T09:23:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthonyp](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@anthonyp](https://forum.kirupa.com/u/anthonyp)\
**Post date:** [September 7, 2004, 9:23am UTC](https://forum.kirupa.com/t/please-help-with-this-code/121802/1 "2004-09-07T09:23:16Z")

</div>

Hi!

I’m having a problem making a transition movie play out.

I currently have this code which ties in to a button call “b1”

Although it calls both movies to load and play the woobrook.swf only play in and not out.

I am pretty sure these “if” statements need sorting out.

b1.onRelease = function() {  
if (\_root.section != “flash/portfolio text/woodbrook.swf”) {  
\_root.section = “flash/portfolio text/woodbrook.swf”;  
\_root.change.gotoAndPlay(“getrid”);

// Transition section (If no movie has been loaded etc)

if (level10.boxMovie == undefined) {  
level10.boxMovie = “flash/portfolio text/woodbox”;  
preview.loadMovie(“flash/portfolio text/woodbox.swf”);

} else if (level10.boxMovie != “flash/portfolio text/woodbox”) {

// Transition section (If a movie has been played up to stop then carry in out on release etc).

if (preview.\_currentframe \>= preview.midframe) {  
level10.boxMovie = “flash/portfolio text/woodbox”;  
preview.play();  
}  
}  
}  
};

Many thanks for your help in advance. 🙂

Anthony
