Preload scipt and theClip.play()

I am using the preloader code:

host.loadMovie(“hwtp_main.swf”);
function preload(theClip) {
if (!theClip.doneLoading) {
if (theClip._framesloaded>0 && theClip._framesloaded == theClip._totalframes) {
gotoAndPlay(“Enter”);
} else {
theClip.stop();
}
bytesLoadedOutput = theClip.getBytesLoaded();
bytesTotalOutput = theClip.getBytesTotal();
var percentLoaded = (theClip.getBytesLoaded()/theClip.getBytesTotal());
LoadMask._width = 150*percentLoaded;
}
}

Script works fine and goes to framelabel “Enter” after swf has loaded. But then I have a button appear and I want to:

theClip.play()

Why won’t the clip start?

theClip.play() works if it replaces gotoAndPlay(“Enter”) in the script above

Please help!!!

RR

Wrong target. theClip is no longer your clip (it’s just a name that you put as a parameter). You have to do

on (press) {
_root.host.play();
}

pom :asian:

Thanks for all your help!

You have been answering quite a few of my posts. Your help is greatly appreciated.

I may have to put you on my payroll.

Ron R

:stuck_out_tongue: I’m trying to play Terran right now. A disaster. Once I get to the point where I make nothing but tanks I don’t know what to do. I think I was a Protoss in another life…

Cheers!

pom