Trying to avoid re-loading same swf

hi all,

firstly, i did try to search for my answer already in the forums, but i didn’t know what to search for, to get a specific answer to my problem…

i’m working on my first real flash site, and i’ve created all the buttons and the various pages (individual swf’s) to load for each button… it’s all working fine.

however, since i’m planning to use a transition, i want to make it so that if they’re already on a page (say “about”) then they click the ‘about’ button again, it won’t re-play the transition/loading bit.

i thought i could just make a variable called ‘currentclip’ and make it so that when they click a button, that section becomes the ‘currentclip’ and if they then click that button again, it won’t reload… but it isn’t working.

here’s my code at the moment (on the ‘main’ button):

[AS]
on (press) {
if (currentclip!=main) {
loadMovieNum(“main.swf”, “_root.capsule.host”);
currentclip=main;
}
}[/AS]

host is the clip host, and capsule is a MC in which host sits… and that’s been working fine, until i added the stuff about currentclip… now the “main” page just won’t load :frowning:

anyone got some suggestions?
thanks a lot
Stuart